diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesPrepareServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesPrepareServiceImpl.java index ef37bf94..db84819b 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesPrepareServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesPrepareServiceImpl.java @@ -248,40 +248,40 @@ public class MesPrepareServiceImpl implements IMesPrepareService { //报工 public void reportWorkByFactory(String poolName) { MesReportWork mesReportWork = new MesReportWork(); - mesReportWork.setUploadStatus("1");//除了1报工成功的,都需要报工 - mesReportWork.setProdType("prod"); - List reportWorks = mesReportWorkMapper.getReportWorkList(mesReportWork); - for(MesReportWork work:reportWorks) { - SapRFW sapRFW = new SapRFW(); - sapRFW.setAufnr(work.getWorkorderCodeSap());//虚拟工单号 - sapRFW.setGamng(work.getQuantityFeedback().toString());//报工数量 - SapRFW.lt_gs ltgs = sapRFW.getLt_gs();//生产订单报工工时修改 - ltgs.setConf_activity1(work.getSac1());//人工 - ltgs.setConf_activity2(work.getSac2()); - ltgs.setConf_activity3(work.getSac3()); - ltgs.setConf_activity4(work.getSac4()); - ltgs.setConf_activity5(work.getSac5()); - ltgs.setConf_activity6(work.getSac6()); - SapRFW.lt_hw lthw = sapRFW.getLt_hw();//MES生产订单报工货物移动修改 - lthw.setEntry_qnt(work.getQuantityFeedback().toString());//TODO; - lthw.setMaterial(work.getProcessCode()); - R r = remoteSapService.sapRFWOrder(sapRFW); - //上传成功,更改mes_report_work状态 - if (r.getCode() == 200) { - work.setUploadStatus("1"); - } else { - work.setUploadStatus("2"); - work.setUploadMsg(r.getMsg()); - } - work.setUploadTime(DateUtils.getNowDate()); - mesReportWorkMapper.updateSyncSapStatus(work); - //关闭订单 - remoteSapService.sapCloseOrder(work.getOrderCode()); - //pro_work_order status->w4报工 - work.setStatus("w4"); - work.setUpdateTime(DateUtils.getNowDate()); - mesReportWorkMapper.updateWorkOrderStatus(work); - } +// mesReportWork.setUploadStatus("1");//除了1报工成功的,都需要报工 +// mesReportWork.setProdType("prod"); +// List reportWorks = mesReportWorkMapper.getReportWorkList(mesReportWork); +// for(MesReportWork work:reportWorks) { +// SapRFW sapRFW = new SapRFW(); +// sapRFW.setAufnr(work.getWorkorderCodeSap());//虚拟工单号 +// sapRFW.setGamng(work.getQuantityFeedback().toString());//报工数量 +// SapRFW.lt_gs ltgs = sapRFW.getLt_gs();//生产订单报工工时修改 +// ltgs.setConf_activity1(work.getSac1());//人工 +// ltgs.setConf_activity2(work.getSac2()); +// ltgs.setConf_activity3(work.getSac3()); +// ltgs.setConf_activity4(work.getSac4()); +// ltgs.setConf_activity5(work.getSac5()); +// ltgs.setConf_activity6(work.getSac6()); +// SapRFW.lt_hw lthw = sapRFW.getLt_hw();//MES生产订单报工货物移动修改 +// lthw.setEntry_qnt(work.getQuantityFeedback().toString());//TODO; +// lthw.setMaterial(work.getProcessCode()); +// R r = remoteSapService.sapRFWOrder(sapRFW); +// //上传成功,更改mes_report_work状态 +// if (r.getCode() == 200) { +// work.setUploadStatus("1"); +// } else { +// work.setUploadStatus("2"); +// work.setUploadMsg(r.getMsg()); +// } +// work.setUploadTime(DateUtils.getNowDate()); +// mesReportWorkMapper.updateSyncSapStatus(work); +// //关闭订单 +// remoteSapService.sapCloseOrder(work.getOrderCode()); +// //pro_work_order status->w4报工 +// work.setStatus("w4"); +// work.setUpdateTime(DateUtils.getNowDate()); +// mesReportWorkMapper.updateWorkOrderStatus(work); +// } } public static void main(String args[]) { List list = new ArrayList<>(); diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml index 34401f48..c10cc1b8 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml @@ -445,7 +445,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java b/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java index 49ba4034..eef5e8e8 100644 --- a/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java +++ b/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java @@ -205,7 +205,7 @@ public class OpenServiceImpl implements OpenService { ){ logger.info("工单请求关闭:调用remoteSapService.sapCloseOrder,参数:"+work.getWorkorderCodeSap()); - //工单完成,关闭工单 + //工单完成,关闭母工单 List sapWorkOrders = openMapper.getSapWorkOrder(work.getWorkorderCode());//根据belong_work_order找到所有要关闭的虚拟工单 for(String sapWorkOrder:sapWorkOrders){ R rclose = remoteSapService.sapCloseOrder(sapWorkOrder); diff --git a/op-modules/op-open/src/main/resources/mapper/open/OpenMapper.xml b/op-modules/op-open/src/main/resources/mapper/open/OpenMapper.xml index 40ab74ce..6057fab1 100644 --- a/op-modules/op-open/src/main/resources/mapper/open/OpenMapper.xml +++ b/op-modules/op-open/src/main/resources/mapper/open/OpenMapper.xml @@ -124,7 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java index 9ed1c960..fc41f382 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java @@ -522,9 +522,6 @@ public class ProOrderServiceImpl implements IProOrderService { failOrder = proOrder.getOrderCode(); logger.info("=======订单"+failOrder+"同步失败"); } -// else {//关闭订单 -// remoteSapService.sapCloseOrder(proOrder.getOrderCode()); -// } } return failOrder; } diff --git a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java index d5f4972e..ce1bf79c 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java @@ -294,6 +294,8 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService { //顺序母子 Collections.reverse(wids); Collections.reverse(wcodes); + Collections.reverse(ordercodes); + sapList = new ArrayList<>(); SapCreateOrder sap = new SapCreateOrder(); sap.setWerks(whiteOrder.getFactoryCode());//工厂编码 @@ -346,11 +348,11 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService { //获取领料单 this.getMesPrepare(returnCodes,wcodes); - //关闭订单//订单的订单编码 - for(String orderCode:ordercodes){ - R closeR= remoteSapService.sapCloseOrder(orderCode); - logger.info(workorderId+"下发工单后关闭母订单"+orderCode+":"+closeR.getMsg()); - } + //关闭母订单子订单会自动关闭//订单的订单编码 + //for(String orderCode:ordercodes){ + R closeR= remoteSapService.sapCloseOrder(ordercodes.get(0)); + logger.info(workorderId+"下发工单后关闭母订单"+ordercodes.get(0)+":"+closeR.getMsg()); + //} //下达工单 String[] idsArrayAll = (String[])wids.toArray(new String[wids.size()]); proOrderWorkorderMapper.downWorkorders(idsArrayAll); diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QuaController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QuaController.java index d242a381..fc0cc81e 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/controller/QuaController.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QuaController.java @@ -2,18 +2,18 @@ package com.op.quality.controller; import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder; import com.op.common.core.domain.R; +import com.op.common.core.utils.DateUtils; import com.op.common.core.utils.StringUtils; import com.op.common.core.web.controller.BaseController; import com.op.common.core.web.domain.AjaxResult; import com.op.common.core.web.page.TableDataInfo; +import com.op.common.security.utils.SecurityUtils; import com.op.quality.domain.*; -import com.op.quality.service.IQcCheckTaskProduceService; -import com.op.quality.service.IQcCheckTaskWarehousingService; -import com.op.quality.service.IQcCheckTypeService; -import com.op.quality.service.QcProCheckService; +import com.op.quality.service.*; import com.op.system.api.RemoteMesService; import com.op.system.api.domain.dto.WCSDTO; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.*; import java.util.List; @@ -40,6 +40,9 @@ public class QuaController extends BaseController { @Autowired private IQcCheckTypeService qcCheckTypeService; + @Autowired + private IQcCheckTaskIncomeService qcCheckTaskIncomeService; + @PostMapping("/saveQcProCheck") public R saveQcProCheck(@RequestBody QcProCheck qcProCheck) { DynamicDataSourceContextHolder.push("ds_"+qcProCheck.getFactoryCode()); @@ -177,10 +180,37 @@ public class QuaController extends BaseController { */ @GetMapping(value = "getCheckTaskList") public AjaxResult getCheckTaskList(QcCheckTaskIncome qcCheckTaskIncome) { -// if(StringUtils.isBlank(qcCheckType.getFactoryCode())){ -// return error("[factoryCode]不能为空"); -// } -// return success(qcCheckTypeService.getCheckType(qcCheckType)); - return null; + if(StringUtils.isBlank(qcCheckTaskIncome.getFactoryCode())){ + return error("[factoryCode]不能为空"); + } + if(StringUtils.isBlank(qcCheckTaskIncome.getCheckType())){ + return error("[checkType]不能为空"); + } + if(StringUtils.isBlank(qcCheckTaskIncome.getCheckManCode())){ + return error("[checkManCode]不能为空"); + } + return success(qcProCheckService.getCheckTaskList(qcCheckTaskIncome)); + } + /** + * 获取待检验信息列表 + */ + @GetMapping(value = "getCheckTaskDetailList") + public AjaxResult getCheckTaskDetailList(QcCheckTaskDetail qcCheckTaskDetail) { + if(StringUtils.isBlank(qcCheckTaskDetail.getFactoryCode())){ + return error("[factoryCode]不能为空"); + } + if(StringUtils.isBlank(qcCheckTaskDetail.getBelongTo())){ + return error("[belongTo]不能为空"); + } + return success(qcProCheckService.getCheckTaskDetailList(qcCheckTaskDetail)); + } + /**检测结果提交**/ + @PostMapping("/commitCheckResults") + public AjaxResult commitCheckResults(@RequestBody List details) { + if(CollectionUtils.isEmpty(details)){ + return error("[List]不能为空"); + } + return toAjax(qcCheckTaskIncomeService.commitCheckResults(details)); } + } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java index 6aef89b5..0f66846d 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java @@ -25,7 +25,7 @@ public class QcCheckTaskIncome extends BaseEntity { private String checkNo; /** 来料批次号 */ - @Excel(name = "来料批次号") + @Excel(name = "批次号") private String incomeBatchNo; /** 订单号 */ diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskWarehousing.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskWarehousing.java index d75d4a5e..c267cb33 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskWarehousing.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskWarehousing.java @@ -58,7 +58,7 @@ public class QcCheckTaskWarehousing extends BaseEntity { /** 来料时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @Excel(name = "来料时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "入库时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date incomeTime; /** 检测地点 */ diff --git a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskIncomeMapper.java b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskIncomeMapper.java index 71fb885f..f5b04059 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskIncomeMapper.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskIncomeMapper.java @@ -8,6 +8,7 @@ import com.op.quality.domain.QcCheckTaskIncome; import com.op.quality.domain.QcSupplier; import com.op.system.api.domain.SysUser; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 来料检验Mapper接口 @@ -74,4 +75,8 @@ public interface QcCheckTaskIncomeMapper { int getTodayMaxNum(QcCheckTaskIncome qcCheckTaskIncome); List getCkeckProjectList(QcCheckTaskDetail qcCheckTaskDetail); + + int updateQcCheckTask(QcCheckTaskIncome qcCheckTask); + + int updateQcCheckTaskDetails(@Param("list") List details); } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcProCheckMapper.java b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcProCheckMapper.java index a64b5c60..f68842a6 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcProCheckMapper.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcProCheckMapper.java @@ -2,6 +2,7 @@ package com.op.quality.mapper; import com.op.common.core.domain.BaseFileData; import com.op.common.core.domain.R; +import com.op.quality.domain.QcCheckTaskIncome; import com.op.quality.domain.QcProCheck; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -34,4 +35,6 @@ public interface QcProCheckMapper { List getEquipmentList(QcProCheck qcProCheck); List getDictList(QcProCheck qcProCheck); + + List getCheckTaskList(QcCheckTaskIncome qcCheckTaskIncome); } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskIncomeService.java b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskIncomeService.java index 72cb2094..a6a50886 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskIncomeService.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskIncomeService.java @@ -76,5 +76,8 @@ public interface IQcCheckTaskIncomeService { int commitCheckResult(QcCheckTaskIncome qcCheckTaskIncome); + int commitCheckResults(List details); + List getDefectList(QcDefectType qcDefectType); + } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTypeService.java b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTypeService.java index a2588c9e..84478087 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTypeService.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTypeService.java @@ -1,6 +1,8 @@ package com.op.quality.service; import java.util.List; + +import com.op.quality.domain.QcCheckTaskIncome; import com.op.quality.domain.QcCheckType; /** @@ -61,4 +63,6 @@ public interface IQcCheckTypeService { List getCheckType(QcCheckType qcCheckType); List getTopTaskInfo(QcCheckType qcCheckType); + + } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/QcProCheckService.java b/op-modules/op-quality/src/main/java/com/op/quality/service/QcProCheckService.java index ca4bf249..46bb5cc0 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/QcProCheckService.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/QcProCheckService.java @@ -3,6 +3,7 @@ package com.op.quality.service; import com.op.common.core.domain.R; //import com.op.quality.domain.BaseFile; import com.op.quality.domain.QcCheckTaskDetail; +import com.op.quality.domain.QcCheckTaskIncome; import com.op.quality.domain.QcCheckTypeProject; import com.op.quality.domain.QcProCheck; @@ -30,4 +31,7 @@ public interface QcProCheckService { List getDictList(QcProCheck qcProCheck); + List getCheckTaskList(QcCheckTaskIncome qcCheckTaskIncome); + + List getCheckTaskDetailList(QcCheckTaskDetail qcCheckTaskDetail); } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java index e0cd35b5..584aa143 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java @@ -6,6 +6,7 @@ import java.util.List; import com.alibaba.fastjson2.JSONArray; import com.baomidou.dynamic.datasource.annotation.DS; +import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder; import com.op.common.core.utils.DateUtils; import com.op.common.core.utils.uuid.IdUtils; import com.op.common.security.utils.SecurityUtils; @@ -13,6 +14,8 @@ import com.op.quality.domain.*; import com.op.quality.mapper.*; import com.op.quality.service.IQcCheckTaskProduceService; import com.op.system.api.domain.SysUser; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.op.quality.service.IQcCheckTaskIncomeService; @@ -31,6 +34,7 @@ import javax.servlet.http.HttpServletRequest; */ @Service public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { + protected Logger logger = LoggerFactory.getLogger(getClass()); @Autowired private QcCheckTaskIncomeMapper qcCheckTaskIncomeMapper; @@ -190,8 +194,8 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { return qcCheckTaskIncomeMapper.getQcListSupplier(qcSupplier); } - //在公共库里不需要切库 @Override + @DS("master") public List getQcListUser(SysUser sysUser) { return qcCheckTaskIncomeMapper.getQcListUser(sysUser); } @@ -285,4 +289,54 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { return qcCheckUnqualifiedMapper.getDefectList(qcDefectType); } + @Override + public int commitCheckResults(List details) { + DynamicDataSourceContextHolder.push("ds_"+details.get(0).getFactoryCode()); + Date nowTime = DateUtils.getNowDate(); + String factoryCode = details.get(0).getFactoryCode(); + String updateBy = details.get(0).getUpdateBy(); + String belongId = details.get(0).getBelongTo(); + + //默认合格 + String result = "Y"; + for(QcCheckTaskDetail detail:details){ + if("N".equals(detail.getStatus())){ + result = "N";//不合格 + break; + } + } + + int n = 0; + QcCheckTaskIncome qcCheckTask = new QcCheckTaskIncome(); + qcCheckTask.setUpdateBy(updateBy); + qcCheckTask.setRecordId(belongId); + qcCheckTask.setCheckResult("2");//检测状态0待检测1检测中2检测完成 + qcCheckTask.setUpdateTime(nowTime); + qcCheckTask.setCheckResult(result);//检验结果Y合格 N不合格 + /**qc_check_task**/ + n = qcCheckTaskIncomeMapper.updateQcCheckTask(qcCheckTask); + logger.info("qc_check_task:"+n); + /**更新qc_check_task_detail**/ + for(QcCheckTaskDetail detail:details){ + + } + + n= qcCheckTaskIncomeMapper.updateQcCheckTaskDetails(details);; + logger.info("更新qc_check_task_detail:"+n); + //不合格处理 + if("N".equals(result)){ +// QcCheckUnqualified unqualified = new QcCheckUnqualified(); +// unqualified.setId(IdUtils.fastSimpleUUID()); +// unqualified.setTaskId(qcCheckTaskIncome.getRecordId()); +// unqualified.setCreateTime(DateUtils.getNowDate()); +// unqualified.setCreateBy(qcCheckTaskIncome.getUpdateBy()); +// unqualified.setFactoryCode(factoryCode); +// unqualified.setType(qcCheckTaskIncome.getCheckType()); +// /**qc_check_unqualified**/ +// qcCheckUnqualifiedMapper.insertQcCheckUnqualified(unqualified); + } + + return n ; + } + } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcCheckReportIncomeServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcCheckReportIncomeServiceImpl.java index aa75c98f..aeb97d41 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcCheckReportIncomeServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcCheckReportIncomeServiceImpl.java @@ -2,6 +2,7 @@ package com.op.quality.service.serviceImpl; import com.alibaba.fastjson2.JSONArray; import com.baomidou.dynamic.datasource.annotation.DS; +import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder; import com.op.common.core.utils.DateUtils; import com.op.common.core.utils.uuid.IdUtils; import com.op.common.security.utils.SecurityUtils; @@ -176,8 +177,8 @@ public class QcCheckReportIncomeServiceImpl implements IQcCheckReportIncomeServi return qcCheckReportIncomeMapper.getQcListSupplier(qcSupplier); } - //在公共库里不需要切库 @Override + @DS("master") public List getQcListUser(SysUser sysUser) { return qcCheckReportIncomeMapper.getQcListUser(sysUser); } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcCheckReportProduceServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcCheckReportProduceServiceImpl.java index 45ea3f41..1feb3952 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcCheckReportProduceServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcCheckReportProduceServiceImpl.java @@ -178,7 +178,7 @@ public class QcCheckReportProduceServiceImpl implements IQcCheckReportProduceSer return qcCheckReportIncomeMapper.getQcListSupplier(qcSupplier); } - //在公共库里不需要切库 + @DS("master") @Override public List getQcListUser(SysUser sysUser) { return qcCheckReportIncomeMapper.getQcListUser(sysUser); diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcCheckReportProductServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcCheckReportProductServiceImpl.java index f415b74c..8c34e2c2 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcCheckReportProductServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcCheckReportProductServiceImpl.java @@ -178,7 +178,7 @@ public class QcCheckReportProductServiceImpl implements IQcCheckReportProductSer return qcCheckReportIncomeMapper.getQcListSupplier(qcSupplier); } - //在公共库里不需要切库 + @DS("master") @Override public List getQcListUser(SysUser sysUser) { return qcCheckReportIncomeMapper.getQcListUser(sysUser); diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcProCheckServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcProCheckServiceImpl.java index 037557f3..005a118d 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcProCheckServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcProCheckServiceImpl.java @@ -8,6 +8,7 @@ import com.op.common.core.utils.StringUtils; import com.op.common.core.utils.uuid.IdUtils; import com.op.common.security.utils.SecurityUtils; import com.op.quality.domain.QcCheckTaskDetail; +import com.op.quality.domain.QcCheckTaskIncome; import com.op.quality.domain.QcCheckTypeProject; import com.op.quality.domain.QcProCheck; import com.op.quality.mapper.QcCheckTaskIncomeMapper; @@ -114,4 +115,16 @@ public class QcProCheckServiceImpl implements QcProCheckService { return qcProCheckMapper.getDictList(qcProCheck); } + @Override + public List getCheckTaskList(QcCheckTaskIncome qcCheckTaskIncome) { + DynamicDataSourceContextHolder.push("ds_"+qcCheckTaskIncome.getFactoryCode()); + return qcProCheckMapper.getCheckTaskList(qcCheckTaskIncome); + } + + @Override + public List getCheckTaskDetailList(QcCheckTaskDetail qcCheckTaskDetail) { + DynamicDataSourceContextHolder.push("ds_"+qcCheckTaskDetail.getFactoryCode()); + return qcCheckTaskIncomeMapper.getCkeckProjectList(qcCheckTaskDetail); + } + } diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml index 2ec646de..37ede2ca 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml @@ -131,12 +131,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" td.create_time createTime, td.update_by updateBy, td.update_time updateTime, + td.update_time updateTime, + td.belong_to belongTo, qctp.upper_diff upperDiff, qctp.down_diff downDiff, qctp.sample from qc_check_task_detail td left join qc_check_type_project qctp on td.type_project_id = qctp.id - where td.belong_to = #{belongTo} + where td.belong_to = #{belongTo} and td.del_flag='0' and qctp.del_flag = '0' @@ -242,6 +244,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where record_id = #{recordId} + + update qc_check_task + set + check_status = #{checkStatus}, + check_time = #{checkTime}, + check_result = #{checkResult}, + update_by = #{updateBy}, + update_time = #{updateTime} + where record_id = #{recordId} + + + + update qc_check_task_detail + set + zh_desc = #{item.name1}, + contact_phone = #{item.telf1}, + address = #{item.stras}, + factory_code = #{item.bukrs}, + create_time= #{item.erdat}, + update_time = #{item.erdat} + where + supplier_code = #{item.lifnr} + + delete from qc_check_task where record_id = #{recordId} diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcProCheckMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcProCheckMapper.xml index a41e4987..9e36c0ea 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcProCheckMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcProCheckMapper.xml @@ -35,7 +35,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id,rfid,factory_id,factory_code,order_id,machine_id,bad_meg,product_id,isqua,file_id,attr1,attr2, attr3,attr4,create_by,create_time,update_by,update_time,order_code,machine_code, @@ -212,4 +243,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from sys_dict_data where dict_type = #{equipmentTypeCode} +