diff --git a/op-modules/op-mes/src/main/java/com/op/mes/controller/MesPrepareValidateController.java b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesPrepareValidateController.java deleted file mode 100644 index de9935d28..000000000 --- a/op-modules/op-mes/src/main/java/com/op/mes/controller/MesPrepareValidateController.java +++ /dev/null @@ -1,100 +0,0 @@ -package com.op.mes.controller; - -import java.util.List; -import javax.servlet.http.HttpServletResponse; - -import com.op.common.core.utils.uuid.IdUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.op.common.log.annotation.Log; -import com.op.common.log.enums.BusinessType; -import com.op.common.security.annotation.RequiresPermissions; -import com.op.mes.domain.MesPrepareValidate; -import com.op.mes.service.IMesPrepareValidateService; -import com.op.common.core.web.controller.BaseController; -import com.op.common.core.web.domain.AjaxResult; -import com.op.common.core.utils.poi.ExcelUtil; -import com.op.common.core.web.page.TableDataInfo; - -/** - * 生产前准备记录报表Controller - * - * @author Open Platform - * @date 2023-08-04 - */ -@RestController -@RequestMapping("/validate") -public class MesPrepareValidateController extends BaseController { - @Autowired - private IMesPrepareValidateService mesPrepareValidateService; - - /** - * 查询生产前准备记录报表列表 - */ - @RequiresPermissions("mes:validate:list") - @GetMapping("/list") - public TableDataInfo list(MesPrepareValidate mesPrepareValidate) { - startPage(); - List list = mesPrepareValidateService.selectMesPrepareValidateList(mesPrepareValidate); - return getDataTable(list); - } - - /** - * 导出生产前准备记录报表列表 - */ - @RequiresPermissions("mes:validate:export") - @Log(title = "生产前准备记录报表", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, MesPrepareValidate mesPrepareValidate) { - List list = mesPrepareValidateService.selectMesPrepareValidateList(mesPrepareValidate); - ExcelUtil util = new ExcelUtil(MesPrepareValidate.class); - util.exportExcel(response, list, "生产前准备记录报表数据"); - } - - /** - * 获取生产前准备记录报表详细信息 - */ - @RequiresPermissions("mes:validate:query") - @GetMapping(value = "/{validateId}") - public AjaxResult getInfo(@PathVariable("validateId") String validateId) { - return success(mesPrepareValidateService.selectMesPrepareValidateByValidateId(validateId)); - } - - /** - * 新增生产前准备记录报表 - */ - @RequiresPermissions("mes:validate:add") - @Log(title = "生产前准备记录报表", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody MesPrepareValidate mesPrepareValidate) { - mesPrepareValidate.setValidateId(IdUtils.fastSimpleUUID()); - return toAjax(mesPrepareValidateService.insertMesPrepareValidate(mesPrepareValidate)); - } - - /** - * 修改生产前准备记录报表 - */ - @RequiresPermissions("mes:validate:edit") - @Log(title = "生产前准备记录报表", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody MesPrepareValidate mesPrepareValidate) { - return toAjax(mesPrepareValidateService.updateMesPrepareValidate(mesPrepareValidate)); - } - - /** - * 删除生产前准备记录报表 - */ - @RequiresPermissions("mes:validate:remove") - @Log(title = "生产前准备记录报表", businessType = BusinessType.DELETE) - @DeleteMapping("/{validateIds}") - public AjaxResult remove(@PathVariable String[] validateIds) { - return toAjax(mesPrepareValidateService.deleteMesPrepareValidateByValidateIds(validateIds)); - } -} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesPrepareValidate.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesPrepareValidate.java deleted file mode 100644 index 95e9f4f1f..000000000 --- a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesPrepareValidate.java +++ /dev/null @@ -1,210 +0,0 @@ -package com.op.mes.domain; - -import com.fasterxml.jackson.annotation.JsonFormat; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.op.common.core.annotation.Excel; -import com.op.common.core.web.domain.BaseEntity; - -import java.util.Date; - -/** - * 生产前准备记录报表对象 mes_prepare_validate - * - * @author Open Platform - * @date 2023-08-04 - */ -public class MesPrepareValidate extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** 生产前准备id */ - private String validateId; - - /** 工单编码 */ - @Excel(name = "工单编码") - private String workorderCode; - - /** 工单名称 */ - @Excel(name = "工单名称") - private String workorderName; - - /** 产品规格型号 */ - @Excel(name = "产品规格型号") - private String productSpc; - - /** 产品名称 */ - @Excel(name = "产品名称") - private String productName; - - /** 单据状态 */ - @Excel(name = "单据状态") - private String status; - - /** 预留字段1 */ - @Excel(name = "预留字段1") - private String attr1; - - /** 预留字段2 */ - @Excel(name = "预留字段2") - private String attr2; - - /** 预留字段3 */ - @Excel(name = "预留字段3") - private String attr3; - - /** 预留字段4 */ - @Excel(name = "预留字段4") - private String attr4; - - /** 工厂编码 */ - @Excel(name = "工厂编码") - private String factoryCode; - - /** 完成时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date endTime; - - /** 准备类型 */ - @Excel(name = "准备类型") - private String validateType; - - /** 准备内容 */ - @Excel(name = "准备内容") - private String validateName; - - /** 准备状态 */ - @Excel(name = "准备状态") - private String validateStatus; - - public void setEndTime(Date endTime) { - this.endTime = endTime; - } - public Date getEndTime() { - return endTime; - } - - public void setValidateId(String validateId) { - this.validateId = validateId; - } - public String getValidateId() { - return validateId; - } - - public void setValidateType(String validateType) { - this.validateType = validateType; - } - public String getValidateType() { - return validateType; - } - - public void setValidateName(String validateName) { - this.validateName = validateName; - } - public String getValidateName() { - return validateName; - } - - public void setStatus(String status) { - this.status = status; - } - public String getStatus() { - return status; - } - - public void setWorkorderCode(String workorderCode) { - this.workorderCode = workorderCode; - } - public String getWorkorderCode() { - return workorderCode; - } - - public void setWorkorderName(String workorderName) { - this.workorderName = workorderName; - } - public String getWorkorderName() { - return workorderName; - } - - public void setProductSpc(String productSpc) { - this.productSpc = productSpc; - } - public String getProductSpc() { - return productSpc; - } - - public void setProductName(String productName) { - this.productName = productName; - } - public String getProductName() { - return productName; - } - - public void setValidateStatus(String ValidateStatus) { - this.validateStatus = ValidateStatus; - } - public String getValidateStatus() { - return validateStatus; - } - - public void setAttr1(String attr1) { - this.attr1 = attr1; - } - public String getAttr1() { - return attr1; - } - - public void setAttr2(String attr2) { - this.attr2 = attr2; - } - public String getAttr2() { - return attr2; - } - - public void setAttr3(String attr3) { - this.attr3 = attr3; - } - public String getAttr3() { - return attr3; - } - - public void setAttr4(String attr4) { - this.attr4 = attr4; - } - public String getAttr4() { - return attr4; - } - - public void setFactoryCode(String factoryCode) { - this.factoryCode = factoryCode; - } - public String getFactoryCode() { - return factoryCode; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("validateId", getValidateId()) - .append("workorderCode", getWorkorderCode()) - .append("workorderName", getWorkorderName()) - .append("productSpc", getProductSpc()) - .append("productName", getProductName()) - .append("status", getStatus()) - .append("remark", getRemark()) - .append("attr1", getAttr1()) - .append("attr2", getAttr2()) - .append("attr3", getAttr3()) - .append("attr4", getAttr4()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("factoryCode", getFactoryCode()) - .append("validateType", getValidateType()) - .append("validateName", getValidateName()) - .append("validatStatus", getStatus()) - .append("endTime", getEndTime()) - .toString(); - } -} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesMapper.java b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesMapper.java index 7258badb5..1e3b68d71 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesMapper.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesMapper.java @@ -18,5 +18,4 @@ public interface MesMapper { List getWetPlanDetail(WCSDTO wcsdto); - void getSaveStationArrive(WCSDTO wcsdto); } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesPrepareValidateMapper.java b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesPrepareValidateMapper.java deleted file mode 100644 index 357a8b983..000000000 --- a/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesPrepareValidateMapper.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.op.mes.mapper; - -import java.util.List; - -import com.op.mes.domain.MesPrepareValidate; - -/** - * 生产前准备记录报表Mapper接口 - * - * @author Open Platform - * @date 2023-08-04 - */ -public interface MesPrepareValidateMapper { - /** - * 查询生产前准备记录报表 - * - * @param validateId 生产前准备记录报表主键 - * @return 生产前准备记录报表 - */ - public MesPrepareValidate selectMesPrepareValidateByValidateId(String validateId); - - /** - * 查询生产前准备记录报表列表 - * - * @param mesPrepareValidate 生产前准备记录报表 - * @return 生产前准备记录报表集合 - */ - public List selectMesPrepareValidateList(MesPrepareValidate mesPrepareValidate); - - /** - * 新增生产前准备记录报表 - * - * @param mesPrepareValidate 生产前准备记录报表 - * @return 结果 - */ - public int insertMesPrepareValidate(MesPrepareValidate mesPrepareValidate); - - /** - * 修改生产前准备记录报表 - * - * @param mesPrepareValidate 生产前准备记录报表 - * @return 结果 - */ - public int updateMesPrepareValidate(MesPrepareValidate mesPrepareValidate); - - /** - * 删除生产前准备记录报表 - * - * @param validateId 生产前准备记录报表主键 - * @return 结果 - */ - public int deleteMesPrepareValidateByValidateId(String validateId); - - /** - * 批量删除生产前准备记录报表 - * - * @param validateIds 需要删除的数据主键集合 - * @return 结果 - */ - public int deleteMesPrepareValidateByValidateIds(String[] validateIds); -} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/IMesPrepareValidateService.java b/op-modules/op-mes/src/main/java/com/op/mes/service/IMesPrepareValidateService.java deleted file mode 100644 index 56c0fd568..000000000 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/IMesPrepareValidateService.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.op.mes.service; - -import java.util.List; -import com.op.mes.domain.MesPrepareValidate; - -/** - * 生产前准备记录报表Service接口 - * - * @author Open Platform - * @date 2023-08-04 - */ -public interface IMesPrepareValidateService { - /** - * 查询生产前准备记录报表 - * - * @param validateId 生产前准备记录报表主键 - * @return 生产前准备记录报表 - */ - public MesPrepareValidate selectMesPrepareValidateByValidateId(String validateId); - - /** - * 查询生产前准备记录报表列表 - * - * @param mesPrepareValidate 生产前准备记录报表 - * @return 生产前准备记录报表集合 - */ - public List selectMesPrepareValidateList(MesPrepareValidate mesPrepareValidate); - - /** - * 新增生产前准备记录报表 - * - * @param mesPrepareValidate 生产前准备记录报表 - * @return 结果 - */ - public int insertMesPrepareValidate(MesPrepareValidate mesPrepareValidate); - - /** - * 修改生产前准备记录报表 - * - * @param mesPrepareValidate 生产前准备记录报表 - * @return 结果 - */ - public int updateMesPrepareValidate(MesPrepareValidate mesPrepareValidate); - - /** - * 批量删除生产前准备记录报表 - * - * @param validateIds 需要删除的生产前准备记录报表主键集合 - * @return 结果 - */ - public int deleteMesPrepareValidateByValidateIds(String[] validateIds); - - /** - * 删除生产前准备记录报表信息 - * - * @param validateId 生产前准备记录报表主键 - * @return 结果 - */ - public int deleteMesPrepareValidateByValidateId(String validateId); -} diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesMapper.xml index 197c1c0ed..85b585b34 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesMapper.xml @@ -9,8 +9,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bucket_code loadNo from pro_wet_material_plan_detail where material_code = #{sku} and CONVERT(varchar(10),plan_time, 120) = CONVERT(varchar(10),#{reqTime}, 120) - - diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareDetailMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareDetailMapper.xml index 61756be15..1c7db9850 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareDetailMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareDetailMapper.xml @@ -54,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and attr4 = #{attr4} and prod_type = #{prodType} and factory_code = #{factoryCode} + and del_flag = '0' @@ -117,6 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{updateTime}, #{prodType}, #{factoryCode}, + @@ -163,11 +165,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from mes_prepare_detail where record_id = #{recordId} + update mes_prepare_detail + set del_flag = '1' + where record_id = #{recordId} - delete from mes_prepare_detail where record_id in + update mes_prepare_detail + set del_flag = '1' + where record_id in #{recordId} diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareMapper.xml index 85b01bd10..be2c3b339 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareMapper.xml @@ -94,6 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and ancestors = #{ancestors} and status = #{status} and factory_code = #{factoryCode} + and ms.del_flag = '0' @@ -108,11 +109,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from pro_order_workorder where parent_order = '0' and prod_type != 'white' and CONVERT(varchar(100), product_date, 23) = #{dayStr} + and del_flag = '0' @@ -218,11 +224,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from mes_prepare where prepare_id = #{prepareId} + update mes_prepare + set del_flag = '1' + where prepare_id = #{prepareId} - delete from mes_prepare where prepare_id in + update mes_prepare + set del_flag = '1' + where prepare_id in #{prepareId} diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareValidateMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareValidateMapper.xml deleted file mode 100644 index 74daefc6d..000000000 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareValidateMapper.xml +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select validate_id, workorder_code, workorder_name, product_spc, product_name, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code from mes_prepare_validate - - - - - - - - insert into mes_prepare_validate - - validate_id, - workorder_code, - workorder_name, - product_spc, - product_name, - status, - remark, - attr1, - attr2, - attr3, - attr4, - create_by, - create_time, - update_by, - update_time, - factory_code, - - - #{validateId}, - #{workorderCode}, - #{workorderName}, - #{productSpc}, - #{productName}, - #{status}, - #{remark}, - #{attr1}, - #{attr2}, - #{attr3}, - #{attr4}, - #{createBy}, - #{createTime}, - #{updateBy}, - #{updateTime}, - #{factoryCode}, - - - - - update mes_prepare_validate - - workorder_code = #{workorderCode}, - workorder_name = #{workorderName}, - product_spc = #{productSpc}, - product_name = #{productName}, - status = #{status}, - remark = #{remark}, - attr1 = #{attr1}, - attr2 = #{attr2}, - attr3 = #{attr3}, - attr4 = #{attr4}, - create_by = #{createBy}, - create_time = #{createTime}, - update_by = #{updateBy}, - update_time = #{updateTime}, - factory_code = #{factoryCode}, - - where validate_id = #{validateId} - - - - delete from mes_prepare_validate where validate_id = #{validateId} - - - - delete from mes_prepare_validate where validate_id in - - #{validateId} - - - \ No newline at end of file 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 a0db2c828..37d1d4496 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 @@ -3,7 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -26,7 +26,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select record_id, workorder_code, material_code, material_name, material_spc, quantity, unit, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code,report_code from mes_report_work_consume + select record_id, workorder_code, material_code, material_name, material_spc, + quantity, unit, remark, attr1, attr2, attr3, attr4, create_by, create_time, + update_by, update_time, factory_code,report_code + from mes_report_work_consume @@ -51,12 +55,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where report_code = #{recordCode} - + - + insert into mes_report_work_consume @@ -126,13 +130,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from mes_report_work_consume where record_id = #{recordId} + update mes_report_work_consume + set del_flag = '1' + where record_id = #{recordId} - delete from mes_report_work_consume where record_id in + update mes_report_work_consume + set del_flag = '1' + where record_id in #{recordId} - \ No newline at end of file + 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 ab07b61d7..5650a8cbf 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 @@ -40,7 +40,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, report_type, report_code, workorder_code, product_code, product_name, spec, unit, quantity, quantity_feedback, quantity_qualified, quantity_unqualified, user_name, nick_name, feedback_channel, feedback_time, record_user, status, remark, work_time, machine_code, machine_name, team_code, shift_code, attr1, attr2, attr3, attr4, create_by, create_time, update_time, update_by from mes_report_work + select id, report_type, report_code, workorder_code, product_code, + product_name, spec, unit, quantity, quantity_feedback, quantity_qualified, + quantity_unqualified, user_name, nick_name, feedback_channel, + feedback_time, record_user, status, remark, work_time, machine_code, + machine_name, team_code, shift_code, attr1, attr2, attr3, attr4, create_by, + create_time, update_time, update_by + from mes_report_work @@ -74,12 +75,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT powb.batch_code - FROM pro_order_workorder_batch powb LEFT JOIN pro_order_workorder pow + FROM pro_order_workorder_batch powb + LEFT JOIN pro_order_workorder pow ON powb.workorder_id = pow.workorder_id - WHERE pow.workorder_id = #{workorderId} + WHERE pow.workorder_id = #{workorderId} and powb.del_flag = '0' @@ -40,6 +43,7 @@ and attr4 = #{attr4} and prod_type = #{prodType} and factory_code = #{factoryCode} + and del_flag = '0' @@ -127,11 +131,15 @@ - delete from pro_order_workorder_batch where workorder_id = #{workorderId} + update pro_order_workorder_batch + set del_flag = '1' + where workorder_id = #{workorderId} - delete from pro_order_workorder_batch where workorder_id in + update pro_order_workorder_batch + set del_flag = '1' + where workorder_id in #{workorderId} 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 8341a066b..adc5ada5e 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 @@ -78,33 +78,38 @@ and end_flag = #{endFlag} and CONVERT(varchar(10),product_date, 120) >= '${productDateStart}' and '${productDateEnd}%' >= CONVERT(varchar(10),product_date, 120) + and del_flag = '0' @@ -112,7 +117,9 @@ where workorder_id not in ( select workorder_id - from pro_wet_material_plan_detail) and CONVERT(date, product_date) = #{productDate} and prod_type = 'white' + from pro_wet_material_plan_detail) + and CONVERT(date, product_date) = #{productDate} and prod_type = 'white' + and del_flag = '0' @@ -332,14 +345,14 @@ insert into mes_prepare_detail ( - record_id, prepare_id, material_code, materail_name, materail_spc, unit, - quantity, product_date, shift_id, + record_id, prepare_id, material_code, material_name, material_spc, unit, + quantity, create_by,create_time, prod_type, factory_code )values ( - #{item.id},#{item.prepareId},#{item.materialCode},#{item.materailName},#{item.materailSpc},#{item.unit}, - #{item.quantity},#{item.productDate},#{item.shiftId}, + #{item.recordId},#{item.prepareId},#{item.materialCode},#{item.materailName},#{item.materailSpc},#{item.unit}, + #{item.quantity}, #{item.createBy},#{item.createTime},#{item.prodType},#{item.factoryCode} ) @@ -390,26 +403,34 @@ #{workorderCode} + and del_flag = '0' update pro_order_workorder set workorder_code_sap = #{workorderCodeSap}, status = 'w1' where workorder_code = #{workorderId} + and del_flag = '0' - delete from pro_order_workorder where workorder_id = #{workorderId} + update pro_order_workorder + set del_flag = '1' + where workorder_id = #{workorderId} - delete from pro_order_workorder where workorder_id in + update pro_order_workorder + set del_flag = '1' + where workorder_id in #{workorderId} - delete from pro_order_workorder where order_id = #{id} + update pro_order_workorder + set del_flag = '1' + where order_id = #{id} diff --git a/op-modules/op-plan/src/main/resources/mapper/plan/ProWetMaterialPlanDetailMapper.xml b/op-modules/op-plan/src/main/resources/mapper/plan/ProWetMaterialPlanDetailMapper.xml index cb6784065..0d0898b48 100644 --- a/op-modules/op-plan/src/main/resources/mapper/plan/ProWetMaterialPlanDetailMapper.xml +++ b/op-modules/op-plan/src/main/resources/mapper/plan/ProWetMaterialPlanDetailMapper.xml @@ -60,6 +60,7 @@ and shift_code = #{shiftCode} and shift_desc = #{shiftDesc} and plan_time = #{planTime} + and del_flag = '0' @@ -73,6 +74,7 @@ from pro_wet_material_plan_detail p join pro_order_workorder w on w.workorder_id = p.workorder_id where p.wet_material_plan_id = #{id} + and p.del_flag = '0' @@ -53,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT bucket_id AS 'bucketId', material_id AS 'materialId',shift_id AS 'shiftId' FROM pro_wet_material_plan_detail WHERE CONVERT(date, plan_time) = #{planTime} + and del_flag = '0' GROUP BY bucket_id,material_id,shift_id @@ -78,12 +80,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select id from pro_wet_material_plan where prod_source = #{bucketCode} and plan_time = #{planTime} and shift_id = #{shiftId} + and del_flag = '0' @@ -181,11 +185,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from pro_wet_material_plan where id = #{id} + update pro_wet_material_plan + set del_flag = '1' + where id = #{id} - delete from pro_wet_material_plan where id in + update pro_wet_material_plan + set del_flag = '1' + where id in #{id} diff --git a/op-modules/op-plan/src/main/resources/mapper/plan/ProWhiteOrderMapper.xml b/op-modules/op-plan/src/main/resources/mapper/plan/ProWhiteOrderMapper.xml index a44bb3edb..6e922013c 100644 --- a/op-modules/op-plan/src/main/resources/mapper/plan/ProWhiteOrderMapper.xml +++ b/op-modules/op-plan/src/main/resources/mapper/plan/ProWhiteOrderMapper.xml @@ -30,7 +30,11 @@ - select id, factory_code, order_type, order_code, prod_code, prod_desc, quantity, quantity_split, unit, worker_order, plan_pro_date, plan_complete, atrr1, atrr2, atrr3, status, parent_order, create_by, create_time, update_by, update_time, prod_type from pro_order + select id, factory_code, order_type, order_code, prod_code, prod_desc, + quantity, quantity_split, unit, worker_order, plan_pro_date, + plan_complete, atrr1, atrr2, atrr3, status, parent_order, create_by, + create_time, update_by, update_time, prod_type + from pro_order @@ -68,7 +72,7 @@ + +