叶松
2023-12-06 1b004047f00cc846924209051ee654619c56a249
Merge branch 'master' of http://111.30.93.211:10101/r/supipe
已修改23个文件
已添加3个文件
1599 ■■■■ 文件已修改
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/controller/TMaterialReleaseController.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/entity/TMixingConsume.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/mapper/TMaterialReleaseMappper.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/service/TMaterialReleaseService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/service/impl/TMaterialReleaseServiceImpl.java 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/resources/mapping/TMaterialReleaseMapper.xml 76 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/controller/PipeScreenController.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/entity/MaterialThingDto.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/entity/MaterialThingNumDto.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/mapper/PipeInfoMapper.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/service/PipeInfoService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/service/impl/PipeInfoServiceImpl.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/mobile/src/main/resources/mapping/PipeInfoMapper.xml 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/screen/src/main/java/com/thhy/screen/config/StartListener.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/controller/AudioController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/entity/AudioDto.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/entity/AudioFile.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/service/AudioService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/service/impl/AudioServiceImpl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/bigscreen/mapper/BigScreenMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/screen/src/main/resources/mapping/BigScreenMapper.xml 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/api/modules/materials.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/GoodManage/MixRatioScreen.vue 568 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/GoodManage/MixingScreen.vue 566 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/MixingInfo/mixRatio.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/MixingInfo/mixing.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/controller/TMaterialReleaseController.java
@@ -113,6 +113,18 @@
        return materialReleaseService.mixingConsumeIn(values);
    }
    // 拌合站 (2023-12-5) 标识牌, 手动修改 原料消耗  t_mixing_consume -> t_mixing_signboard
    @PostMapping("/mixingConsumeUp")
    public BasicResult mixingConsumeUp(@RequestBody Map<String,Object> values){
        return materialReleaseService.mixingConsumeUp(values);
    }
    //搅拌站 删除
    @PostMapping("/mixingConsumeDel")
    public BasicResult mixingConsumeDel(@RequestBody HashMap<String,Object> values)  {
        return materialReleaseService.mixingConsumeDel(values);
    }
    //  !!!列表 :拌合站 (2023-11-16) 标识牌, 手动添加 原料消耗  t_mixing_consume -> t_mixing_signboard
    @PostMapping("/mixingConsumeList")
    public BasicResult mixingConsumeList(@RequestBody Map<String,Object> values){
@@ -148,4 +160,5 @@
    }
}
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/entity/TMixingConsume.java
@@ -1,5 +1,6 @@
package com.thhy.materials.modules.biz.concret.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
@@ -64,6 +65,10 @@
    private String dictName;
    private Integer star;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String createTime;
    //施工单位
    private String constructionUnit;
    /**
     * This field was generated by MyBatis Generator.
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/mapper/TMaterialReleaseMappper.java
@@ -59,4 +59,10 @@
    void mixingUpdate(Map<String, Object> mixing);
    void mixingDel(String mixingId);
    void mixingConsumeUpTwo(Map<String, Object> mixingConsume);
    void mixingConsumeDel(@Param("mixingConsumeId") String mixingConsumeId,@Param("star") Integer star);
    void mixingConsumeDelSign(@Param("mixingSignboardId") String mixingSignboardId,@Param("star") Integer star);
}
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/service/TMaterialReleaseService.java
@@ -41,4 +41,8 @@
    BasicResult mixingUpdate(HashMap<String, Object> values);
    BasicResult mixingDel(HashMap<String, Object> values);
    BasicResult mixingConsumeUp(Map<String, Object> values);
    BasicResult mixingConsumeDel(HashMap<String, Object> values);
}
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/service/impl/TMaterialReleaseServiceImpl.java
@@ -1,5 +1,6 @@
package com.thhy.materials.modules.biz.concret.service.impl;
import com.alibaba.nacos.api.utils.StringUtils;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.thhy.general.common.BasicResult;
@@ -256,15 +257,19 @@
    @Override
    @Transactional
    public BasicResult mixingConsumeIn(Map<String, Object> values) {
        values.put("mixingSignboardId","");
        materialReleaseMappper.mixingConsumeIn(values);
//        values.put("mixingSignboardId","");
//        materialReleaseMappper.mixingConsumeIn(values);
        String mixingSignboardId = values.get("mixingSignboardId").toString();
        Integer star = materialReleaseMappper.starInt();
        List<Map<String,Object>> mixingConsumes = (List<Map<String,Object>>) values.get("mixingConsume");
        for (Map<String,Object> mixingConsume :mixingConsumes){
            mixingConsume.put("mixingSignboardId",mixingSignboardId);
            mixingConsume.put("star",star+1);
            mixingConsume.put("mixingConsumeId","");
            if(star!=null){
                mixingConsume.put("star",star+1);
            }else {
                mixingConsume.put("star",1);
            }
            //mixingConsume.put("mixingConsumeId","");
            materialReleaseMappper.mixingConsumeInTwo(mixingConsume);
        }
        return BasicResult.success();
@@ -278,6 +283,7 @@
        List<TMixingSignboard> mixingSignboards = materialReleaseMappper.mixingSignboardList(values);
        for (TMixingSignboard mixingSignboard : mixingSignboards){
            Integer star = materialReleaseMappper.starIntSig(mixingSignboard.getMixingSignboardId());
            //values.put("")
            List<TMixingConsume> mixingConsumes = materialReleaseMappper.mixingConsumes(mixingSignboard.getMixingSignboardId(),star);
            mixingSignboard.setTMixingConsumes(mixingConsumes);
        }
@@ -320,4 +326,29 @@
        }
        return BasicResult.success();
    }
    @Override
    public BasicResult mixingConsumeUp(Map<String, Object> values) {
        String mixingSignboardId = values.get("mixingSignboardId").toString();
        Integer star = materialReleaseMappper.starInt();
        materialReleaseMappper.mixingConsumeDelSign(mixingSignboardId,star);
        List<Map<String,Object>> mixingConsumes = (List<Map<String,Object>>) values.get("mixingConsume");
        for (Map<String,Object> mixingConsume :mixingConsumes){
            mixingConsume.put("mixingSignboardId",mixingSignboardId);
            mixingConsume.put("star",star);
            //mixingConsume.put("mixingConsumeId","");
            materialReleaseMappper.mixingConsumeInTwo(mixingConsume);
        }
        return BasicResult.success();
    }
    @Override
    public BasicResult mixingConsumeDel(HashMap<String, Object> values) {
        Integer star = Integer.valueOf(values.get("star").toString());
        List<String> mixingConsumeIds = (List<String>) values.get("mixingConsumeIds");
        for (String mixingConsumeId : mixingConsumeIds){
            materialReleaseMappper.mixingConsumeDel(mixingConsumeId,star);
        }
        return BasicResult.success();
    }
}
hd/pipe/materialsManage/src/main/resources/mapping/TMaterialReleaseMapper.xml
@@ -285,9 +285,10 @@
        report_number as reportNumber,
        stata as stata,
        silo_id as siloId,
        percentage as percentage
        percentage as percentage,
        inspect_date as inspectDate
        from t_mixing where silo_id=#{siloId}
        order by in_date desc limit 0,1
        and types=1
  </select>
  <select id="siloList" resultType="com.thhy.materials.modules.biz.concret.entity.TSilo">
    select
@@ -330,9 +331,7 @@
  <insert id="mixingConsumeInTwo" >
    insert into t_mixing_consume
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="mixingConsumeId != null">
        mixing_consume_id,
      </if>
      <if test="dictId != null">
        dict_id,
      </if>
@@ -363,11 +362,15 @@
      <if test="star != null">
        star,
      </if>
      <if test="constructionUnit != null">
          construction_unit,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="mixingConsumeId != null">
        #{mixingConsumeId,jdbcType=VARCHAR},
      </if>
<!--      <if test="mixingConsumeId != null">-->
<!--        #{mixingConsumeId,jdbcType=VARCHAR},-->
<!--      </if>-->
      REPLACE(UUID(),'-',''),
      <if test="dictId != null">
        #{dictId,jdbcType=VARCHAR},
      </if>
@@ -398,6 +401,9 @@
      <if test="star != null">
        #{star},
      </if>
      <if test="constructionUnit != null">
        #{constructionUnit},
      </if>
    </trim>
  </insert>
  <select id="starInt" resultType="java.lang.Integer">
@@ -419,12 +425,16 @@
    <if test="signboardName!=null and signboardName!='' ">
        and  tms.signboard_name like concat('%',#{signboardName},'%')
    </if>
    <if test="mixingSignboardId !=null and mixingSignboardId !='' ">
        and tms.mixing_signboard_id=#{mixingSignboardId}
    </if>
  </select>
  <select id="mixingConsumes" resultType="com.thhy.materials.modules.biz.concret.entity.TMixingConsume">
    select
    mc.mixing_consume_id as mixingConsumeId,
    sd.dict_name as dictName,
    mc.dict_id as dictId,
    mc.spec as spec,
    mc.manufacturer as manufacturer,
    mc.wat_full as watFull,
@@ -433,16 +443,22 @@
    mc.save_stamp as saveStamp,
    mc.construction as construction,
    mc.mixing_signboard_id as mixingSignboardId,
    mc.star as star
    mc.star as star,
    mc.create_time as createTime,
    mc.construction_unit as constructionUnit
     from t_mixing_consume mc
     left join  sys_dict sd on mc.dict_id=sd.dict_id
     where mc.mixing_signboard_id=#{mixingSignboardId} and mc.star=#{star}
<!--     <if test="strTime!=null and strTime!='' and endTime !=null and endTime!=''">-->
<!--         and mc.create_time between #{strTime} and #{endTime}-->
<!--     </if>-->
  </select>
  <select id="mixingConsumePull" resultType="com.thhy.materials.modules.biz.concret.entity.TMixingSignboard">
    select
     tms.mixing_signboard_id as mixingSignboardId,
     tms.signboard_name as signboardName,
     sp.pro_name as proName
     sp.pro_name as proName,
     sp.construction_unit as constructionUnit
     from t_mixing_signboard tms left join sys_project sp
     on tms.pro_id=sp.pro_id
  </select>
@@ -531,4 +547,46 @@
  <delete id="mixingDel" parameterType="java.lang.String">
    delete from  t_mixing where  mixing_id=#{mixingId}
  </delete>
  <update id="mixingConsumeUpTwo" >
    update t_mixing_consume
    <set>
      <if test="dictId != null">
        dict_id = #{dictId,jdbcType=VARCHAR},
      </if>
      <if test="spec != null">
        spec = #{spec,jdbcType=VARCHAR},
      </if>
      <if test="manufacturer != null">
        manufacturer = #{manufacturer,jdbcType=VARCHAR},
      </if>
      <if test="watFull != null">
        wat_full = #{watFull,jdbcType=VARCHAR},
      </if>
      <if test="planAmnt != null">
        plan_amnt = #{planAmnt,jdbcType=VARCHAR},
      </if>
      <if test="factAmnt != null">
        fact_amnt = #{factAmnt,jdbcType=VARCHAR},
      </if>
      <if test="saveStamp != null">
        save_stamp = #{saveStamp,jdbcType=VARCHAR},
      </if>
      <if test="construction != null">
        construction = #{construction,jdbcType=VARCHAR},
      </if>
      <if test="mixingSignboardId != null">
        mixing_signboard_id = #{mixingSignboardId,jdbcType=VARCHAR},
      </if>
      <if test="star != null">
        star = #{star},
      </if>
    </set>
    where mixing_consume_id = #{mixingConsumeId,jdbcType=VARCHAR}
  </update>
    <delete id="mixingConsumeDel" >
        delete from  t_mixing_consume where  mixing_consume_id=#{mixingConsumeId} and star=#{star}
    </delete>
    <delete id="mixingConsumeDelSign" >
        delete from  t_mixing_consume where  mixing_signboard_id=#{mixingSignboardId} and star=#{star}
    </delete>
</mapper>
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/controller/PipeScreenController.java
@@ -3,9 +3,7 @@
import com.thhy.general.common.BasicResult;
import com.thhy.general.config.SysUserInfo;
import com.thhy.general.utils.UserInfoUtils;
import com.thhy.mobile.modules.biz.pipeinfo.entity.MaterialInfo;
import com.thhy.mobile.modules.biz.pipeinfo.entity.PipeListVo;
import com.thhy.mobile.modules.biz.pipeinfo.entity.ScreenPipeCompare;
import com.thhy.mobile.modules.biz.pipeinfo.entity.*;
import com.thhy.mobile.modules.biz.pipeinfo.service.PipeInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -76,4 +74,15 @@
        return BasicResult.success(mapto);
    }
    //thing.js 原料实际消耗数量列表  前10条数据
    @RequestMapping("/materialInfo")
    public BasicResult materialInfo(){
        return BasicResult.success(pipeInfoService.materialInfo());
    }
    //thing.js 原料消耗总量
    @RequestMapping("/materialNumInfo")
    public BasicResult materialNumInfo(){
        List<MaterialThingNumDto> materialInfo = pipeInfoService.materialNumInfo();
        return BasicResult.success(materialInfo);
    }
}
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/entity/MaterialThingDto.java
对比新文件
@@ -0,0 +1,32 @@
package com.thhy.mobile.modules.biz.pipeinfo.entity;
import lombok.Data;
import java.io.Serializable;
@Data
public class MaterialThingDto implements Serializable {
    //盘次
    private Integer piece;
    //河砂
    private String sand;
    //小石子
    private String pebbles;
    //水泥3
    private String cement3;
    //粉煤灰2
    private String flyAsh2;
    //水
    private String water;
    //大石子
    private String dashizi;
    //外剂1
    private String externalAgent1;
    //粉煤灰1
    private String flyAsh1;
    //水泥4
    private String cement4;
    //水泥2
    private String cement2;
}
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/entity/MaterialThingNumDto.java
对比新文件
@@ -0,0 +1,13 @@
package com.thhy.mobile.modules.biz.pipeinfo.entity;
import lombok.Data;
import java.io.Serializable;
@Data
public class MaterialThingNumDto implements Serializable {
    //原料名称
    private String material;
    //数量
    private String counts;
}
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/mapper/PipeInfoMapper.java
@@ -175,4 +175,10 @@
    void updateInRepoTime(RepoRecord repoRecord);
    List<Integer> queryAllNumType();
    List<MaterialThingDto> materialInfo();
    List<MaterialThingNumDto> materialNumInfo();
    List<MaterialThingDto> materialInfoTwo();
}
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/service/PipeInfoService.java
@@ -59,4 +59,8 @@
    Map<String,Object> updateDateInfo(PipeInfo pipeInfo);
    void updatePipeDate(PipeDateDto pipeDateDto);
    Map<String,Object> materialInfo();
    List<MaterialThingNumDto> materialNumInfo();
}
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/service/impl/PipeInfoServiceImpl.java
@@ -345,4 +345,20 @@
        calendar.add(Calendar.MINUTE,amount);
        return calendar.getTime();
    }
    @Override
    public Map<String, Object> materialInfo() {
        List<MaterialThingDto> materialThingDtos1 = pipeInfoMapper.materialInfo();
        List<MaterialThingDto> materialThingDtos2 = pipeInfoMapper.materialInfoTwo();
        HashMap<String, Object> map = new HashMap<>();
        map.put("materialThingDtos1",materialThingDtos1);
        map.put("materialThingDtos2",materialThingDtos2);
        return map;
    }
    @Override
    public List<MaterialThingNumDto> materialNumInfo() {
        List<MaterialThingNumDto> materialThingNumDtos = pipeInfoMapper.materialNumInfo();
        return materialThingNumDtos;
    }
}
hd/pipe/mobile/src/main/resources/mapping/PipeInfoMapper.xml
@@ -972,4 +972,51 @@
    <select id="queryAllNumType" resultType="integer">
        select DISTINCT a.numType from (select SUBSTRING_INDEX(m.mould_num,'-',-1) as numType from sys_mould m) a
    </select>
    <select id="materialInfo" resultType="com.thhy.mobile.modules.biz.pipeinfo.entity.MaterialThingDto">
    select
    Piece as piece,
    MAX(CASE WHEN Material = '河砂' THEN FactAmnt END) AS sand,
    MAX(CASE WHEN Material = '小石子' THEN FactAmnt END) AS pebbles,
    MAX(CASE WHEN Material = '水泥3' THEN FactAmnt END) AS cement3,
    MAX(CASE WHEN Material = '粉煤灰2' THEN FactAmnt END) AS flyAsh2,
    MAX(CASE WHEN Material = '大石子' THEN FactAmnt END) AS dashizi,
    MAX(CASE WHEN Material = '水' THEN FactAmnt END) AS water,
    MAX(CASE WHEN Material = '外剂1' THEN FactAmnt END) AS externalAgent1,
    MAX(CASE WHEN Material = '粉煤灰1' THEN FactAmnt END) AS flyAsh1,
    MAX(CASE WHEN Material = '水泥4' THEN FactAmnt END) AS cement4,
    MAX(CASE WHEN Material = '水泥2' THEN FactAmnt END) AS cement2
    from
    t_raw_material where types=1
    GROUP BY Piece
    ORDER BY Piece desc limit 0,10
    </select>
    <select id="materialInfoTwo" resultType="com.thhy.mobile.modules.biz.pipeinfo.entity.MaterialThingDto">
    select
    Piece as piece,
    MAX(CASE WHEN Material = '河砂' THEN FactAmnt END) AS sand,
    MAX(CASE WHEN Material = '小石子' THEN FactAmnt END) AS pebbles,
    MAX(CASE WHEN Material = '水泥3' THEN FactAmnt END) AS cement3,
    MAX(CASE WHEN Material = '粉煤灰2' THEN FactAmnt END) AS flyAsh2,
    MAX(CASE WHEN Material = '大石子' THEN FactAmnt END) AS dashizi,
    MAX(CASE WHEN Material = '水' THEN FactAmnt END) AS water,
    MAX(CASE WHEN Material = '外剂1' THEN FactAmnt END) AS externalAgent1,
    MAX(CASE WHEN Material = '粉煤灰1' THEN FactAmnt END) AS flyAsh1,
    MAX(CASE WHEN Material = '水泥4' THEN FactAmnt END) AS cement4,
    MAX(CASE WHEN Material = '水泥2' THEN FactAmnt END) AS cement2
    from
    t_raw_material where types=2
    GROUP BY Piece
    ORDER BY Piece desc limit 0,10
    </select>
    <select id="materialNumInfo" resultType="com.thhy.mobile.modules.biz.pipeinfo.entity.MaterialThingNumDto">
        SELECT
    Material as material,
    CAST( SUM( FactAmnt ) AS FLOAT ) AS counts
FROM
    t_raw_material
GROUP BY
    Material
    </select>
</mapper>
hd/pipe/screen/src/main/java/com/thhy/screen/config/StartListener.java
@@ -20,15 +20,19 @@
    private BigScreenMapper screenMapper;
    @Override
    public void run(ApplicationArguments args) throws Exception {
        String result = AudioUtils.getGroups();
        if(StringUtils.isEmpty(result)){
            return;
        }
        JSONObject groupJSON = JSON.parseObject(result);
        List<AudioGroup> groupList = JSON.parseArray(groupJSON.getString("Groups"),AudioGroup.class);
        for(AudioGroup ag : groupList){
            screenMapper.insertAudioGroup(ag);
        }
    public void run(ApplicationArguments args){
        /*try {
            String result = AudioUtils.getGroups();
            if(StringUtils.isEmpty(result)){
                return;
            }
            JSONObject groupJSON = JSON.parseObject(result);
            List<AudioGroup> groupList = JSON.parseArray(groupJSON.getString("Groups"),AudioGroup.class);
            for(AudioGroup ag : groupList){
                screenMapper.insertAudioGroup(ag);
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }*/
    }
}
hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/controller/AudioController.java
@@ -29,4 +29,10 @@
        audioService.playMusic(AudioDto);
        return BasicResult.success();
    }
    @RequestMapping("addFile")
    public BasicResult addFile(@RequestBody AudioDto audioDto){
        audioService.addFile(audioDto);
        return BasicResult.success();
    }
}
hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/entity/AudioDto.java
@@ -3,9 +3,14 @@
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class AudioDto implements Serializable {
    private String groupIds;
    private List<AudioFile> fileList;
    private String groupId;
}
hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/entity/AudioFile.java
对比新文件
@@ -0,0 +1,19 @@
package com.thhy.screen.modules.biz.audio.entity;
import com.thhy.general.annotations.Idkey;
import lombok.Data;
import java.io.Serializable;
@Data
public class AudioFile implements Serializable {
    @Idkey
    private String id;
    private String groupId;
    private String audioFile;
    private Integer defaults;
}
hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/service/AudioService.java
@@ -10,4 +10,6 @@
    List<AudioGroup> queryGroups();
    void playMusic(AudioDto audioDto);
    void addFile(AudioDto audioDto);
}
hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/service/impl/AudioServiceImpl.java
@@ -1,10 +1,12 @@
package com.thhy.screen.modules.biz.audio.service.impl;
import com.thhy.screen.modules.biz.audio.entity.AudioDto;
import com.thhy.screen.modules.biz.audio.entity.AudioFile;
import com.thhy.screen.modules.biz.audio.entity.AudioGroup;
import com.thhy.screen.modules.biz.audio.service.AudioService;
import com.thhy.screen.modules.biz.bigscreen.mapper.BigScreenMapper;
import com.thhy.screen.utils.AudioUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -26,6 +28,15 @@
        String groupIds = audioDto.getGroupIds();
        String[] groupIdArray = new String[]{groupIds};
        AudioUtils.playMusic(groupIdArray);
        return;
    }
    @Override
    public void addFile(AudioDto audioDto) {
        List<AudioFile> fileList = audioDto.getFileList();
        screenMapper.deleteAudioFile(audioDto.getGroupId());
        for(AudioFile audioFile : fileList){
            audioFile.setGroupId(audioFile.getGroupId());
            screenMapper.insertAudioFile(audioFile);
        }
    }
}
hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/bigscreen/mapper/BigScreenMapper.java
@@ -1,5 +1,6 @@
package com.thhy.screen.modules.biz.bigscreen.mapper;
import com.thhy.screen.modules.biz.audio.entity.AudioFile;
import com.thhy.screen.modules.biz.audio.entity.AudioGroup;
import com.thhy.screen.modules.biz.bigscreen.entity.*;
import org.apache.ibatis.annotations.Param;
@@ -38,4 +39,10 @@
    List<HashMap<String,Object>> querySteelMake();
    List<HashMap<String,Object>> queryRestInfo();
    void insertAudioFile(AudioFile audioFile);
    void updateAudioFile(AudioFile audioFile);
    void deleteAudioFile(String groupId);
}
hd/pipe/screen/src/main/resources/mapping/BigScreenMapper.xml
@@ -272,5 +272,59 @@
        from sys_device sd where sd.produce_order = '静养'
    </select>
    <insert id="insertAudioFile">
        insert into  t_audio_group_file
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id !=null and id !=''">
                id,
            </if>
            <if test="groupId !=null and groupId !=''">
                group_id,
            </if>
            <if test="audioFile !=null and audioFile !=''">
                audio_file,
            </if>
            <if test="defaults !=null">
                `defaults`,
            </if>
        </trim>
        <trim prefix=" values (" suffix=")" suffixOverrides=",">
            <if test="id !=null and id !=''">
                #{id},
            </if>
            <if test="groupId !=null and groupId !=''">
                #{groupId},
            </if>
            <if test="audioFile !=null and audioFile !=''">
                #{audioFile},
            </if>
            <if test="defaults !=null">
                #{defaults},
            </if>
        </trim>
    </insert>
    <update id="updateAudioFile">
        UPDATE  t_audio_group_file
        <set>
            <trim suffixOverrides=",">
                <if test="groupId !=null and groupId !=''">
                    group_id = #{groupId},
                </if>
                <if test="audioFile !=null and audioFile !=''">
                    audio_file = #{groupFile},
                </if>
                <if test="defaults !=null">
                    `defaults` = #{defaults},
                </if>
            </trim>
        </set>
        where id = #{id}
    </update>
    <delete id="deleteAudioFile">
        delete from t_audio_group_file where groupId = #{groupId}
    </delete>
</mapper>
web/src/api/modules/materials.js
@@ -235,5 +235,31 @@
    checkGetLists: params => // 修改回显
        axios.post('/materials/embedmentCorrection/inventoryList', params),    
  },
  /* 配合比屏管理 */
  mixRatioSrcreen: {
    getLists: params =>
      axios.post('/materials/materialRelease/mixingConsumeList', params),
    insert: params =>
      axios.post('/materials/materialRelease/mixingConsumeIn', params),
    update: params =>
      axios.post('/materials/materialRelease/mixingConsumeUp', params),
    delete: params =>
      axios.post('/materials/materialRelease/mixingConsumeDel', params),
    getScreenNames: params =>
      axios.get('/materials/materialRelease/mixingConsumePull', { params }),
  },
  /* 拌合站屏管理 */
  mixingSrcreen: {
    getLists: params =>
      axios.post('/materials/materialRelease/siloMixingList', params),
    insert: params =>
      axios.post('/materials/materialRelease/mixingInsert', params),
    update: params =>
      axios.post('/materials/materialRelease/mixingUpdate', params),
    delete: params =>
      axios.post('/materials/materialRelease/mixingDel', params),
    getScreenNames: params =>
      axios.get('/materials/materialRelease/siloPull', { params }),
  },
}
web/src/views/GoodManage/MixRatioScreen.vue
@@ -1,11 +1,571 @@
<!-- 物资管理 ==> 配合比屏管理-->
<template>
  <div>222222222222222</div>
  <div class="main">
    <div class="main_header">
      <div class="header_item">
        <span class="header_label">配和比屏:</span>
        <el-select size="mini" v-model="queryInfo.mixingSignboardId" placeholder="请选择配和比屏" clearable>
          <el-option v-for="item in selects.screenNames" :key="item.value" :label="item.label"
            :value="item.value"></el-option>
        </el-select>
      </div>
      <!-- <div class="header_item">
        <span class="header_label">录入方式:</span>
        <el-select size="mini" v-model="queryInfo.stata" placeholder="请选择录入方式">
          <el-option v-for="item in selects.stata" :key="item.value" :label="item.label" :value="item.value"></el-option>
        </el-select>
      </div> -->
      <div class="header_item">
        <span class="header_label">创建时间:</span>
        <el-date-picker type="daterange" v-model="times" value-format="yyyy-MM-dd" start-placeholder="起始时间"
          end-placeholder="结束时间" @change="changeTime" clear></el-date-picker>
      </div>
      <div class="header_item">
        <el-button icon="el-icon-search" v-permission="'search'" @click="queryReset">查询</el-button>
        <el-button icon="el-icon-plus" v-permission="'insert'" @click="addRow">新增</el-button>
      </div>
    </div>
    <div class="main_content">
      <div class="main_content_wrap">
        <div class="table" v-for="(item, index) in tableData" :key="index">
          <div class="row table_head">
            <div class="table_head_item">
              <span class="text title">{{ item.signboardName }}</span>
              <span class="text">创建时间: {{ item.createTime }}</span>
              <!-- <span class="text">录入方式: {{ item.inType }}</span> -->
            </div>
            <div class="table_head_item">
              <el-button v-permission="'update'" @click="updateRow(index)">修改</el-button>
              <el-button v-permission="'delete'" @click="deleteRow(index)">删除</el-button>
            </div>
          </div>
          <div class="row">
            <div class="name">工程名称</div>
            <div class="value">{{ item.proName }}</div>
          </div>
          <div class="row">
            <div class="name">施工单位</div>
            <div class="value">{{ item.constructionUnit }}</div>
          </div>
          <div class="row aline">
            <div>
              <div class="name">施工日期</div>
              <div class="value">{{ item.saveStamp }}</div>
            </div>
            <div>
              <div class="name">施工部位</div>
              <div class="value">{{ item.construction }}</div>
            </div>
          </div>
          <div class="row" v-for="sub in item.dataLists" :key="sub.name">
            <div class="name">{{ sub.name }}</div>
            <div class="column">
              <div class="column-item" v-for="(sub, index) in sub.value" :key="index">{{ sub }}</div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <!-- dialog -->
    <el-dialog class="prop_dialog" width="80%" v-if="isRenderDialog" :title="dialogTitle" :visible.sync="asyncVisible"
      @close="closeDialog">
      <el-form ref="ruleForm" class="rule_form" :model="ruleForm" :rules="rules">
        <el-form-item label="拌合站屏:" prop="mixingSignboardId">
          <el-select size="mini" v-model="ruleForm.mixingSignboardId" :disabled="isUpdate" placeholder="请选择拌合站屏"
            @change="changeSelectForm($event)">
            <el-option v-for="item in selects.screenNames" :key="item.value" :label="item.label"
              :value="item.value"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="工程名称:" prop="proName">
          <el-input v-model="ruleForm.proName" size="mini" placeholder="请输入工程名称" clearable disabled></el-input>
        </el-form-item>
        <el-form-item label="施工单位:" prop="constructionUnit">
          <el-input v-model="ruleForm.constructionUnit" size="mini" placeholder="请输入施工单位" clearable></el-input>
        </el-form-item>
        <el-row>
          <el-col :span="12">
            <el-form-item label="施工日期:" prop="saveStamp">
              <el-date-picker v-model="ruleForm.saveStamp" size="mini" value-format="yyyy-MM-dd" placeholder="请输入施工日期"
                clearable></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="施工部位:" prop="construction">
              <el-input v-model="ruleForm.construction" size="mini" placeholder="请输入施工部位" clearable></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-button style="margin: 0 0 20px 130px;" @click="addFormCol">添加材料</el-button>
        <div style="display: flex;">
          <div style="margin-right: 10px;" v-for="(item, index) in  ruleForm.infos " :key="index">
            <el-form-item :label="index === 0 ? '材料名称' : ''" :prop="`infos.${index}.dictId`">
              <el-select v-model="item.dictId" size="mini" placeholder="请选择材料名称">
                <el-option v-for="item in selects.materials" :key="item.value" :label="item.label"
                  :value="item.value"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item :label="index === 0 ? '规格型号' : ''" :prop="`infos.${index}.spec`">
              <el-input v-model="item.spec" size="mini" placeholder="请输入" clearable></el-input>
            </el-form-item>
            <el-form-item :label="index === 0 ? '生产厂家' : ''" :prop="`infos.${index}.manufacturer`">
              <el-input v-model="item.manufacturer" size="mini" placeholder="请输入" clearable></el-input>
            </el-form-item>
            <el-form-item :label="index === 0 ? '材料含水率(%)' : ''" :prop="`infos.${index}.watFull`">
              <el-input v-model="item.watFull" size="mini" placeholder="请输入" clearable></el-input>
            </el-form-item>
            <el-form-item :label="index === 0 ? '理论用量(kg/m³)' : ''" :prop="`infos.${index}.planAmnt`">
              <el-input v-model="item.planAmnt" size="mini" placeholder="请输入" clearable></el-input>
            </el-form-item>
            <el-form-item :label="index === 0 ? '实际用量(kg/m³)' : ''" :prop="`infos.${index}.factAmnt`">
              <el-input v-model="item.factAmnt" size="mini" placeholder="请输入" clearable></el-input>
            </el-form-item>
          </div>
        </div>
      </el-form>
      <div slot="footer">
        <el-button @click="asyncVisible = false">取 消</el-button>
        <el-button class="submit_btn" @click="onSubmit('ruleForm')">提 交</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
export default {
  data() {
    return {
      loading: false,
      isRenderDialog: false,
      asyncVisible: false,
      submitMode: '', // add update
      times: [], // 时间范围
      selects: {
        screenNames: [], // 配合比屏
        materials: [] // 材料名称
      }, // 下拉框状态选择汇总
      tableData: [{
        inType: '', // 录入方式
        mixingSignboardId: '', // 屏id
        createTime: '', // 创建时间
        signboardName: '', // 标识排
        proName: '', // 工程名称
        constructionUnit: '', // 施工单位
        saveStamp: '',  // 施工日期
        construction: '',  // 施工部位
        mixingConsumeId: '', // 每个材料id
        dataLists: [
          {name: '材料名称', type: 'dictName', value: []}, // 材料名称
          {name: '规格型号', type: 'spec', value: []}, // 规格型号
          {name: '生产厂家', type: 'manufacturer', value: []}, // 生产厂家
          {name: '材料含水率(%)', type: 'watFull', value: []}, // 含水率
          {name: '理论用量(kg/m³)', type: 'planAmnt', value: []}, // 理论用量
          {name: '实际用量(kg/m³)', type: 'factAmnt', value: []}, // 实际用量
        ],
        dataListFlat: [] // 修改时赋值使用
      }],
      ruleForm: {
        mixingSignboardId: '', // 屏名称id
        proName: '', // 工程名称 [拌合站屏下拉框联动]
        constructionUnit: '', // 施工单位
        saveStamp: '',  // 施工日期
        construction: '',  // 施工部位
        infos: [{
          dictId: '',
          spec: '',
          manufacturer: '',
          watFull: '',
          planAmnt: '',
          factAmnt: '',
        }]
      },
      queryInfo: {
        pageNum: 1,
        pageSize: 9999,
        // stata: '', // 录入方式
        mixingSignboardId: '', // 拌合站屏名称
        strTime: '',
        endTime: '',
      },
    }
  },
  computed: {
    dialogTitle() {
      return this.submitMode === 'update' ? '修改' : '添加'
    },
    isUpdate() {
      return this.submitMode === 'update'
    },
  },
  created() {
    this.$http = this.$api.Materials.mixRatioSrcreen
    this.rawRuleFormInfos = {...this.ruleForm.infos[0]} // 原始的infos.添加材料使用
    this.selects.stata = [ // 录入方式
      {value: 1, label: '自动'},
      {value: 2, label: '手动'},
    ]
    this.selects.stataMap = {
      1: '自动',
      2: '手动',
    }
    this.rules = {
      mixingSignboardId: [{required: true, message: '请选择拌合站屏', trigger: 'change'}],
      proName: [{required: true, message: '请输入工程名称', trigger: 'change'}],
      constructionUnit: [{required: true, message: '请输入工程名称', trigger: 'blur'}],
      saveStamp: [{required: true, message: '请输入施工日期', trigger: 'blur'}],
      construction: [{required: true, message: '请输入施工部位', trigger: 'blur'}],
      infos: [{
        dictId: [{required: true, message: '请输入', trigger: 'blur'}],
        spec: [{required: true, message: '请输入', trigger: 'blur'}],
        manufacturer: [{required: true, message: '请输入', trigger: 'blur'}],
        watFull: [{required: true, message: '请输入', trigger: 'blur'}],
        planAmnt: [{required: true, message: '请输入', trigger: 'blur'}],
        factAmnt: [{required: true, message: '请输入', trigger: 'blur'}],
      }]
    }
    this.getLists()
    this.getScreenNames()
  },
  methods: {
    // 获取table列表数据
    getLists() {
      this.$http.getLists(this.queryInfo).then(res => {
        this.tableData = [{
          inType: '', // 录入方式
          mixingSignboardId: '', // 屏id
          createTime: '', // 创建时间
          signboardName: '', // 标识排
          proName: '', // 工程名称
          constructionUnit: '', // 施工单位
          saveStamp: '',  // 施工日期
          construction: '',  // 施工部位
          mixingConsumeId: '', // 每个材料id
          dataLists: [
            {name: '材料名称', type: 'dictName', value: []}, // 材料名称
            {name: '规格型号', type: 'spec', value: []}, // 规格型号
            {name: '生产厂家', type: 'manufacturer', value: []}, // 生产厂家
            {name: '材料含水率(%)', type: 'watFull', value: []}, // 含水率
            {name: '理论用量(kg/m³)', type: 'planAmnt', value: []}, // 理论用量
            {name: '实际用量(kg/m³)', type: 'factAmnt', value: []}, // 实际用量
          ],
          dataListFlat: [] // 修改时赋值使用
        }]
        if (res.statusMsg === 'ok' && res.data) {
          const {list} = res.data
          if (list && list.length) {
            let temps = JSON.parse(JSON.stringify(this.tableData[0]))
            list.forEach((item, index) => {
              if (!this.tableData[index]) {
                this.tableData.push(JSON.parse(JSON.stringify(temps)))
              }
              let {tmixingConsumes, signboardName, proName} = item
              let curTableData = this.tableData[index]
              curTableData.signboardName = signboardName
              curTableData.proName = proName
              if (tmixingConsumes && tmixingConsumes.length) {
                if (!curTableData.mixingSignboardId) {
                  curTableData.constructionUnit = tmixingConsumes[0].constructionUnit
                  curTableData.createTime = tmixingConsumes[0].createTime
                  curTableData.mixingSignboardId = tmixingConsumes[0].mixingSignboardId
                  curTableData.saveStamp = tmixingConsumes[0].saveStamp
                  curTableData.construction = tmixingConsumes[0].construction
                }
                tmixingConsumes.forEach(item => {
                  curTableData.dataLists.forEach(val => {
                    item[val.type] && val.value.push(item[val.type])
                  })
                  curTableData.dataListFlat.push({
                    constructionUnit: item.constructionUnit,
                    mixingConsumeId: item.mixingConsumeId,
                    dictId: item.dictId,
                    spec: item.spec,
                    manufacturer: item.manufacturer,
                    watFull: item.watFull,
                    planAmnt: item.planAmnt,
                    factAmnt: item.factAmnt,
                    star: item.star
                  })
                })
              }
            })
          }
        }
      })
    },
    //获取字典表材料名称
    async getDicFilteredData() {
      let params = {pageNum: 1, pageSize: 100000000}
      let {data} = await this.$api.Dictionary.searchDictionary(params)
      data.list.forEach(item => {
        if (item.dictType === 'pipe_materials') {
          this.selects.materials.push({
            label: item.dictName,
            value: item.dictId,
          })
        }
      })
    },
    // 获取配比屏名称
    async getScreenNames() {
      const params = {pageNum: 1, pageSize: 9999}
      let {data} = await this.$http.getScreenNames(params)
      let temps = []
      data.forEach(item => {
        temps.push({
          label: item.signboardName,
          value: item.mixingSignboardId,
          proName: item.proName,
        })
      })
      this.selects.screenNames.push(...temps)
    },
    // 查询按钮列表信息
    queryReset() {
      this.getLists()
    },
    resetForm(formName) {
      this.$refs[formName].resetFields()
      let ruleFormItem = this.ruleForm.infos[0]
      let rulesItem = this.rules.infos[0]
      this.ruleForm.infos = [{...ruleFormItem}]
      this.rules.infos = [{...rulesItem}]
    },
    showDialog() {
      // eslint-disable-next-line no-async-promise-executor
      return new Promise(async resolve => {
        if (!this.isRenderDialog) {
          this.isRenderDialog = true
        }
        if (!this.selects.materials.length) {
          await this.getDicFilteredData()
        }
        this.asyncVisible = true
        this.$nextTick(() => {
          resolve()
        })
      })
    },
    closeDialog() {
      this.asyncVisible = false
      this.resetForm('ruleForm')
    },
    addRow() {
      this.submitMode = 'add'
      this.showDialog()
    },
    updateRow(i) {
      this.submitMode = 'update'
      this.showDialog().then(() => {
        const {mixingSignboardId, proName, constructionUnit, saveStamp, construction, dataListFlat} = this.tableData[i]
        this.ruleForm = Object.assign(this.ruleForm, {
          mixingSignboardId,
          proName,
          constructionUnit,
          saveStamp,
          construction,
          infos: JSON.parse(JSON.stringify(dataListFlat))
        })
        this.changeSelectForm(mixingSignboardId)
      })
    },
    deleteRow(i) {
      this.$confirm("该操作将删除该信息,是否继续删除?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(() => {
        let star = ''
        let mixingConsumeIds = []
        this.tableData[i].dataListFlat.forEach((item, index) => {
          if (index === 0) {
            star = item.star + ''
          }
          mixingConsumeIds.push(item.mixingConsumeId)
        })
        this.$http.delete({star, mixingConsumeIds}).then(res => {
          if (res.statusMsg === 'ok') {
            this.getLists()
            this.$message.success("删除成功!")
          } else {
            this.$message.warning(res.statusMsg)
          }
        })
      })
    },
    addFormCol() {
      let ruleFormItem = this.rawRuleFormInfos
      let rulesItem = this.rules.infos[0]
      this.ruleForm.infos.push({...ruleFormItem})
      this.rules.infos.push({...rulesItem})
    },
    onSubmit(formName) {
      this.$refs[formName].validate((valid) => {
        if (!valid) return false
        const {mixingSignboardId, proName, constructionUnit, saveStamp, construction, infos} = this.ruleForm
        let newInfos = JSON.parse(JSON.stringify(infos))
        newInfos.forEach(item => {
          item.saveStamp = saveStamp
          item.construction = construction
          item.constructionUnit = constructionUnit
        })
        const params = {
          mixingSignboardId,
          proName,
          mixingConsume: newInfos
        }
        if (this.isUpdate) {
          // 更新
          this.$http.update(params).then((res) => {
            if (res.statusMsg === 'ok') {
              this.closeDialog()
              this.getLists()
              this.$message.success('更新成功!')
            } else {
              this.$message.warning(res.statusMsg)
            }
          })
        } else {
          // 添加
          this.$http.insert(params).then((res) => {
            if (res.statusMsg === 'ok') {
              this.closeDialog()
              this.getLists()
              this.$message.success('添加成功!')
            } else {
              this.$message.warning(res.statusMsg)
            }
          })
        }
      })
    },
    changeTime(times) {
      times = times || ['', '']
      this.queryInfo.strTime = times[0]
      this.queryInfo.endTime = times[1]
    },
    changeSelectForm(val) {
      let item = this.selects.screenNames.find(obj => obj.value === val)
      this.ruleForm.proName = item.proName
      this.ruleForm.constructionUnit = item.constructionUnit
    }
  }
}
</script>
<style lang="sass" scoped>
@import '../../style/layout-main.scss';
<style lang="scss" scoped>
@import '@/style/layout-main.scss';
.main_content_wrap {
  height: 100%;
  overflow: auto;
  .table {
    display: flex;
    flex-direction: column;
    font-size: 16px;
    margin-bottom: 26px;
    color: #fff;
    .row.table_head {
      display: flex;
      justify-content: space-between;
      text-align: left;
      color: #BEE2F0;
      background: rgba(1, 142, 196, .35);
      .table_head_item {
        margin: 0 20px;
        .title {
          color: #39B5FE;
          font-weight: bold;
        }
        .text {
          margin-right: 40px;
        }
      }
    }
    .row {
      flex: 1;
      width: 100%;
      height: 40px;
      margin: 0 -1px -1px 0;
      text-align: center;
      line-height: 40px;
      border: 1px solid #01B3EF;
      .name {
        display: flex;
        justify-content: center;
        align-items: center;
        float: left;
        width: 160px;
        height: 100%;
        margin: -1px -1px -1px 0;
        color: #BEE2F0;
        border: 1px solid #01B3EF;
        background: rgba(1, 142, 196, .75);
        box-sizing: unset;
      }
      .value {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100%;
        overflow: hidden;
      }
      .column {
        display: flex;
        height: 100%;
        .column-item {
          display: flex;
          justify-content: center;
          align-items: center;
          flex: 1;
          margin: -1px -1px -1px 0;
          border: 1px solid #01B3EF;
        }
      }
    }
    .row.aline {
      display: flex;
      > div {
        flex: 1;
      }
    }
  }
}
.rule_form {
  overflow-x: hidden;
  ::v-deep .el-form-item__label {
    min-width: 130px;
  }
}
</style>
web/src/views/GoodManage/MixingScreen.vue
@@ -1,17 +1,17 @@
<!-- 设备管理 ==> 拌合站屏管理-->
<!-- 物资管理 ==> 拌合站屏管理-->
<template>
  <div class="main">
    <div class="main_header">
      <div class="header_item">
        <span class="header_label">拌合站屏:</span>
        <el-select size="mini" v-model="queryInfo.screen" placeholder="请选择拌合站屏">
          <el-option v-for="item in queryInfoScreens" :key="item.value" :label="item.label"
            :value="item.value"></el-option>
        <span class="header_label">拌和站屏:</span>
        <el-select size="mini" v-model="queryInfo.types" placeholder="请选择拌和站屏" clearable>
          <el-option v-for="item in selects.screenNames" :key="item.value" :label="item.label"
            :value="item.value2"></el-option>
        </el-select>
      </div>
      <div class="header_item">
        <span class="header_label">录入方式:</span>
        <el-select size="mini" v-model="queryInfo.inmode" placeholder="请选择录入方式">
        <el-select size="mini" v-model="queryInfo.stata" placeholder="请选择录入方式" clearable>
          <el-option v-for="item in queryInfoInmodes" :key="item.value" :label="item.label"
            :value="item.value"></el-option>
        </el-select>
@@ -19,40 +19,122 @@
      <div class="header_item">
        <span class="header_label">创建时间:</span>
        <el-date-picker type="daterange" v-model="times" value-format="yyyy-MM-dd" start-placeholder="起始时间"
          end-placeholder="结束时间" @change="changeTime" clear></el-date-picker>
          end-placeholder="结束时间" @change="changeTime" clearable></el-date-picker>
      </div>
      <div class="header_item">
        <el-button icon="el-icon-search" v-permission="'search'" @click="queryReset">查询</el-button>
        <el-button icon="el-icon-plus" v-permission="'insert'" @click="addRow">新增</el-button>
        <el-button v-permission="'search'" @click="queryReset">查询</el-button>
        <el-button v-permission="'insert'" @click="addRow">新增</el-button>
      </div>
    </div>
    <div class="main_content">
      <div class="main_content_item" v-for="(item, index) in ['', '', '', '', '',]" :key="index">
      <div class="main_content_wrap">
        <div class="main_content_item" v-for="(list, index) in dataLists" :key="index">
          <el-row>
            <el-col :span="24 / list.length" v-for="(item, index) in list" :key="index">
              <div class="head">
                <span class="left_title">{{ item.siloName }}</span>
                <span v-if="index + 1 === list.length" class="right_title">录入方式: <span style="color:#39B5FE">{{
                  queryInfoInmodeMap[item.stata] }}</span></span>
              </div>
              <div class="list">
                <div class="item">
                  <span class="name">屏幕编号:</span>
                  <span class="value">{{ item.types }}</span>
                </div>
                <div class="item">
                  <span class="name">规格型号:</span>
                  <span class="value">{{ item.spec }}</span>
                </div>
                <div class="item">
                  <span class="name">产地名称:</span>
                  <span class="value">{{ item.producer }}</span>
                </div>
                <div class="item">
                  <span class="name">炉(批)号:</span>
                  <span class="value">{{ item.stove }}</span>
                </div>
                <div class="item">
                  <span class="name">进场数量:</span>
                  <span class="value">{{ item.inNum }}</span>
                </div>
                <div class="item">
                  <span class="name">进场日期:</span>
                  <span class="value">{{ item.inDate }}</span>
                </div>
                <div class="item">
                  <span class="name">检验日期:</span>
                  <span class="value">{{ item.inspectDate }}</span>
                </div>
                <div class="item">
                  <span class="name">检验状态:</span>
                  <span :class="['value', 'style' + item.inspectState]">{{ ruleFormStatuMap[item.inspectState] }}</span>
                </div>
                <div class="item">
                  <span class="name">报告编号:</span>
                  <span class="value">{{ item.reportNumber }}</span>
                </div>
              </div>
            </el-col>
          </el-row>
          <el-row class="foot">
            <el-button size="mini" v-permission="'delete'" @click="deleteRow(index)">删除</el-button>
            <el-button size="mini" v-permission="'update'" @click="updateRow(index)">修改</el-button>
          </el-row>
        </div>
      </div>
    </div>
    <!-- 详情dialog -->
    <el-dialog width="400px" class="prop_dialog" v-if="isRenderDialog" title="详情" :visible.sync="asyncVisible">
      <el-form class="rule_form" label-width="auto">
        <div class="divider"></div>
        <el-form-item label="巡检任务:">{{ info.task }}</el-form-item>
        <el-form-item label="巡检标准:">{{ info.standard }}</el-form-item>
        <el-form-item label="巡检人员:">{{ info.name }}</el-form-item>
        <div class="divider"><span>巡检路线</span></div>
        <div class="regions">
          <div class="region" v-for="     item      in      info.regions     " :key="item.regionId">{{
            item.region }}
          </div>
        </div>
    <!-- dialog -->
    <el-dialog class="prop_dialog" v-if="isRenderDialog" :title="dialogTitle" :visible.sync="asyncVisible"
      @close="closeDialog">
      <el-form ref="ruleForm" class="rule_form" :model="ruleForm" :rules="rules" label-width="auto">
        <el-form-item label="拌合站屏:" prop="name">
          <el-select size="mini" v-model="ruleForm.name" :disabled="isUpdate" placeholder="请选择拌合站屏"
            @change="changeSelectForm($event)">
            <el-option v-for="item in selects.screenNames" :key="item.value" :label="item.label"
              :value="item.value"></el-option>
          </el-select>
        </el-form-item>
        <el-row :gutter="100">
          <el-col :class="'elCol elCol' + index" :span="12" v-for="(item, index) in ruleForm.infos" :key="index">
            <el-form-item label="屏幕编号:" :prop="`infos.${index}.num`">
              <el-input v-model="item.num" size="mini" disabled></el-input>
            </el-form-item>
            <el-form-item label="规格型号:" :prop="`infos.${index}.spec`">
              <el-input v-model="item.spec" size="mini" placeholder="请输入规格型号" clearable></el-input>
            </el-form-item>
            <el-form-item label="产地名称:" :prop="`infos.${index}.producer`">
              <el-input v-model="item.producer" size="mini" placeholder="请输入产地名称" clearable></el-input>
            </el-form-item>
            <el-form-item label="炉(批)号:" :prop="`infos.${index}.stove`">
              <el-input v-model="item.stove" size="mini" placeholder="请输入炉(批)号" clearable></el-input>
            </el-form-item>
            <el-form-item label="进场数量:" :prop="`infos.${index}.inNum`">
              <el-input v-model="item.inNum" size="mini" placeholder="请输入进场数量" clearable></el-input>
            </el-form-item>
            <el-form-item label="进场日期:" :prop="`infos.${index}.inDate`">
              <el-date-picker v-model="item.inDate" size="mini" value-format="yyyy-MM-dd" placeholder="请选择检验日期"
                clearable></el-date-picker>
            </el-form-item>
            <el-form-item label="检验日期:" :prop="`infos.${index}.inspectDate`">
              <el-date-picker v-model="item.inspectDate" size="mini" value-format="yyyy-MM-dd" placeholder="请选择检验日期"
                clearable></el-date-picker>
            </el-form-item>
            <el-form-item label="检验状态:" :prop="`infos.${index}.inspectState`">
              <el-select v-model="item.inspectState" size="mini" placeholder="请选择检验状态" clearable>
                <el-option v-for="item in ruleFormStatus" :key="item.value" :label="item.label"
                  :value="item.value"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="报告编号:" :prop="`infos.${index}.reportNumber`">
              <el-input v-model="item.reportNumber" size="mini" placeholder="请输入报告编号" clearable></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer">
        <el-button @click="asyncVisible = false">取 消</el-button>
        <el-button class="submit_btn" @click="onSubmit('ruleForm')">提 交</el-button>
      </div>
    </el-dialog>
  </div>
@@ -64,75 +146,270 @@
      loading: false,
      isRenderDialog: false,
      asyncVisible: false,
      info: { // 详情信息
        task: '',
        standard: '',
        name: '',
        regions: [],
      submitMode: '', // add update
      dataLists: [],  // [[],[],[]]
      selects: {
        screenNames: [], // 拌合站屏
        screenNameIds: {}, // 拌合站屏id map
      }, // 下拉框状态选择汇总
      ruleForm: {
        name: '', // 下拉框屏名称
        mixingIds: '', // 修改id []
        infos: [{
          material: '', // 原料名称
          siloId: '', // 屏幕编号id
          num: '', // 屏幕编号
          spec: '',
          producer: '',
          stove: '',
          inNum: '',
          inDate: '',
          inspectDate: '',
          inspectState: '',
          reportNumber: '',
        }, {
          material: '',
          siloId: '', // 屏幕id
          num: '', // 屏幕编号
          spec: '',
          producer: '',
          stove: '',
          inNum: '',
          inDate: '',
          inspectDate: '',
          inspectState: '',
          reportNumber: '',
        }]
      },
      userId: '', // 存储点击后的用户id
      taskId: '', // 存储点击后的巡检任务id
      times: [], // 时间范围
      total: '',
      queryInfo: {
        pageNum: 1,
        pageSize: 10,
        inmode: '', // 录入方式
        screen: '', // 拌合站屏
        startTime: '',
        pageSize: 9999,
        stata: '', // 录入方式
        types: '', // 拌合站屏
        strTime: '',
        endTime: '',
      },
      regionInfos: { // 巡检路线详情
        isRenderDialog: false,
        asyncVisible: false,
        time: '', // 巡检时间
        region: '', // 巡检区域
        res: '', // 巡检结果
        img: '', // 上传的图片
        location: '', // 位置
      }
    }
  },
  computed: {
    dialogTitle() {
      return this.submitMode === 'update' ? '修改' : '添加'
    },
    isUpdate() {
      return this.submitMode === 'update'
    },
  },
  beforeCreate() {
    this.rules = {
      name: [{required: true, message: '请选择拌合站屏', trigger: 'change'}],
      infos: [{
        num: [{required: true, message: '请输入', trigger: 'blur'}],
        spec: [{required: true, message: '请输入', trigger: 'blur'}],
        producer: [{required: true, message: '请输入', trigger: 'blur'}],
        stove: [{required: true, message: '请输入', trigger: 'blur'}],
        inNum: [{required: true, message: '请输入', trigger: 'blur'}],
        inDate: [{required: true, message: '请输入', trigger: 'blur'}],
        inspectDate: [{required: true, message: '请输入', trigger: 'blur'}],
        inspectState: [{required: true, message: '请选择', trigger: 'blur'}],
        reportNumber: [{required: true, message: '请输入', trigger: 'blur'}],
      }, {
        spec: [{required: true, message: '请输入', trigger: 'blur'}],
        producer: [{required: true, message: '请输入', trigger: 'blur'}],
        stove: [{required: true, message: '请输入', trigger: 'blur'}],
        inNum: [{required: true, message: '请输入', trigger: 'blur'}],
        inDate: [{required: true, message: '请输入', trigger: 'blur'}],
        inspectDate: [{required: true, message: '请输入', trigger: 'blur'}],
        inspectState: [{required: true, message: '请选择', trigger: 'blur'}],
        reportNumber: [{required: true, message: '请输入', trigger: 'blur'}],
      }]
    }
    this.queryInfoInmodes = [
      {value: '0', label: '手动'},
      {value: '1', label: '自动'},
      {value: 1, label: '自动'},
      {value: 2, label: '手动'},
    ]
    this.queryInfoScreens = [
      {value: '0', label: '1-1'},
      {value: '1', label: '1-2'},
    this.queryInfoInmodeMap = {
      1: '自动',
      2: '手动',
    }
    this.ruleFormStatus = [
      {value: 1, label: '合格'},
      {value: 2, label: '不合格'},
      {value: 3, label: '待检测'},
    ]
    this.$http = this.$api.Safety.RiskGrad.polling
    this.ruleFormStatuMap = {
      1: '合格',
      2: '不合格',
      3: '待检测',
    }
    this.$http = this.$api.Materials.mixingSrcreen
  },
  created() {
    this.setTableColumn()
    this.getLists()
    this.getScreenNames()
  },
  methods: {
    // 获取table列表数据
    // 获取table列表数据 [types相同的放一个数组]
    getLists() {
      let params = this.queryInfo
      this.loading = true
      this.$http.taskcardGetlists(params).then(res => {
        if (res.statusMsg === 'ok') {
          console.log(res)
      this.$http.getLists(params).then(res => {
        if (res.statusMsg === 'ok' && res.data) {
          let tempMap = {}
          res.data.forEach(item => {
            if (!tempMap[item.types]) {
              tempMap[item.types] = []
            }
            tempMap[item.types].push({...item})
          })
          this.dataLists = Object.values(tempMap)
        }
        this.loading = false
      })
    },
    // 初始化 table 配置
    setTableColumn() {
    // 获取配比屏名称
    async getScreenNames() {
      const params = {pageNum: 1, pageSize: 9999}
      let {data} = await this.$http.getScreenNames(params)
      let tempIds = {}
      let tempTypes = {}
      data.forEach(item => {
        if (!tempIds[item.siloId]) {
          tempIds[item.siloId] = {...item}
        }
        if (!tempTypes[item.types]) {
          tempTypes[item.types] = []
        }
        tempTypes[item.types].push({...item})
      })
      let temps = []
      Object.values(tempTypes).forEach(list => {
        let value = ''
        let label = ''
        let type = ''
        list.forEach((item, index) => {
          value += item.siloId + ((index + 1) === list.length ? '' : ';')
          label += item.siloName + ((index + 1) === list.length ? '' : ';')
          type = item.types
        })
        temps.push({
          label: label,
          value: value,
          value2: type,
        })
      })
      this.selects.screenNames.push(...temps)
      this.selects.screenNameIds = tempIds
    },
    addRow() { },
    // 查询按钮列表信息
    queryReset() {
      this.queryInfo.pageNum = 1
      this.queryInfo.pageSize = 10
      this.getLists()
    },
    resetForm(formName) {
      this.$refs[formName].resetFields()
    },
    showDialog() {
      return new Promise(resolve => {
        if (!this.isRenderDialog) {
          this.isRenderDialog = true
        }
        this.asyncVisible = true
        this.$nextTick(() => {
          resolve()
        })
      })
    },
    closeDialog() {
      this.asyncVisible = false
      this.resetForm('ruleForm')
    },
    addRow() {
      this.submitMode = 'add'
      this.showDialog()
    },
    updateRow(i) {
      this.submitMode = 'update'
      this.showDialog().then(() => {
        let mixingIds = []
        let nameIds = ''
        this.dataLists[i].forEach((item, index) => {
          nameIds += item.siloId + ((index + 1) === this.dataLists[i].length ? '' : ';')
          mixingIds.push(item.siloId)
          this.ruleForm.infos[index] = Object.assign(this.ruleForm.infos[index], this.dataLists[i][index])
        })
        this.ruleForm.name = nameIds
        this.ruleForm.mixingIds = mixingIds
        this.changeSelectForm(nameIds)
      })
    },
    deleteRow(i) {
      this.$confirm("该操作将删除该信息,是否继续删除?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(() => {
        let mixingIds = []
        this.dataLists[i].forEach(item => {
          mixingIds.push(item.mixingId)
        })
        this.$http.delete({mixingIds: mixingIds}).then(res => {
          if (res.statusMsg === 'ok') {
            this.getLists()
            this.$message.success("删除成功!")
          } else {
            this.$message.warning(res.statusMsg)
          }
        })
      })
    },
    onSubmit(formName) {
      this.$refs[formName].validate((valid) => {
        if (!valid) return false
        const params = {mixingList: this.ruleForm.infos}
        if (this.isUpdate) {
          // 更新
          this.$http.update(params).then((res) => {
            if (res.statusMsg === 'ok') {
              this.closeDialog()
              this.getLists()
              this.$message.success('更新成功!')
            } else {
              this.$message.warning(res.statusMsg)
            }
          })
        } else {
          // 添加
          this.$http.insert(params).then((res) => {
            if (res.statusMsg === 'ok') {
              this.closeDialog()
              this.getLists()
              this.$message.success('添加成功!')
            } else {
              this.$message.warning(res.statusMsg)
            }
          })
        }
      })
    },
    changeSelectForm(value) {
      let ids = value && value.split(';')
      ids.forEach((item, index) => {
        this.ruleForm.infos[index].siloId = item
        this.ruleForm.infos[index].material = this.selects.screenNameIds[item].siloName
        this.ruleForm.infos[index].num = this.selects.screenNameIds[item].types
      })
    },
    changeTime(times) {
      times = times || ['', '']
      this.queryInfo.startTime = times[0]
      this.queryInfo.strTime = times[0]
      this.queryInfo.endTime = times[1]
    },
  }
@@ -142,61 +419,108 @@
<style lang="scss" scoped>
@import '@/style/layout-main.scss';
.rule_form {
  color: #fff;
  ::v-deep .el-form-item__content {
    display: block;
  }
  .image {
    flex: none;
    width: 91px;
    height: 120px;
    margin-right: 15px;
    border-radius: 5px;
    border: 1px solid #0c5983;
    img {
      width: 100%;
    }
  }
.main_content_wrap {
  height: 100%;
  overflow: auto;
}
.regions {
  text-align: center;
  .region {
    line-height: 34px;
    margin-bottom: 16px;
    background: rgba(56, 175, 247, .25);
    cursor: pointer;
  }
}
.divider {
  position: relative;
  margin-bottom: 30px;
  text-indent: 10px;
  color: #fff;
  border-left: 3px solid #18F6F8;
  &::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    padding: 20px 0;
    border-bottom: 1px solid #0C4D6F;
  }
}
.main_content .main_content_item {
.main_content_item {
  overflow: hidden;
  float: left;
  width: 48%;
  height: 200px;
  margin: 1%;
  border: 1px solid red;
  font-size: 15px;
  color: #ddd;
  border: 1px solid #39B5FE;
  border-radius: 5px;
  .el-row {
    border: 1px solid #39B5FE;
    margin: -1px;
    .el-col {
      height: 100%;
      margin: 0 0 0 -1px;
      border-left: 1px solid #39B5FE;
    }
  }
  .head {
    height: 40px;
    margin: -1px;
    line-height: 40px;
    text-indent: 30px;
    background: rgba(30, 95, 147, .6);
    border: 1px solid #39B5FE;
    .left_title {
      float: left;
    }
    .right_title {
      float: right;
      margin-right: 10px;
    }
  }
  .list {
    padding: 0 10px 20px 10px;
    .item {
      display: flex;
      flex: 1;
      margin-top: 20px;
      .name {
        margin-right: 8px;
        text-indent: 6px;
        white-space: nowrap;
      }
      .value {
        color: #39B5FE;
        &.style1 {
          font-size: 20px;
          line-height: 20px;
          color: #16F849;
        }
        &.style2 {
          font-size: 20px;
          line-height: 20px;
          color: red;
        }
        &.style3 {
          font-size: 20px;
          line-height: 20px;
          color: #FF6600;
        }
      }
    }
  }
  .foot {
    height: 40px;
    line-height: 40px;
    text-align: center;
    .el-button {
      padding: 6px 20px
    }
  }
}
.rule_form {
  overflow-x: hidden;
  .elCol0 {
    border-right: 1px solid #39B5FE;
  }
}
</style>
web/src/views/MixingInfo/mixRatio.vue
@@ -1,7 +1,7 @@
<template>
    <div class="wrap">
        <div class="header">
            <div class="header_name">中铁十四局通甬站前I标管片场拌合站</div>
            <div class="header_name">中铁十四局通甬站前I标管片场拌和站</div>
        </div>
        <div class="table">
            <div class="row title">{{ info.signboardName }}</div>
@@ -105,7 +105,7 @@
    methods: {
        getLists() {
            const params = {
                pageNum: --this.type, // 传 0 1对应两个页面
                pageNum: this.type, // 传 1 2对应两个页面
                pageSize: 1,
            }
            this.$api.Infos.getMixRatio(params).then(res => {
@@ -117,12 +117,19 @@
                        this.info.signboardName = item.signboardName
                        this.info.proName = item.proName
                        this.info.constructionUnit = item.constructionUnit
                        if (tmixingConsumes && tmixingConsumes.length) {
                            this.info.constructionUnit = tmixingConsumes[0].constructionUnit
                            this.info.saveStamp = tmixingConsumes[0].saveStamp
                            this.info.construction = tmixingConsumes[0].construction
                            this.dataLists = [
                                {name: '材料名称', type: 'dictName', value: []}, // 材料名称
                                {name: '规格型号', type: 'spec', value: []}, // 规格型号
                                {name: '生产厂家', type: 'manufacturer', value: []}, // 生产厂家
                                {name: '材料含水率(%)', type: 'watFull', value: []}, // 含水率
                                {name: '理论用量(kg/m³)', type: 'planAmnt', value: []}, // 理论用量
                                {name: '实际用量(kg/m³)', type: 'factAmnt', value: []}, // 实际用量
                            ]
                            tmixingConsumes.forEach(item => {
                                this.dataLists.forEach(val => {
                                    item[val.type] && val.value.push(item[val.type])
@@ -160,7 +167,7 @@
    background-size: 100% auto;
    .header_name {
        font-size: 1.6rem;
        font-size: 1.4rem;
        font-weight: bold;
        line-height: 3.2rem;
        letter-spacing: 2px;
@@ -179,7 +186,7 @@
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    font-size: 0.8rem;
    font-size: 0.74rem;
    color: #fff;
    .title {
@@ -193,10 +200,9 @@
    .row {
        flex: 1;
        width: 100%;
        height: 2rem;
        margin: 0 -1px -1px 0;
        text-align: center;
        line-height: 2rem;
        line-height: 1.1rem;
        border: 1px solid #01B3EF;
        .name {
web/src/views/MixingInfo/mixing.vue
@@ -1,7 +1,7 @@
<template>
    <div class="wrap">
        <div class="header">
            <div class="header_name">中铁十四局通甬站前I标管片场拌合站</div>
            <div class="header_name">中铁十四局通甬站前I标管片场拌和站</div>
        </div>
        <div class="container">
            <div class="con_name">
@@ -162,7 +162,7 @@
    background-size: 100% auto;
    .header_name {
        font-size: 1.6rem;
        font-size: 1.4rem;
        font-weight: bold;
        line-height: 3.2rem;
        letter-spacing: 2px;
@@ -174,6 +174,7 @@
}
.container {
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
@@ -207,6 +208,7 @@
        }
        .line {
            overflow: hidden;
            flex: 1;
            height: 14px;
@@ -221,6 +223,7 @@
    }
    .con_main {
        overflow: hidden;
        margin-top: 10px;
        flex: 1;
        display: flex;
@@ -255,13 +258,13 @@
                float: left;
                width: 50%;
                height: 100%;
                min-height: 480px;
                text-align: center;
                > p {
                    position: absolute;
                    left: 50%;
                    top: 21%;
                    top: 18%;
                    font-size: 0.7rem;
                    white-space: nowrap;
                    transform: translate(-50%, -50%);
                }