张晓波
2023-12-04 b58e87a6463ebf5109c49489c35260d7e8708653
人脸
缓存同步菜单
已修改7个文件
83 ■■■■■ 文件已修改
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/controller/ModCheckController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/entity/ModCheckDto.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/entity/RingCompleteCheck.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/service/ModCheckService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/service/impl/ModCheckServiceImpl.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/mapper/PipeInfoMapper.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/mobile/src/main/resources/mapping/PipeInfoMapper.xml 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/controller/ModCheckController.java
@@ -34,6 +34,12 @@
        return BasicResult.success();
    }
    @RequestMapping("allNumType")
    public BasicResult allNumType(){
        List<Integer> list = modCheckService.allNumType();
        return BasicResult.success(list);
    }
    @RequestMapping("addPipe")
    public BasicResult addPipe(@RequestBody ModCheckDto modCheckDto){
        modCheckService.addPipe(modCheckDto);
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/entity/ModCheckDto.java
@@ -24,4 +24,6 @@
    private String proId;
    private String ringNum;
    private Integer numType;
}
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/entity/RingCompleteCheck.java
@@ -13,4 +13,9 @@
    private Integer isExist;
    private String pipeModNum;
    private String allModNum;
}
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/service/ModCheckService.java
@@ -20,4 +20,6 @@
    void delete(ModCheckDto modCheckDto);
    Map<String,Object> getH5MouldInfo(String mouldId);
    List<Integer> allNumType();
}
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/service/impl/ModCheckServiceImpl.java
@@ -159,7 +159,7 @@
                            pipeInfo.setOutMod(PipeOutModType.IN.getValue()); //入模
                            pipeInfo.setPipeNum(UUIDUtils.createPipeNum(proNumber,countPipeInPro));
                            //pipeInfo.setRingNum();
                            RingCompleteCheck completeCheck = pipeInfoMapper.queryRingComplete(pipeInfo);
                            RingCompleteCheck completeCheck = pipeInfoMapper.queryRingCompleteByMod(mould.getMouldNum(),pipeInfo.getProId());
                            if(completeCheck==null){
                                int maxRingNum = pipeInfoMapper.queryMaxRingNum(userInfo.getCompanyId());
                                pipeInfo.setRingNum(UUIDUtils.createRingNum(maxRingNum));
@@ -219,7 +219,7 @@
            throw new BasicException(BasicStatus.RING_NUM_IS_REPEAT);
        }
        List<Mould> mouldList = pipeInfoMapper.queryMouldTypeByPro(proId);
        List<Mould> mouldList = pipeInfoMapper.queryMouldByNumType(proId,modCheckDto.getNumType());
        /*mouldList.forEach(ml->{
            ml = mouldMapper.queryById(ml.getMouldId());
        });*/
@@ -238,7 +238,7 @@
        steelProduce.setReinforcementId("02d336f47ea0eff7ec70c64f"); //配筋写死值
        for(Mould m : mouldList){
            m = mouldMapper.queryById(m.getMouldId());
            //m = mouldMapper.queryById(m.getMouldId());
            String proNumber = steelProduceMapper.queryProNumByProject(proId);
            int maxSteelNum = pipeInfoMapper.queryMaxNumBySteelProduce();
            steelProduce.setProduceNumber(UUIDUtils.createSteelNum(proNumber,maxSteelNum));
@@ -296,6 +296,8 @@
        }*/
    }
    @Override
    public List<MouldCheckListVo> findModCheckList(ModCheckDto modCheckDto) {
        SysUserInfo userInfo = UserInfoUtils.getInstance().getUserInfo();
@@ -344,4 +346,8 @@
        return mouldMapper.getH5MouldInfo(mouldId);
    }
    @Override
    public List<Integer> allNumType() {
        return pipeInfoMapper.queryAllNumType();
    }
}
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/mapper/PipeInfoMapper.java
@@ -63,6 +63,8 @@
    RingCompleteCheck queryRingComplete(PipeInfo pipeinfo);
    RingCompleteCheck queryRingCompleteByMod(String mouldNum,String proId);
    int queryMaxRingNum(String companyId);
    void updateCheckResult(PipeInfo pipeInfo);
@@ -150,6 +152,8 @@
    List<Mould> queryMouldTypeByPro(String proId);
    List<Mould> queryMouldByNumType(@Param("proId")String proId,@Param("numType")Integer numType);
    int queryMaxNumBySteelProduce();
    int countByRingNum(String ringNum);
@@ -169,4 +173,6 @@
    void updateOutWaterTime(PipeCultivated pipeCultivated);
    void updateInRepoTime(RepoRecord repoRecord);
    List<Integer> queryAllNumType();
}
hd/pipe/mobile/src/main/resources/mapping/PipeInfoMapper.xml
@@ -490,6 +490,25 @@
                      )c where c.isExist = 0 order by c.ringnum limit 1
    </select>
    <select id="queryRingCompleteByMod" resultType="com.thhy.mobile.modules.biz.mouldcheck.entity.RingCompleteCheck">
        select a.ringnum,a.pipeModNum,a.allModNum
        from
            (
                select tpi.ring_num as ringnum,GROUP_CONCAT(sm.mould_num order by sm.mould_num) as pipeModNum,
                       (
                           select GROUP_CONCAT(sm1.mould_num order by sm1.mould_num)
                           from sys_mould sm1
                           where SUBSTRING_INDEX(sm1.mould_num,'-',-1) = SUBSTRING_INDEX(#{mouldNum},'-',-1) and sm1.is_use = 1 and sm1.pro_id = #{proId}
                           group by sm1.is_use
                       ) as allModNum
                from t_pipe_info tpi
                         left join sys_mould sm on sm.mould_id = tpi.mod_id
                where SUBSTRING_INDEX(sm.mould_num,'-',-1) = SUBSTRING_INDEX(#{mouldNum},'-',-1) and sm.is_use = 1 and tpi.pro_id = #{proId}
                GROUP BY tpi.ring_num
            ) a
        where a.pipeModNum != a.allModNum and a.pipeModNum not LIKE CONCAT('%',#{mouldNum},'%')
    </select>
    <select id="queryMaxRingNum" resultType="int">
        select case when a.maxRingNum is null then 1 else a.maxRingNum end as maxRingNum
        from
@@ -827,6 +846,32 @@
        group by m.mould_type
    </select>
    <select id="queryMouldByNumType" resultType="com.thhy.mobile.modules.biz.mouldcheck.entity.Mould">
        select
            t.mould_id as mouldId,
            t.come_factory_time as comeFactoryTime,
            t.create_time as createTime,
            t.create_user as createUser,
            t.current_cycle_time as currentCycleTime,
            t.is_use as isUse,
            t.max_cycle_time as maxCycleTime,
            t.mould_code as mouldCode,
            t.mould_num as mouldNum,
            t.mould_size as mouldSize,
            t.mould_turn as mouldTurn,
            t.mould_type as mouldType,
            t.pro_id as proId,
            t.product_date as productDate,
            t.status as status,
            t.supplier_id as supplierId,
            t.update_time as updateTime,
            t.update_user as updateUser,
            t.grouting_holes as groutingHoles,
            t.free
        from sys_mould t
        where t.pro_id = #{proId} and SUBSTRING_INDEX(t.mould_num,'-',-1) = #{numType}
    </select>
    <select id="queryMaxNumBySteelProduce" resultType="int">
        select
            max(a.number)
@@ -922,4 +967,9 @@
    <update id="updateInRepoTime">
        update t_repo_record set create_time = #{createTime} where record_id =#{recordId}
    </update>
    <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>
</mapper>