diff --git a/op-api/op-api-system/src/main/java/com/op/system/api/domain/quality/QcCheckTaskProduceDTO.java b/op-api/op-api-system/src/main/java/com/op/system/api/domain/quality/QcCheckTaskProduceDTO.java index ab8ba8bc..445d4c79 100644 --- a/op-api/op-api-system/src/main/java/com/op/system/api/domain/quality/QcCheckTaskProduceDTO.java +++ b/op-api/op-api-system/src/main/java/com/op/system/api/domain/quality/QcCheckTaskProduceDTO.java @@ -149,6 +149,15 @@ public class QcCheckTaskProduceDTO extends BaseEntity { private BigDecimal cNoOkquality; private String workorderCode; + private String checkLevel; + + public String getCheckLevel() { + return checkLevel; + } + + public void setCheckLevel(String checkLevel) { + this.checkLevel = checkLevel; + } public String getWorkorderCode() { return workorderCode; diff --git a/op-api/op-api-system/src/main/java/com/op/system/api/domain/sap/SapRFW.java b/op-api/op-api-system/src/main/java/com/op/system/api/domain/sap/SapRFW.java index a3ad703a..9eb490e0 100644 --- a/op-api/op-api-system/src/main/java/com/op/system/api/domain/sap/SapRFW.java +++ b/op-api/op-api-system/src/main/java/com/op/system/api/domain/sap/SapRFW.java @@ -136,6 +136,7 @@ public class SapRFW { String material; String entry_qnt; + String rspos; public String getMaterial() { return material; @@ -152,10 +153,20 @@ public class SapRFW { public void setEntry_qnt(String entry_qnt) { this.entry_qnt = entry_qnt; } + + public String getRspos() { + return rspos; + } + + public void setRspos(String rspos) { + this.rspos = rspos; + } + @Override public String toString() { return "lt_hw{" + - "material='" + material + '\'' + + "rspos='" + rspos + '\'' + + ",material='" + material + '\'' + ", entry_qnt='" + entry_qnt + '\'' + '}'; } diff --git a/op-modules/op-device/src/main/java/com/op/device/controller/EquCheckItemController.java b/op-modules/op-device/src/main/java/com/op/device/controller/EquCheckItemController.java index c28e48ac..0ce70d61 100644 --- a/op-modules/op-device/src/main/java/com/op/device/controller/EquCheckItemController.java +++ b/op-modules/op-device/src/main/java/com/op/device/controller/EquCheckItemController.java @@ -155,6 +155,7 @@ public class EquCheckItemController extends BaseController { * @return */ @GetMapping("/matchList") + @Log(title = "汇总报表", businessType = BusinessType.QUERY) public AjaxResult selectMatchListByEquipmentCode(SummaryReportDTO summaryReportDTO) { return equCheckItemService.selectMatchListByEquipmentCode(summaryReportDTO); } diff --git a/op-modules/op-device/src/main/java/com/op/device/controller/EquOperationController.java b/op-modules/op-device/src/main/java/com/op/device/controller/EquOperationController.java index 935c3f3a..1e045e50 100644 --- a/op-modules/op-device/src/main/java/com/op/device/controller/EquOperationController.java +++ b/op-modules/op-device/src/main/java/com/op/device/controller/EquOperationController.java @@ -39,6 +39,7 @@ public class EquOperationController extends BaseController { */ @RequiresPermissions("device:operation:list") @GetMapping("/list") + @Log(title = "设备完好率", businessType = BusinessType.QUERY) public TableDataInfo list(EquOperation equOperation) { startPage(); List list = equOperationService.selectEquOperationList(equOperation); diff --git a/op-modules/op-device/src/main/java/com/op/device/controller/EquOrderController.java b/op-modules/op-device/src/main/java/com/op/device/controller/EquOrderController.java index 6ad25fff..cd3343bd 100644 --- a/op-modules/op-device/src/main/java/com/op/device/controller/EquOrderController.java +++ b/op-modules/op-device/src/main/java/com/op/device/controller/EquOrderController.java @@ -39,6 +39,7 @@ public class EquOrderController extends BaseController { */ @RequiresPermissions("device:deviceOrder:list") @GetMapping("/list") + @Log(title = "保养记录", businessType = BusinessType.QUERY) public TableDataInfo list(EquOrder equOrder) { startPage(); List list = equOrderService.selectEquOrderList(equOrder); @@ -49,7 +50,7 @@ public class EquOrderController extends BaseController { * 导出计划工单列表 */ @RequiresPermissions("device:deviceOrder:export") - @Log(title = "计划工单", businessType = BusinessType.EXPORT) + @Log(title = "点检记录", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, EquOrder equOrder) { List list = equOrderService.selectEquOrderList(equOrder); diff --git a/op-modules/op-device/src/main/java/com/op/device/controller/EquRepairWorkOrderController.java b/op-modules/op-device/src/main/java/com/op/device/controller/EquRepairWorkOrderController.java index a273dfde..1a4edaf2 100644 --- a/op-modules/op-device/src/main/java/com/op/device/controller/EquRepairWorkOrderController.java +++ b/op-modules/op-device/src/main/java/com/op/device/controller/EquRepairWorkOrderController.java @@ -49,6 +49,7 @@ public class EquRepairWorkOrderController extends BaseController { * 查询维修工单列表 */ @RequiresPermissions("device:repairOrder:list") + @Log(title = "维修报表", businessType = BusinessType.QUERY) @GetMapping("/list") public TableDataInfo list(EquRepairWorkOrder equRepairWorkOrder) { startPage(); diff --git a/op-modules/op-mes/src/main/java/com/op/mes/controller/MesPrepareController.java b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesPrepareController.java index 8ab5ccc7..99b5f3d4 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/controller/MesPrepareController.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesPrepareController.java @@ -42,6 +42,7 @@ public class MesPrepareController extends BaseController { */ @RequiresPermissions("mes:prepare:list") @GetMapping("/list") + @Log(title = "备料单查询", businessType = BusinessType.QUERY) public TableDataInfo list(MesPrepare mesPrepare) { startPage(); List list = mesPrepareService.selectMesPrepareList(mesPrepare); diff --git a/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java index 5dceb088..19a81ad6 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java @@ -20,6 +20,8 @@ import com.op.common.core.utils.bean.BeanUtils; import com.op.common.core.utils.poi.ExcelMapUtil; import com.op.common.core.utils.uuid.IdUtils; import com.op.common.datasource.creator.DynamicDatasourceCreator; +import com.op.common.log.annotation.Log; +import com.op.common.log.enums.BusinessType; import com.op.mes.domain.*; import com.op.mes.domain.dto.LineChartDto; import com.op.mes.domain.dto.SysFactoryDto; @@ -68,6 +70,7 @@ public class MesReportWorkController extends BaseController { */ @RequiresPermissions("mes:reportWork:list") @GetMapping("/list") + @Log(title = "报工报表", businessType = BusinessType.EXPORT) public TableDataInfo list(MesReportWork mesReportWork) { startPage(); // //默认时间范围T 00:00:00~T+1 00:00:00 @@ -181,6 +184,7 @@ public class MesReportWorkController extends BaseController { */ @RequiresPermissions("mes:processFinish:list") @GetMapping("/getProcessFinishList") + @Log(title = "工单各工序完成记录", businessType = BusinessType.EXPORT) public TableDataInfo getProcessFinishList(MesProcessReport mesReportWork) { startPage(); List list = mesReportWorkService.getProcessFinishList(mesReportWork); @@ -205,6 +209,7 @@ public class MesReportWorkController extends BaseController { */ @RequiresPermissions("mes:production:list") @GetMapping("/getProductionList") + @Log(title = "成品产量报表", businessType = BusinessType.QUERY) public TableDataInfo getProductionList(MesReportProduction mesReportProduction) { startPage(); List list = mesReportWorkService.getProductionList(mesReportProduction); @@ -237,6 +242,7 @@ public class MesReportWorkController extends BaseController { } @RequiresPermissions("mes:dailyReport:list") @GetMapping("/getDailyReportNew") + @Log(title = "生成日报表查询", businessType = BusinessType.QUERY) public TableDataInfo getDailyReportNew(MesDailyReportVo mesDailyReportVo) { startPage(); List list = mesReportWorkService.getDailyReportNew(mesDailyReportVo); @@ -358,6 +364,7 @@ public class MesReportWorkController extends BaseController { */ @RequiresPermissions("mes:hourProduction:list") @GetMapping("/getHourProductionList") + @Log(title = "设备小时产量查询", businessType = BusinessType.QUERY) public List getHourProductionList(MesHourReport mesHourReport) { List hourNames = this.getHourProductionTitle(mesHourReport); mesHourReport.setHourNames(hourNames); @@ -405,6 +412,7 @@ public class MesReportWorkController extends BaseController { } @GetMapping("/getMachineProductionList") + @Log(title = "成型机生成报表", businessType = BusinessType.QUERY) public List> getMachineProductionList(MesMachineReport mesMachineReport) { List proNames = this.getMachineProductionTitle(mesMachineReport); mesMachineReport.setProductNames(proNames); diff --git a/op-modules/op-mes/src/main/java/com/op/mes/controller/ProRfidProcessDetailController.java b/op-modules/op-mes/src/main/java/com/op/mes/controller/ProRfidProcessDetailController.java index 7babbdd4..d252b597 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/controller/ProRfidProcessDetailController.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/controller/ProRfidProcessDetailController.java @@ -39,6 +39,7 @@ public class ProRfidProcessDetailController extends BaseController { */ @RequiresPermissions("mes:detail:list") @GetMapping("/list") + @Log(title = "rfid流程查看", businessType = BusinessType.QUERY) public TableDataInfo list(ProRfidProcessDetail proRfidProcessDetail) { startPage(); List list = proRfidProcessDetailService.selectProRfidProcessDetailList(proRfidProcessDetail); diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesReportWorkConsume.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesReportWorkConsume.java index 56ab9ce0..c2de7b11 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesReportWorkConsume.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesReportWorkConsume.java @@ -113,6 +113,15 @@ public class MesReportWorkConsume extends BaseEntity { private String warehouseName; private String planQuantity; private String machineCode; + private String rspos;//sap物料项目编号 + + public String getRspos() { + return rspos; + } + + public void setRspos(String rspos) { + this.rspos = rspos; + } public String getMachineCode() { return machineCode; diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/IWCInterfaceServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/IWCInterfaceServiceImpl.java index 02dca470..917933fd 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/IWCInterfaceServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/IWCInterfaceServiceImpl.java @@ -625,6 +625,9 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService { SapRFW.lt_hw lthw = new SapRFW.lt_hw();//MES生产订单报工货物移动修改 lthw.setEntry_qnt(consume.getQuantity() + "");//数量 lthw.setMaterial(consume.getMaterialCode());//物料编码 + if(StringUtils.isNotBlank(consume.getRspos())){//自主加的物料 + lthw.setRspos(consume.getRspos());//sap物料项目凭证 + } lt_hwList.add(lthw); } } else { diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java index d10cc050..0d8a4856 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java @@ -265,8 +265,6 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService { mesReportWork.setUpdateBy(updateBy); } - //会更新好几次//着急发布后面再说 - //mesReportWorkMapper.updateReportRemark(mesReportWorks); return mesReportWorkMapper.submitReportPS(mesReportWorks); } diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkConsumeMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkConsumeMapper.xml index 717bb33a..3cca0d89 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkConsumeMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkConsumeMapper.xml @@ -115,13 +115,14 @@ mrwc.attr1, mrwc.warehouse_code warehouseCode, mpd.quantity planQuantity, - mrwc.parent_order parentOrder,mrwc.report_code reportCode + mrwc.parent_order parentOrder,mrwc.report_code reportCode, + mrwc.rspos from mes_report_work_consume mrwc left join mes_report_work mrw on mrw.report_code = mrwc.report_code left join pro_order_workorder pow on mrwc.workorder_code = pow.workorder_code left join mes_prepare mp on mp.workorder_code = pow.workorder_code and mp.del_flag='0' left join mes_prepare_detail mpd on mpd.prepare_id = mp.prepare_id - and mpd.material_code = mrwc.material_code + and mpd.material_code = mrwc.material_code and mpd.attr1 = mrwc.rspos and mpd.del_flag = '0' where mrwc.del_flag = '0' and pow.del_flag = '0' and mrwc.workorder_code = #{workorderCode} @@ -172,18 +173,20 @@ 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 96208f49..7ec2dc64 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 @@ -1100,6 +1100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" set quantity_feedback = #{item.quantityFeedback}, work_time = #{item.workTime}, use_man = #{item.useMan}, + batch = #{item.batch}, update_by = #{item.updateBy}, update_time = #{item.updateTime}, remark = #{item.remark} diff --git a/op-modules/op-open/src/main/java/com/op/open/mapper/OpenMapper.java b/op-modules/op-open/src/main/java/com/op/open/mapper/OpenMapper.java index d73b7a56..2e3074e5 100644 --- a/op-modules/op-open/src/main/java/com/op/open/mapper/OpenMapper.java +++ b/op-modules/op-open/src/main/java/com/op/open/mapper/OpenMapper.java @@ -93,5 +93,6 @@ public interface OpenMapper { EquEquipmentDTO selectEquipmentDetailByEquipmentCode(String equipmentCode); List getNotices(SysNoticeGroup noticeQo); + } 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 acca56e6..1f7428f8 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 @@ -457,15 +457,6 @@ public class OpenServiceImpl implements OpenService { return 0;//没有找到检测项目 } -// /**qc_sample_rule**/ -// QcCheckTaskProduceDTO sampQua = new QcCheckTaskProduceDTO(); -// sampQua.setCheckType(qcCheckTaskProduce.getCheckType()); -// sampQua.setQuality(qcCheckTaskProduce.getQuality()); -// String sampNum = openMapper.getSampNum(sampQua); -// if(StringUtils.isNotBlank(sampNum)){ -// qcCheckTaskProduce.setSampleQuality(new BigDecimal(sampNum)); -// } - /**qc_check_task**/ qcCheckTaskProduce.setRecordId(beLongId); qcCheckTaskProduce.setFactoryCode(factoryCode); @@ -647,8 +638,6 @@ public class OpenServiceImpl implements OpenService { return false; } - - public static void main(String args[]){ // 创建两个日期时间对象 LocalDateTime dateTime1 = LocalDateTime.of(2024, 4, 18, 9, 33); // 2023年1月1日 10:30 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 1a28b5a3..ea5603e6 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 @@ -963,10 +963,10 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService { for (int j = 0; j < splitOrderDTO.getFormFields().size(); j++) { newbatchs.add(splitOrderDTO.getFormFields().get(j).getBatchCode()); } - List batchCodes = proOrderWorkorderBatchMapper.checkBatchCodeByWorkOrderIds(workorderIds,newbatchs); - if (!CollectionUtils.isEmpty(batchCodes)) { - checkout = false; - } +// List batchCodes = proOrderWorkorderBatchMapper.checkBatchCodeByWorkOrderIds(workorderIds,newbatchs); +// if (!CollectionUtils.isEmpty(batchCodes)) { +// checkout = false; +// } //校验各工序设备是否已选择 List processes = proOrderMapper.getRouteProcess(splitOrderDTO.getRouteCode()); if (splitOrderDTO.getProdLineCodeArray().length == 0) { diff --git a/op-modules/op-plan/src/main/resources/mapper/plan/ProOrderWorkorderMapper.xml b/op-modules/op-plan/src/main/resources/mapper/plan/ProOrderWorkorderMapper.xml index 13e62960..6ed79d0e 100644 --- a/op-modules/op-plan/src/main/resources/mapper/plan/ProOrderWorkorderMapper.xml +++ b/op-modules/op-plan/src/main/resources/mapper/plan/ProOrderWorkorderMapper.xml @@ -106,8 +106,9 @@ pow.route_code, pow.prod_line_code, pow.product_date, pow.shift_id, pow.parent_order,pow.status, pow.prod_type,pow.factory_code, pow.end_flag,pow.car_num,pow.sort_no, - pow.workorder_code_sap + pow.workorder_code_sap,po.atrr2 from pro_order_workorder pow + left join pro_order po on pow.order_id = po.id and pow.workorder_code like concat('%', #{workorderCode}, '%') @@ -725,13 +726,14 @@ INSERT INTO mes_prepare_detail ( record_id,prepare_id,material_code,material_name,unit, quantity,create_by,create_time,factory_code,status, - locator,need_date,recoil,fund_quanlity,buy_flag,parent_work_order + locator,need_date,recoil,fund_quanlity,buy_flag,parent_work_order,attr1 )VALUES ( #{d.recordId},#{d.prepareId},#{d.materialCode},#{d.materailName},#{d.unit}, #{d.quantity},#{d.createBy},#{d.createTime},#{d.factoryCode},#{d.status}, - #{d.locator},#{d.needDate},#{d.recoil},#{d.fundQuanlity},#{d.buyFlag},#{d.parentWorkOrder} + #{d.locator},#{d.needDate},#{d.recoil},#{d.fundQuanlity},#{d.buyFlag},#{d.parentWorkOrder}, + #{d.attr1} ) diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcProCheckController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcProCheckController.java index 95e70087..47145227 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcProCheckController.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcProCheckController.java @@ -36,6 +36,7 @@ public class QcProCheckController extends BaseController { } @GetMapping("/getHfChartData") + @Log(title = "烘房白坯质量查看", businessType = BusinessType.QUERY) public ChartSeriesDTO getHfChartData(QcProCheck qcProCheck) { ChartSeriesDTO dto = qcProCheckService.getHfChartData(qcProCheck); return dto; diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcStaticTableController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcStaticTableController.java index e544f408..b524141b 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcStaticTableController.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcStaticTableController.java @@ -57,6 +57,7 @@ public class QcStaticTableController extends BaseController { */ @RequiresPermissions("quality:qcTableIncome:list") @GetMapping("/getIncomeTableList") + @Log(title = "供应商质量统计", businessType = BusinessType.QUERY) public TableDataInfo getIncomeTableList(QcStaticTable qcStaticTable) { if (StringUtils.isNotBlank(qcStaticTable.getSupplierCode())) { List codes = Arrays.asList(qcStaticTable.getSupplierCode().split(",")); @@ -88,6 +89,7 @@ public class QcStaticTableController extends BaseController { */ @RequiresPermissions("quality:qcTableProduce:list") @GetMapping("/getProduceChartData") + @Log(title = "产品质量分析", businessType = BusinessType.QUERY) public QcStaticTable getProduceChartData(QcStaticTable qcStaticTable) { QcStaticTable resultdto = new QcStaticTable(); //默认时间范围T 00:00:00~T+1 00:00:00 @@ -256,6 +258,7 @@ public class QcStaticTableController extends BaseController { */ @RequiresPermissions("quality:qcTableXJ:list") @GetMapping("/getXJCheckTableList") + @Log(title = "生成巡检记录", businessType = BusinessType.QUERY) public TableDataInfo getXJCheckTableList(QcStaticTable qcStaticTable) { //默认时间范围T 00:00:00~T+1 00:00:00 @@ -282,6 +285,7 @@ public class QcStaticTableController extends BaseController { @RequiresPermissions("quality:qcTableXJAnalysis:list") @GetMapping("/getXJChartData") + @Log(title = "巡检不良分析", businessType = BusinessType.QUERY) public ChartSeriesDTO getXJChartData(QcStaticTable qcStaticTable) { if (StringUtils.isEmpty(qcStaticTable.getYmdms())) { LocalDate date = LocalDate.now(); @@ -298,6 +302,7 @@ public class QcStaticTableController extends BaseController { **/ @RequiresPermissions("quality:qcProduceAnalysis:list") @GetMapping("/getQmsRateTable") + @Log(title = "质检不良统计", businessType = BusinessType.QUERY) public TableDataInfo getQmsRateTable(QcStaticTable qcStaticTable) { //默认时间范围T 00:00:00~T+1 00:00:00 if (StringUtils.isEmpty(qcStaticTable.getYmArrayStart())) { @@ -333,6 +338,7 @@ public class QcStaticTableController extends BaseController { * 定量值分析--表头--产品名称 **/ @GetMapping("/getDLTableAvgInfo") + @Log(title = "定量值分析", businessType = BusinessType.QUERY) public QcStaticTable getDLTableAvgInfo(QcStaticTable qcStaticTable) { return qcStaticTableService.getDLTableAvgInfo(qcStaticTable); } 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 1d0adb66..34347764 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 @@ -193,6 +193,26 @@ public class QuaController extends BaseController { return success(qcProCheckService.getWeightInfo(qcCheckTaskDetail)); } + /** + * 自动判定 + */ + @PostMapping(value = "/getAutoJudge") + public AjaxResult getAutoJudge(@RequestBody QcCheckTaskDetail qcCheckTaskDetail) { + if(StringUtils.isBlank(qcCheckTaskDetail.getSampleQuality())){ + return error("[sampleQuality]不能为空"); + } + if(StringUtils.isBlank(qcCheckTaskDetail.getCheckLevel())){ + return error("[checkLevel]不能为空"); + } + if(StringUtils.isBlank(qcCheckTaskDetail.getSampleAql())){ + return error("[sampleAql]不能为空"); + } + if(CollectionUtils.isEmpty(qcCheckTaskDetail.getActualValues())){ + return error("[actualValue]不能为空"); + } + return success(qcProCheckService.getAutoJudge(qcCheckTaskDetail)); + } + /** * 获取待检验信息列表 */ diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckProject.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckProject.java index edcf14c1..9ca5f697 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckProject.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckProject.java @@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle; import com.op.common.core.annotation.Excel; import com.op.common.core.web.domain.BaseEntity; +import java.math.BigDecimal; + /** * 检验项目维护对象 qc_check_project * @@ -52,7 +54,6 @@ public class QcCheckProject extends BaseEntity { /** * 单位 */ - @Excel(name = "单位") private String unitCode; /** @@ -64,13 +65,11 @@ public class QcCheckProject extends BaseEntity { /** * 预留字段1 */ - @Excel(name = "预留字段1") private String attr1; /** * 工厂编码 */ - @Excel(name = "工厂编码") private String factoryCode; @Excel(name = "抽样方案") private String samplePlan; @@ -87,8 +86,28 @@ public class QcCheckProject extends BaseEntity { private String groupId; @Excel(name = "检测项分类",readConverterExp = "0=内容物,1=包装") private String itemType; - @Excel(name = "合格判定比例") + //@Excel(name = "合格判定比例") private String judgeRate; + @Excel(name = "合格上限") + private BigDecimal upperDiff; + @Excel(name = "合格下限") + private BigDecimal downDiff; + + public BigDecimal getUpperDiff() { + return upperDiff; + } + + public void setUpperDiff(BigDecimal upperDiff) { + this.upperDiff = upperDiff; + } + + public BigDecimal getDownDiff() { + return downDiff; + } + + public void setDownDiff(BigDecimal downDiff) { + this.downDiff = downDiff; + } public String getItemType() { return itemType; diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckReportIncome.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckReportIncome.java index 130ecf4f..9e3b6297 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckReportIncome.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckReportIncome.java @@ -186,6 +186,15 @@ public class QcCheckReportIncome extends BaseEntity { private Date confirmTime; private Boolean myself; private String shiftId; + private String orderType; + + public String getOrderType() { + return orderType; + } + + public void setOrderType(String orderType) { + this.orderType = orderType; + } public String getShiftId() { return shiftId; diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskDetail.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskDetail.java index d64a6557..e1603e69 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskDetail.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskDetail.java @@ -142,6 +142,42 @@ public class QcCheckTaskDetail extends BaseEntity { private String judgeRate; private String samplePlan; private String weight; + private String sampleCode; + private String sampleQuality; + private String sampleAql; + private String checkLevel; + + public String getCheckLevel() { + return checkLevel; + } + + public void setCheckLevel(String checkLevel) { + this.checkLevel = checkLevel; + } + + public String getSampleCode() { + return sampleCode; + } + + public void setSampleCode(String sampleCode) { + this.sampleCode = sampleCode; + } + + public String getSampleQuality() { + return sampleQuality; + } + + public void setSampleQuality(String sampleQuality) { + this.sampleQuality = sampleQuality; + } + + public String getSampleAql() { + return sampleAql; + } + + public void setSampleAql(String sampleAql) { + this.sampleAql = sampleAql; + } public String getProjectRuleName() { return projectRuleName; 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 a44b62f6..6509c4d2 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 @@ -199,7 +199,33 @@ public class QcCheckTaskIncome extends BaseEntity { private String materialFrom;//物料来源 private String startOA;//发起oa 1是 0否 private String checkLevel; - private String checkAql; + private String sampleCode; + private String sampleAql; + private String reason; + + public String getSampleAql() { + return sampleAql; + } + + public void setSampleAql(String sampleAql) { + this.sampleAql = sampleAql; + } + + public String getSampleCode() { + return sampleCode; + } + + public void setSampleCode(String sampleCode) { + this.sampleCode = sampleCode; + } + + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } public String getCheckLevel() { return checkLevel; @@ -209,13 +235,6 @@ public class QcCheckTaskIncome extends BaseEntity { this.checkLevel = checkLevel; } - public String getCheckAql() { - return checkAql; - } - - public void setCheckAql(String checkAql) { - this.checkAql = checkAql; - } public String getOrderCode() { return orderCode; 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 04c3d0a1..f4e327e1 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 @@ -178,6 +178,24 @@ public class QcCheckTaskWarehousing extends BaseEntity { private BigDecimal cNoOkquality; private String workorderCode; private String checkName; + private String checkLevel; + private String sampleCode; + + public String getSampleCode() { + return sampleCode; + } + + public void setSampleCode(String sampleCode) { + this.sampleCode = sampleCode; + } + + public String getCheckLevel() { + return checkLevel; + } + + public void setCheckLevel(String checkLevel) { + this.checkLevel = checkLevel; + } public String getWorkorderCode() { return workorderCode; 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 94a3c556..83206e9a 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 @@ -1,5 +1,6 @@ package com.op.quality.mapper; +import java.math.BigDecimal; import java.util.Date; import java.util.List; import java.util.Map; @@ -129,4 +130,8 @@ public interface QcCheckTaskIncomeMapper { List getNoticesGroup(SysNoticeGroup noticeQo); QcCheckTaskIncome hasIncomeTask(QcCheckTaskIncomeDTO income); + + String getSampleQua(QcCheckTaskIncome qcCheckTaskIncome); + + Integer getnoOkVals(QcCheckTaskIncome qcCheckTaskIncome); } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcProjectTypeMapper.java b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcProjectTypeMapper.java index 0449fedd..9a5cf635 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcProjectTypeMapper.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcProjectTypeMapper.java @@ -64,4 +64,10 @@ public interface QcProjectTypeMapper { QcProjectType selectQcProjectTypeByCode(String projectTypeCode); int getTodayMaxNum(); + + void deleteQcProjectByIds(String[] ids); + + void deleteQcProjectByCodes(String[] codes); + + int deleteQcProjectTypeByCodes(String[] codes); } 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 0e49b7ee..05895e56 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 @@ -105,4 +105,5 @@ public interface IQcCheckTaskIncomeService { public String getWeightValue(String id); QcCheckTaskIncome hasIncomeTask(QcCheckTaskIncomeDTO income); + } 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 ff799f00..dbdd5159 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 @@ -45,4 +45,6 @@ public interface QcProCheckService { ChartSeriesDTO getHfChartData(QcProCheck qcProCheck); String getWeightInfo(QcCheckTaskDetail qcCheckTaskDetail); + + QcCheckTaskDetail getAutoJudge(QcCheckTaskDetail qcCheckTaskDetail); } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckReportIncomeServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckReportIncomeServiceImpl.java index af4afb83..5d799988 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckReportIncomeServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckReportIncomeServiceImpl.java @@ -210,16 +210,12 @@ public class QcCheckReportIncomeServiceImpl implements IQcCheckReportIncomeServi //检验项目 String ruleName = dto.getRuleName(); - String projectRuleName0 = ruleName.split("]")[0]; - if(StringUtils.isNotBlank(projectRuleName0)){ - dto.setProjectRuleName(projectRuleName0.replace("[","")); + if(StringUtils.isNotBlank(ruleName)){ + String projectRuleName0 = ruleName.split("]")[0]; + if(StringUtils.isNotBlank(projectRuleName0)){ + dto.setProjectRuleName(projectRuleName0.replace("[","")); + } } -// //判定(前端做了) -// if("Y".equals(dto.getStatus())){ -// dto.setStatus("√"); -// }else if("N".equals(dto.getStatus())){ -// dto.setStatus("×"); -// } } return dtos; 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 8bfd0a86..a99d0a4c 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 @@ -189,15 +189,14 @@ public class QcCheckTaskIncomeServiceImpl implements return 0;//没有找到检测项目 } -// /**qc_sample_rule**/ -// QcCheckTaskIncome sampQua = new QcCheckTaskIncome(); -// sampQua.setCheckType(qcCheckTaskIncome.getCheckType()); -// sampQua.setQuality(qcCheckTaskIncome.getQuality()); -// String sampNum = qcSampleRuleMapper.getSampNum(sampQua); -// if(StringUtils.isNotBlank(sampNum)){ -// qcCheckTaskIncome.setSampleQuality(new BigDecimal(sampNum)); +// //抽样方案 +// String sampleQua = this.getSampleQua(qcCheckTaskIncome); +// if(StringUtils.isNotBlank(sampleQua)){ +// qcCheckTaskIncome.setSampleCode(sampleQua.split("-")[0]); +// qcCheckTaskIncome.setSampleQuality(new BigDecimal(sampleQua.split("-")[1])); // } + /**qc_check_task**/ String beLongId = IdUtils.fastSimpleUUID(); qcCheckTaskIncome.setRecordId(beLongId); @@ -354,6 +353,13 @@ public class QcCheckTaskIncomeServiceImpl implements } qcCheckTaskIncome.setNoOkQuality(noOkQuality); +// //抽样方案 +// String sampleQua = this.getSampleQua(qcCheckTaskIncome); +// if(StringUtils.isNotBlank(sampleQua)){ +// qcCheckTaskIncome.setSampleCode(sampleQua.split("-")[0]); +// qcCheckTaskIncome.setSampleQuality(new BigDecimal(sampleQua.split("-")[1])); +// } + return qcCheckTaskIncomeMapper.updateQcCheckTaskIncome(qcCheckTaskIncome); } @@ -659,12 +665,9 @@ public class QcCheckTaskIncomeServiceImpl implements result = qcCheckTaskIncome.getCheckResult(); } - //抽样方案 - BigDecimal sampleQua = this.getSampleQua(qcCheckTaskIncome); - int n = 0; QcCheckTaskIncome qcCheckTask = new QcCheckTaskIncome(); - qcCheckTask.setSampleQuality(sampleQua); + //qcCheckTask.setSampleQuality(sampleQua); qcCheckTask.setUpdateBy(updateBy); qcCheckTask.setRecordId(belongId); qcCheckTask.setCheckStatus("2");//检测状态0待检测1检测中2检测完成 @@ -682,6 +685,7 @@ public class QcCheckTaskIncomeServiceImpl implements qcCheckTask.setCheckManCode(qcCheckTaskIncome.getUpdateBy()); qcCheckTask.setCheckManName(qcCheckTaskIncome.getUpdateByName()); qcCheckTask.setSampleQuality(qcCheckTaskIncome.getSampleQuality()); + qcCheckTask.setReason(qcCheckTaskIncome.getReason()); /**qc_check_task**/ n = qcCheckTaskIncomeMapper.updateQcCheckTask(qcCheckTask); logger.info("qc_check_task:"+n); @@ -707,6 +711,7 @@ public class QcCheckTaskIncomeServiceImpl implements n = qmsFileMapper.insertBaseFileBatch(files); System.out.println("base_file:"+n); } + } n= qcCheckTaskIncomeMapper.updateQcCheckTaskDetails(details); logger.info("更新qc_check_task_detail:"+n); @@ -888,11 +893,13 @@ public class QcCheckTaskIncomeServiceImpl implements //发企业微信--------------------结束 } } - //抽样方案 - protected BigDecimal getSampleQua(QcCheckTaskIncome qcCheckTaskIncome){ - BigDecimal sampleQua = BigDecimal.ZERO; - return sampleQua; + protected String getSampleQua(QcCheckTaskIncome qcCheckTaskIncome){ + String sampleQuaStr = ""; + if(StringUtils.isNotBlank(qcCheckTaskIncome.getCheckLevel())&&qcCheckTaskIncome.getQuality()!=null){ + sampleQuaStr = qcCheckTaskIncomeMapper.getSampleQua(qcCheckTaskIncome); + } + return sampleQuaStr; } @Override @@ -938,6 +945,4 @@ public class QcCheckTaskIncomeServiceImpl implements public QcCheckTaskIncome hasIncomeTask(QcCheckTaskIncomeDTO income) { return qcCheckTaskIncomeMapper.hasIncomeTask(income); } - - } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskWarehousingServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskWarehousingServiceImpl.java index 80882e76..e8aea9be 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskWarehousingServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskWarehousingServiceImpl.java @@ -242,14 +242,17 @@ public class QcCheckTaskWarehousingServiceImpl implements IQcCheckTaskWarehousin } } qcCheckTaskWarehousing.setNoOkQuality(noOkQuality); -// /**qc_sample_rule**/ -// QcCheckTaskIncome sampQua = new QcCheckTaskIncome(); -// sampQua.setCheckType(qcCheckTaskWarehousing.getCheckType()); -// sampQua.setQuality(qcCheckTaskWarehousing.getQuality()); -// String sampNum = qcSampleRuleMapper.getSampNum(sampQua); -// if(StringUtils.isNotBlank(sampNum)){ -// qcCheckTaskWarehousing.setSampleQuality(new BigDecimal(sampNum)); + +// //抽样方案 +// QcCheckTaskIncome qincome = new QcCheckTaskIncome(); +// qincome.setQuality(qcCheckTaskWarehousing.getQuality()); +// qincome.setCheckLevel(qcCheckTaskWarehousing.getCheckLevel()); +// String sampleQua = this.getSampleQua(qincome); +// if(StringUtils.isNotBlank(sampleQua)){ +// qcCheckTaskWarehousing.setSampleCode(sampleQua.split("-")[0]); +// qcCheckTaskWarehousing.setSampleQuality(new BigDecimal(sampleQua.split("-")[1])); // } + /**qc_check_task**/ qcCheckTaskWarehousing.setIncomeTime(DateUtils.getNowDate());//检验任务日期 int n = qcCheckTaskWarehousingMapper.insertQcCheckTaskWarehousing(qcCheckTaskWarehousing); @@ -425,4 +428,13 @@ public class QcCheckTaskWarehousingServiceImpl implements IQcCheckTaskWarehousin } logger.info("++++++++++++" + poolName + "++++入库检验巡检结束++++++++++"); } + +// //抽样方案 +// protected String getSampleQua(QcCheckTaskIncome qcCheckTaskIncome){ +// String sampleQuaStr = ""; +// if(StringUtils.isNotBlank(qcCheckTaskIncome.getCheckLevel())&&qcCheckTaskIncome.getQuality()!=null){ +// sampleQuaStr = qcCheckTaskIncomeMapper.getSampleQua(qcCheckTaskIncome); +// } +// return sampleQuaStr; +// } } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcProCheckServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcProCheckServiceImpl.java index 300247ba..75cfa072 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcProCheckServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcProCheckServiceImpl.java @@ -20,7 +20,9 @@ import com.op.system.api.domain.quality.ChartDTO; import com.op.system.api.domain.quality.ChartSeriesDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.web.bind.annotation.RequestBody; +import java.math.BigDecimal; import java.text.SimpleDateFormat; import java.util.*; @@ -221,4 +223,55 @@ public class QcProCheckServiceImpl implements QcProCheckService { return qcProCheckMapper.getWeightInfo(qcCheckTaskDetail); } + @Override + @DS("#header.poolName") + public QcCheckTaskDetail getAutoJudge(QcCheckTaskDetail qcCheckTaskDetail) { + if(StringUtils.isNotBlank(qcCheckTaskDetail.getFactoryCode())){ + DynamicDataSourceContextHolder.push(qcCheckTaskDetail.getFactoryCode()); + } + QcCheckTaskDetail dto = new QcCheckTaskDetail(); + + QcCheckTaskIncome qincome = new QcCheckTaskIncome(); + qincome.setQuality(new BigDecimal(qcCheckTaskDetail.getSampleQuality())); + qincome.setCheckLevel(qcCheckTaskDetail.getCheckLevel()); + String sampleQuaStr = qcCheckTaskIncomeMapper.getSampleQua(qincome); + if(StringUtils.isNotBlank(sampleQuaStr)){ + dto.setSampleCode(sampleQuaStr.split("-")[0]); + dto.setSampleQuality(sampleQuaStr.split("-")[1]); + } + qincome.setSampleAql(qcCheckTaskDetail.getSampleAql()); + qincome.setSampleCode(dto.getSampleCode()); + Integer nookstandar = qcCheckTaskIncomeMapper.getnoOkVals(qincome); + if(nookstandar == null){ + return dto; + } + String status = "N"; + int nookNum = 0; + for(String aValue:qcCheckTaskDetail.getActualValues()){ + if(qcCheckTaskDetail.getUpperDiff()!=null && qcCheckTaskDetail.getDownDiff()!=null + && qcCheckTaskDetail.getDownDiff().compareTo(new BigDecimal(aValue)) < 1 + && qcCheckTaskDetail.getUpperDiff().compareTo(new BigDecimal(aValue)) >=0){ + System.out.println("Y"); + }else if(qcCheckTaskDetail.getUpperDiff()==null && qcCheckTaskDetail.getDownDiff()!=null + && qcCheckTaskDetail.getDownDiff().compareTo(new BigDecimal(aValue)) < 1){ + System.out.println("Y"); + }else if(qcCheckTaskDetail.getUpperDiff()!=null && qcCheckTaskDetail.getDownDiff()==null + && qcCheckTaskDetail.getUpperDiff().compareTo(new BigDecimal(aValue)) >=0){ + System.out.println("Y"); + }else{ + System.out.println("N"); + ++nookNum; + } + } + if(nookNum<=nookstandar.intValue()){ + status = "Y"; + } + dto.setStatus(status); + return dto; + } + public static void main(String args[]){ + int m = 0; + ++m; + System.out.println(m); + } } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcProjectTypeServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcProjectTypeServiceImpl.java index c672d1e0..74760727 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcProjectTypeServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcProjectTypeServiceImpl.java @@ -107,8 +107,9 @@ public class QcProjectTypeServiceImpl implements IQcProjectTypeService { */ @Override @DS("#header.poolName") - public int deleteQcProjectTypeByIds(String[] ids) { - return qcProjectTypeMapper.deleteQcProjectTypeByIds(ids); + public int deleteQcProjectTypeByIds(String[] codes) { + qcProjectTypeMapper.deleteQcProjectByCodes(codes); + return qcProjectTypeMapper.deleteQcProjectTypeByCodes(codes); } /** diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckProjectMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckProjectMapper.xml index 067d046d..77bc6961 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckProjectMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckProjectMapper.xml @@ -27,13 +27,15 @@ + + select id, order_num, rule_name, property_code, check_mode, check_tool, unit_code, check_standard, attr1, create_by, create_time, update_by, update_time, factory_code, del_flag,sample_plan, - judge,defect_level,project_type,sort,item_type,judge_rate - + judge,defect_level,project_type,sort,item_type,judge_rate, + upper_diff,down_diff from qc_check_project @@ -86,6 +88,8 @@ sort, item_type, judge_rate, + upper_diff, + down_diff, #{id}, @@ -110,6 +114,8 @@ #{sort}, #{itemType}, #{judgeRate}, + #{upperDiff}, + #{downDiff}, @@ -137,6 +143,8 @@ sort = #{sort}, item_type = #{itemType}, judge_rate = #{judgeRate}, + upper_diff= #{upperDiff}, + down_diff= #{downDiff}, where id = #{id} diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckReportIncomeMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckReportIncomeMapper.xml index 6900afd6..632cf58a 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckReportIncomeMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckReportIncomeMapper.xml @@ -38,13 +38,14 @@ + select record_id, check_no, income_batch_no, order_no, material_code, material_name, quality, unit, supplier_code, supplier_name, income_time, check_loc, check_status, check_man_code, check_man_name,sample_quality, check_time, check_result, status, check_type, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, - factory_code, del_flag,reason,product_type + factory_code, del_flag,reason,product_type,order_type from qc_check_task @@ -156,7 +157,9 @@ qcp.sample_plan samplePlan, qctp.item_type itemType, qctp.judge_rate judgeRate, - qpt.standard_no standardNo + qpt.standard_no standardNo, + qctp.upper_diff upperDiff, + qctp.down_diff downDiff from qc_check_task_detail td left join qc_check_type_project qctp on td.type_project_id = qctp.id left join qc_check_project qcp on qcp.id = qctp.project_id diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskDetailMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskDetailMapper.xml index c445aa1f..69bf9350 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskDetailMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskDetailMapper.xml @@ -169,6 +169,11 @@ del_flag = #{delFlag}, defect_code = #{defectCode}, defect_quality = #{defectQuality}, + + sample_code = #{sampleCode}, + sample_quality = #{sampleQuality}, + sample_aql = #{sampleAql}, + check_level = #{checkLevel}, where record_id = #{recordId} 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 bb9b1093..b8ef8328 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 @@ -36,7 +36,7 @@ - + @@ -56,7 +56,7 @@ qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_loc, qct.check_status, qct.check_man_code, qct.check_man_name,qct.check_time, qct.check_result, qct.status, qct.create_by,qct.create_time, qct.update_by, qct.update_time,qct.check_type,qct.noOk_quality, - qct.sample_quality, qct.type_code, qct.order_type + qct.sample_quality, qct.type_code, qct.order_type,qct.sample_code from qc_check_task qct and qct.check_no = #{checkNo} @@ -150,6 +150,10 @@ td.belong_to belongTo, td.defect_code defectCode, td.defect_quality defectQuality, + td.sample_code sampleCode, + td.sample_quality sampleQuality, + td.sample_aql sampleAql, + td.check_level checkLevel, qctp.upper_diff upperDiff, qctp.down_diff downDiff, qctp.sample, @@ -216,6 +220,7 @@ sample_quality, order_type, order_type_desc, + sample_code, #{recordId}, @@ -252,6 +257,7 @@ #{sampleQuality}, #{orderType}, #{orderTypeDesc}, + #{sampleCode}, @@ -289,6 +295,7 @@ del_flag = #{delFlag}, check_type = #{checkType}, sample_quality = #{sampleQuality}, + sample_code = #{sampleCode}, where record_id = #{recordId} @@ -306,6 +313,7 @@ cNoOkquality = #{cNoOkquality}, income_batch_no = #{incomeBatchNo}, remark = #{remark}, + reason = #{reason}, check_result = #{checkResult}, update_by = #{updateBy}, update_time = #{updateTime} @@ -320,6 +328,10 @@ update_by = #{item.updateBy}, update_time = #{item.updateTime}, remark = #{item.remark}, + sample_code = #{item.sampleCode}, + sample_quality = #{item.sampleQuality}, + sample_aql = #{item.sampleAql}, + check_level = #{item.checkLevel}, defect_code = #{item.defectCode}, defect_quality = #{item.defectQuality} where @@ -522,6 +534,45 @@ and quality = #{quality} and income_time = #{incomeTime} and del_flag = '0' + + diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskWarehousingMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskWarehousingMapper.xml index b908780a..c409a234 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskWarehousingMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskWarehousingMapper.xml @@ -142,6 +142,7 @@ noOk_quality, sample_quality, order_type, + sample_code, #{recordId}, @@ -177,6 +178,7 @@ #{noOkQuality}, #{sampleQuality}, #{orderType}, + #{sampleCode}, diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTypeProjectMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTypeProjectMapper.xml index 36c89b45..b202ef12 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTypeProjectMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTypeProjectMapper.xml @@ -285,7 +285,9 @@ judge , defect_level defectLevel, item_type itemType, - judge_rate judgeRate + judge_rate judgeRate, + upper_diff upperDiff, + down_diff downDiff from qc_check_project where del_flag = '0' and project_type = #{projectType} diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcProjectTypeMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcProjectTypeMapper.xml index 4d5a20d0..6f394148 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcProjectTypeMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcProjectTypeMapper.xml @@ -103,11 +103,35 @@ - delete from qc_project_type where id = #{id} + update qc_project_type set del_flag = '1' where id = #{id} - delete from qc_project_type where id in + update qc_project_type set del_flag = '1' where id in + + #{id} + + + + update qc_project_type set del_flag = '1' where project_type_code in + + #{id} + + + + update p + set p.del_flag = '1' + from qc_check_project p + left join qc_project_type pt on pt.project_type_code = p.project_type + where pt.id in + + #{id} + + + + update p set p.del_flag = '1' + from qc_check_project p + where p.project_type in #{id} diff --git a/op-modules/op-sap/src/main/java/com/op/sap/service/impl/SapOrderServiceImpl.java b/op-modules/op-sap/src/main/java/com/op/sap/service/impl/SapOrderServiceImpl.java index 6637997e..d038a5b4 100644 --- a/op-modules/op-sap/src/main/java/com/op/sap/service/impl/SapOrderServiceImpl.java +++ b/op-modules/op-sap/src/main/java/com/op/sap/service/impl/SapOrderServiceImpl.java @@ -317,6 +317,7 @@ public class SapOrderServiceImpl implements SapOrderService { //System.out.println("LT_HW_jCoTable"+LT_HW_jCoTable); for (SapRFW.lt_hw lt_hw : sapRFW.getLt_hwList()) { LT_HW_jCoTable.appendRow(); + LT_HW_jCoTable.setValue("RSPOS", lt_hw.getRspos()); LT_HW_jCoTable.setValue("MATERIAL", lt_hw.getMaterial()); LT_HW_jCoTable.setValue("ENTRY_QNT", lt_hw.getEntry_qnt()); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOrderServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOrderServiceImpl.java index 3e2ac23a..cc054e95 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOrderServiceImpl.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOrderServiceImpl.java @@ -699,7 +699,7 @@ public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService { qcCheckTaskIncomeDTO.setSupplierCode("0000102272"); qcCheckTaskIncomeDTO.setFactoryCode("1000"); qcCheckTaskIncomeDTO.setSupplierName("广州市彩晴包装印刷有限公司"); - qcCheckTaskIncomeDTO.setOrderType("bc"); + qcCheckTaskIncomeDTO.setOrderType("8040");//包材固定码 qcCheckTaskIncomeDTO.setUnit("KG"); qcCheckTaskIncomeDTO.setQuality(new BigDecimal("10")); qcCheckTaskIncomeDTO.setMaterialCode("000000020800001083"); @@ -739,8 +739,6 @@ public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService { QcCheckTaskIncomeDTO qcCheckTaskIncomeDTO = new QcCheckTaskIncomeDTO(); qcCheckTaskIncomeDTO.setCheckLoc("mjtest"); qcCheckTaskIncomeDTO.setCheckType("checkTypeLL"); -// qcCheckTaskIncomeDTO.setCheckManCode("mobile"); -// qcCheckTaskIncomeDTO.setCheckManName("手持测试用户"); qcCheckTaskIncomeDTO.setSupplierCode(order1.getSupplierCode()); String name = odsProcureOrderMapper.selectBaseSupplier(order1); qcCheckTaskIncomeDTO.setSupplierName(name);