111
k94314517
2023-08-18 709298cfae022fb0753d27c4d4143e93284fe22e
111
已修改5个文件
48 ■■■■■ 文件已修改
server/src/main/java/doumeemes/service/ext/impl/PlansExtServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/src/main/java/doumeemes/service/ext/impl/WorkorderExtServiceImpl.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/src/main/java/doumeemes/service/ext/impl/WorkorderRecordStandardServiceImpl.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/src/main/java/doumeemes/service/system/impl/WxLoginServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/src/main/resources/mappers/PlansExtMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/src/main/java/doumeemes/service/ext/impl/PlansExtServiceImpl.java
@@ -661,6 +661,8 @@
        order.setUrgent(mp.getUrgent());
        order.setFactoryId(mp.getFactoryId());
        order.setBackorderId(mp.getBackorderId());
        order.setUnqualifiedNum(param.getUnqualifiedNum());
        order.setQualifiedNum(param.getQualifiedNum());
        order.setOriginId(systemDictDataBiz.queryByCode(Constants.WORKORDER_SOURCE,Constants.WORKORDER_SOURCE_PLAN).getId());
        //工单编码
        order.setCode(workorderExtService.getNextCode(user.getCompany().getId()));
@@ -1626,6 +1628,8 @@
        param.setProUserList(autoWorkReportDTO.getProUserList());
        param.setPlanNum(num.intValue());
        //生成工单信息
        param.setUnqualifiedNum(autoWorkReportDTO.getCreateWorkorderRecordDTO().getUnQualifiedNum().intValue());
        param.setQualifiedNum(autoWorkReportDTO.getCreateWorkorderRecordDTO().getQualifiedNum().intValue());
        Workorder workorder = this.distributeDone(user,param,num.intValue());
        //工单投料记录
        CreateMaterialDTO createMaterialDTO = new CreateMaterialDTO();
server/src/main/java/doumeemes/service/ext/impl/WorkorderExtServiceImpl.java
@@ -755,7 +755,7 @@
     * @param param
     */
    @Override
    @Async
//    @Async
    public void statisticNum(Workorder param){
        if(param.getPlanId()== null){
            if(param.getId()== null){
@@ -828,14 +828,10 @@
                            && item.getOmodel()!=null
                            && (Constants.equalsInteger(item.getOmodel().getStatus() ,Constants.WORKORDER_STATUS.baogong)
                            ||Constants.equalsInteger(item.getOmodel().getStatus() ,Constants.WORKORDER_STATUS.instock))){
                            //如果是产出
                            if(Constants.equalsInteger(item.getDoneType(),Constants.ZERO)){
                                //如果是合格产出,累计数量
                                qulifiedNum += Constants.formatBigdecimal(item.getNum()).intValue();
                            }else{
                                //如果是不良产出,累计数量
                                unqulifiedNum += Constants.formatBigdecimal(item.getNum()).intValue();
                            }
                            //如果是合格产出,累计数量
                            qulifiedNum += Constants.formatBigdecimal(BigDecimal.valueOf(item.getQualifiedNum())).intValue();
                            //如果是不良产出,累计数量
                            unqulifiedNum += Constants.formatBigdecimal(BigDecimal.valueOf(item.getUnqualifiedNum())).intValue();
                        }
                    }
                }
@@ -858,7 +854,7 @@
            if(!Objects.isNull(plan.getWorkPlansId())){
                //更新主订单数据信息
               if(plansMapper.selectCount(new QueryWrapper<Plans>()
                        .in("STATUS",0,1,4)
                        .in("STATUS",0,1,4,5)
                        .eq("DELETED",Constants.ZERO)
                        .ne("id",p.getId())
                        .eq("WORK_PLANS_ID",plan.getWorkPlansId()))<=Constants.ZERO){
server/src/main/java/doumeemes/service/ext/impl/WorkorderRecordStandardServiceImpl.java
@@ -830,13 +830,14 @@
            if (bomDetailList == null || bomDetailList.size() == 0) {
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对不起,该生产物料的bom配置有误,请联系管理员!");
            }
//            for (BomDetailExtListVO i :bomDetailList) {
//                //查询是否投料
//                if(workorderRecordExtMapper.selectCount(new QueryWrapper<WorkorderRecord>()
//                        .eq("DELETED",Constants.ZERO).eq("MATERIAL_ID",i.getMaterialId()).eq("TYPE",Constants.ZERO))<=0){
//                    throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"存在未投料BOM物料,无法进行报工");
//                }
//            }
            for (BomDetailExtListVO i :bomDetailList) {
                //查询是否投料
                if(workorderRecordExtMapper.selectCount(new QueryWrapper<WorkorderRecord>()
                                .eq("WORKORDER_ID",mp.getId())
                        .eq("DELETED",Constants.ZERO).eq("MATERIAL_ID",i.getMaterialId()).eq("TYPE",Constants.ZERO))<=0){
                    throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"存在未投料BOM物料,无法进行报工");
                }
            }
        }
        WOutbound outbound = new WOutbound();
server/src/main/java/doumeemes/service/system/impl/WxLoginServiceImpl.java
@@ -11,6 +11,7 @@
import doumeemes.core.utils.Constants;
import doumeemes.core.utils.HttpsUtil;
import doumeemes.core.utils.Utils;
import doumeemes.dao.business.model.Company;
import doumeemes.dao.business.model.CompanyUser;
import doumeemes.dao.business.model.Department;
import doumeemes.dao.ext.CompanyExtMapper;
@@ -69,6 +70,8 @@
    @Autowired
    private SystemLoginLogService systemLoginLogService;
    @Autowired
    private CompanyExtMapper companyExtMapper;
    /**
@@ -107,6 +110,11 @@
        if(Objects.isNull(department)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到绑定部门信息");
        }
        Company company = companyExtMapper.selectById(department.getCompanyId());
        if(Objects.isNull(company)||company.getStatus().equals(Constants.ONE)){
            wxLoginVO.setLoginStatus(Constants.ONE);
            return wxLoginVO;
        }
        SystemUser systemUser = systemUserMapper.selectById(companyUser.getUserId());
        //查询用户数据
        LoginDTO dto = new LoginDTO();
@@ -137,6 +145,9 @@
            wxLoginVO.setLoginStatus(Constants.ZERO);
            wxLoginVO.setSession(session);
            return wxLoginVO;
        }catch (BusinessException e) {
            wxLoginVO.setLoginStatus(Constants.ONE);
            return wxLoginVO;
        }catch (AuthenticationException e) {
            BusinessException ee = null;
            loginLog.setSuccess(Boolean.FALSE);
server/src/main/resources/mappers/PlansExtMapper.xml
@@ -778,7 +778,7 @@
<!--        AND   #{endDate} >= `a`.`PLAN_DATE`-->
<!--      </if>-->
      <if test="mixParam != null and mixParam!=''">
        AND  (mmodel.name like concat('%',#{mixParam},'%') or mmodel.code like concat('%',#{mixParam},'%') or pmodel.name like concat('%',#{mixParam},'%'))
        AND  (mmodel.name like concat('%',#{mixParam},'%') or mmodel.code like concat('%',#{mixParam},'%') or pmodel.name like concat('%',#{mixParam},'%')  or a.BATCH like concat('%',#{mixParam},'%') or w.SALESORDER like concat('%',#{mixParam},'%') )
      </if>
      <if test="usermodelInvalidTime != null">
        AND `usermodel`.`INVALID_TIME` = #{usermodelInvalidTime}