diff --git a/op-modules/op-device/src/main/java/com/op/device/controller/EquUpkeepController.java b/op-modules/op-device/src/main/java/com/op/device/controller/EquUpkeepController.java index cf150095..26e4966f 100644 --- a/op-modules/op-device/src/main/java/com/op/device/controller/EquUpkeepController.java +++ b/op-modules/op-device/src/main/java/com/op/device/controller/EquUpkeepController.java @@ -85,7 +85,7 @@ public class EquUpkeepController extends BaseController { @Log(title = "保养计划", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody EquPlan equPlan) { - return toAjax(equUpkeepService.insertEquPlan(equPlan)); + return equUpkeepService.insertEquPlan(equPlan); } /** diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/EquPlan.java b/op-modules/op-device/src/main/java/com/op/device/domain/EquPlan.java index 9a30ef5c..9b94d330 100644 --- a/op-modules/op-device/src/main/java/com/op/device/domain/EquPlan.java +++ b/op-modules/op-device/src/main/java/com/op/device/domain/EquPlan.java @@ -126,11 +126,7 @@ public class EquPlan extends BaseEntity { // 创建日期结束 private String createTimeEnd; - // 关联-计划->设备list - private List equPlanEquList; - private List equipmentItem; - private List personList; private List planTimeArray; @@ -139,6 +135,39 @@ public class EquPlan extends BaseEntity { private String workCenterName; + // 保养类型 + private String upkeep; + + // 计划保养时间计算规则 + private String calculationRule; + + // 是否停机保养 + private String shutDown; + + public String getUpkeep() { + return upkeep; + } + + public void setUpkeep(String upkeep) { + this.upkeep = upkeep; + } + + public String getCalculationRule() { + return calculationRule; + } + + public void setCalculationRule(String calculationRule) { + this.calculationRule = calculationRule; + } + + public String getShutDown() { + return shutDown; + } + + public void setShutDown(String shutDown) { + this.shutDown = shutDown; + } + public String getWorkCenterName() { return workCenterName; } @@ -179,14 +208,6 @@ public class EquPlan extends BaseEntity { this.personList = personList; } - public List getEquPlanEquList() { - return equPlanEquList; - } - - public void setEquPlanEquList(List equPlanEquList) { - this.equPlanEquList = equPlanEquList; - } - public List getCreateTimeArray() { return createTimeArray; } diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/EquPlanEqu.java b/op-modules/op-device/src/main/java/com/op/device/domain/EquPlanEqu.java index 53f044e5..5b0adbfe 100644 --- a/op-modules/op-device/src/main/java/com/op/device/domain/EquPlanEqu.java +++ b/op-modules/op-device/src/main/java/com/op/device/domain/EquPlanEqu.java @@ -64,6 +64,17 @@ public class EquPlanEqu extends BaseEntity { // 主计划code private String planCode; + // 备件 + private List spareList; + + public List getSpareList() { + return spareList; + } + + public void setSpareList(List spareList) { + this.spareList = spareList; + } + public String getPlanCode() { return planCode; } diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/EquPlanEquSpare.java b/op-modules/op-device/src/main/java/com/op/device/domain/EquPlanEquSpare.java new file mode 100644 index 00000000..a222e0ad --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/domain/EquPlanEquSpare.java @@ -0,0 +1,182 @@ +package com.op.device.domain; + +import java.math.BigDecimal; +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; + +/** + * 计划设备备件关联对象 equ_plan_equ_spare + * + * @author Open Platform + * @date 2023-10-26 + */ +public class EquPlanEquSpare extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 主键 */ + private String id; + + /** 编码 */ + @Excel(name = "编码") + private String code; + + /** 主计划code */ + @Excel(name = "主计划code") + private String planCode; + + /** 关联上级code */ + @Excel(name = "关联上级code") + private String parentCode; + + /** 备件code */ + @Excel(name = "备件code") + private String materialCode; + + /** 备件名称 */ + @Excel(name = "备件名称") + private String materialDesc; + + /** 备件类型 */ + @Excel(name = "备件类型") + private String spareType; + + /** 申领数量 */ + @Excel(name = "申领数量") + private BigDecimal applyNum; + + /** 工厂 */ + @Excel(name = "工厂") + private String factoryCode; + + /** 备用字段1 */ + @Excel(name = "备用字段1") + private String attr1; + + /** 备用字段2 */ + @Excel(name = "备用字段2") + private String attr2; + + /** 备用字段3 */ + @Excel(name = "备用字段3") + private String attr3; + + /** 删除标识 */ + private String delFlag; + + public void setId(String id) { + this.id = id; + } + + public String getId() { + return id; + } + public void setCode(String code) { + this.code = code; + } + + public String getCode() { + return code; + } + public void setPlanCode(String planCode) { + this.planCode = planCode; + } + + public String getPlanCode() { + return planCode; + } + public void setParentCode(String parentCode) { + this.parentCode = parentCode; + } + + public String getParentCode() { + return parentCode; + } + public void setMaterialCode(String materialCode) { + this.materialCode = materialCode; + } + + public String getMaterialCode() { + return materialCode; + } + public void setMaterialDesc(String materialDesc) { + this.materialDesc = materialDesc; + } + + public String getMaterialDesc() { + return materialDesc; + } + public void setSpareType(String spareType) { + this.spareType = spareType; + } + + public String getSpareType() { + return spareType; + } + public void setApplyNum(BigDecimal applyNum) { + this.applyNum = applyNum; + } + + public BigDecimal getApplyNum() { + return applyNum; + } + public void setFactoryCode(String factoryCode) { + this.factoryCode = factoryCode; + } + + public String getFactoryCode() { + return factoryCode; + } + 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 setDelFlag(String delFlag) { + this.delFlag = delFlag; + } + + public String getDelFlag() { + return delFlag; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("code", getCode()) + .append("planCode", getPlanCode()) + .append("parentCode", getParentCode()) + .append("materialCode", getMaterialCode()) + .append("materialDesc", getMaterialDesc()) + .append("spareType", getSpareType()) + .append("applyNum", getApplyNum()) + .append("factoryCode", getFactoryCode()) + .append("attr1", getAttr1()) + .append("attr2", getAttr2()) + .append("attr3", getAttr3()) + .append("delFlag", getDelFlag()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/SparePartsLedger.java b/op-modules/op-device/src/main/java/com/op/device/domain/SparePartsLedger.java index dd326cb3..3db76127 100644 --- a/op-modules/op-device/src/main/java/com/op/device/domain/SparePartsLedger.java +++ b/op-modules/op-device/src/main/java/com/op/device/domain/SparePartsLedger.java @@ -198,6 +198,17 @@ public class SparePartsLedger extends BaseEntity { @Excel(name = "备件类型", readConverterExp = "备=件用") private String spareType; + // 领用数量-保养备件领用使用 + private BigDecimal applyNum; + + public BigDecimal getApplyNum() { + return applyNum; + } + + public void setApplyNum(BigDecimal applyNum) { + this.applyNum = applyNum; + } + public void setSpareType(String spareType) { this.spareType = spareType; } diff --git a/op-modules/op-device/src/main/java/com/op/device/mapper/EquPlanEquSpareMapper.java b/op-modules/op-device/src/main/java/com/op/device/mapper/EquPlanEquSpareMapper.java new file mode 100644 index 00000000..077f6197 --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/mapper/EquPlanEquSpareMapper.java @@ -0,0 +1,61 @@ +package com.op.device.mapper; + +import java.util.List; + +import com.op.device.domain.EquPlanEquSpare; + +/** + * 计划设备备件关联Mapper接口 + * + * @author Open Platform + * @date 2023-10-26 + */ +public interface EquPlanEquSpareMapper { + /** + * 查询计划设备备件关联 + * + * @param id 计划设备备件关联主键 + * @return 计划设备备件关联 + */ + public EquPlanEquSpare selectEquPlanEquSpareById(String id); + + /** + * 查询计划设备备件关联列表 + * + * @param equPlanEquSpare 计划设备备件关联 + * @return 计划设备备件关联集合 + */ + public List selectEquPlanEquSpareList(EquPlanEquSpare equPlanEquSpare); + + /** + * 新增计划设备备件关联 + * + * @param equPlanEquSpare 计划设备备件关联 + * @return 结果 + */ + public int insertEquPlanEquSpare(EquPlanEquSpare equPlanEquSpare); + + /** + * 修改计划设备备件关联 + * + * @param equPlanEquSpare 计划设备备件关联 + * @return 结果 + */ + public int updateEquPlanEquSpare(EquPlanEquSpare equPlanEquSpare); + + /** + * 删除计划设备备件关联 + * + * @param id 计划设备备件关联主键 + * @return 结果 + */ + public int deleteEquPlanEquSpareById(String id); + + /** + * 批量删除计划设备备件关联 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteEquPlanEquSpareByIds(String[] ids); +} diff --git a/op-modules/op-device/src/main/java/com/op/device/service/IEquUpkeepService.java b/op-modules/op-device/src/main/java/com/op/device/service/IEquUpkeepService.java index de17e703..13f59f54 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/IEquUpkeepService.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/IEquUpkeepService.java @@ -36,7 +36,7 @@ public interface IEquUpkeepService { * @param equPlan 保养计划 * @return 结果 */ - public int insertEquPlan(EquPlan equPlan); + public AjaxResult insertEquPlan(EquPlan equPlan); /** * 修改保养计划 diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/DevicePDAServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/DevicePDAServiceImpl.java index 9c6604d6..5d1c86e5 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/impl/DevicePDAServiceImpl.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/DevicePDAServiceImpl.java @@ -134,8 +134,6 @@ public class DevicePDAServiceImpl implements IDevicePDAService { @Override @DS("#header.poolName") public AjaxResult updateInspectionRecord(EquOrder equOrder) { - // 改变工单状态-已完成 - equOrder.setOrderStatus("1"); EquOrderEqu equ = equOrder.getEqu(); List detailList = equ.getDetailList(); @@ -169,7 +167,10 @@ public class DevicePDAServiceImpl implements IDevicePDAService { } // 更新工单信息 + equOrder.setOrderStatus("1"); equOrder.setUpdateTime(DateUtils.getNowDate()); + equOrder.setUpdateBy(SecurityContextHolder.getUserName()); + equOrder.setPlanPerson(SecurityContextHolder.getUserName()); equOrderMapper.updateEquOrder(equOrder); return success(equOrder); diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquUpkeepServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquUpkeepServiceImpl.java index 37949a9e..c6165672 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquUpkeepServiceImpl.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquUpkeepServiceImpl.java @@ -1,19 +1,21 @@ package com.op.device.service.impl; import com.baomidou.dynamic.datasource.annotation.DS; +import com.op.common.core.context.SecurityContextHolder; import com.op.common.core.utils.DateUtils; +import com.op.common.core.utils.uuid.IdUtils; import com.op.common.core.web.domain.AjaxResult; -import com.op.device.domain.EquCheckItem; -import com.op.device.domain.EquCheckItemDetail; -import com.op.device.domain.EquPlan; -import com.op.device.domain.EquPlanEqu; -import com.op.device.mapper.EquCheckItemDetailMapper; -import com.op.device.mapper.EquCheckItemMapper; -import com.op.device.mapper.EquPlanMapper; +import com.op.device.domain.*; +import com.op.device.mapper.*; import com.op.device.service.IEquUpkeepService; +import com.op.system.api.domain.SysUser; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; +import javax.servlet.http.HttpServletRequest; import java.util.List; import static com.op.common.core.web.domain.AjaxResult.error; @@ -28,6 +30,16 @@ public class EquUpkeepServiceImpl implements IEquUpkeepService { private EquCheckItemMapper equCheckItemMapper; @Autowired private EquCheckItemDetailMapper equCheckItemDetailMapper; + @Autowired + private EquPlanStandardMapper equPlanStandardMapper; + @Autowired + private EquPlanDetailMapper equPlanDetailMapper; + @Autowired + private EquPlanEquMapper equPlanEquMapper; + @Autowired + private EquPlanEquSpareMapper equPlanEquSpareMapper; + @Autowired + private EquPlanPersonMapper equPlanPersonMapper; /** * 查询保养计划 @@ -54,16 +66,160 @@ public class EquUpkeepServiceImpl implements IEquUpkeepService { } /** - * 新增保养计划 + * TODO 新增保养计划 * * @param equPlan 保养计划 * @return 结果 */ @Override @DS("#header.poolName") - public int insertEquPlan(EquPlan equPlan) { + public AjaxResult insertEquPlan(EquPlan equPlan) { + + // 获取当前所选工厂 + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + String key = "#header.poolName"; + String str = request.getHeader(key.substring(8)); + int index = str.indexOf("_"); + String factory = str.substring(index + 1); + + // 计划流水号 + String planSerialNum = String.format("%03d", equPlanMapper.selectSerialNumber()); + + // 处理计划信息 + equPlan.setPlanId(IdUtils.fastSimpleUUID()); + equPlan.setPlanCode((DateUtils.dateTimeNow(DateUtils.YYYYMMDD) + planSerialNum)); + if (equPlan.getPlanTimeArray().size() > 0) { + equPlan.setPlanLoopStart(equPlan.getPlanTimeArray().get(0)); + equPlan.setPlanLoopEnd(equPlan.getPlanTimeArray().get(1)); + } + equPlan.setFactoryCode(factory); + equPlan.setCreateBy(SecurityContextHolder.getUserName()); equPlan.setCreateTime(DateUtils.getNowDate()); - return equPlanMapper.insertEquPlan(equPlan); + equPlan.setUpdateBy(SecurityContextHolder.getUserName()); + equPlan.setUpdateTime(DateUtils.getNowDate()); + + // 主计划插入数据库 + equPlanMapper.insertEquPlan(equPlan); + + // 处理设备信息 + List equipmentItemList = equPlan.getEquipmentItem(); + // 计划-设备流水号 + int equipmentCodeTemp = 0; + for (EquPlanEqu equipment : equipmentItemList) { + equipment.setId(IdUtils.fastSimpleUUID()); + equipment.setPlanCode(equPlan.getPlanCode()); + equipment.setCode("E" + equPlan.getPlanCode() + String.format("%02d", ++equipmentCodeTemp)); + equipment.setParentCode(equPlan.getPlanCode()); + equipment.setFactoryCode(factory); + equipment.setCreateBy(SecurityContextHolder.getUserName()); + equipment.setCreateTime(DateUtils.getNowDate()); + equipment.setUpdateBy(SecurityContextHolder.getUserName()); + equipment.setUpdateTime(DateUtils.getNowDate()); + + // 处理检查项信息 + List equCheckItemList = equipment.getEquCheckItemList(); + if (equCheckItemList != null) { + // 计划检查项流水号 + int itemCodeTemp = 0; + + for (EquCheckItem item : equCheckItemList) { + + if (item != null) { + EquPlanDetail planDetail = new EquPlanDetail(); + BeanUtils.copyProperties(item, planDetail); + + planDetail.setId(IdUtils.fastSimpleUUID()); + planDetail.setPlanCode(equPlan.getPlanCode()); + planDetail.setCode("C" + equPlan.getPlanCode() + String.format("%02d", ++itemCodeTemp)); + planDetail.setParentCode(equipment.getCode()); + planDetail.setCreateBy(SecurityContextHolder.getUserName()); + planDetail.setCreateTime(DateUtils.getNowDate()); + planDetail.setUpdateBy(SecurityContextHolder.getUserName()); + planDetail.setUpdateTime(DateUtils.getNowDate()); + + // 处理标准 + List equCheckItemDetailList = item.getEquCheckItemDetailList(); + + // 检查项详情流水号 + int detailCodeTemp = 0; + + // 判断是否插入检查项 + boolean checkInsert = false; + + for (EquCheckItemDetail detail : equCheckItemDetailList) { + + if (detail.getShowFlag()) { + + checkInsert = true; + + EquPlanStandard planStandard = new EquPlanStandard(); + BeanUtils.copyProperties(detail, planStandard); + + planStandard.setId(IdUtils.fastSimpleUUID()); + planStandard.setParentCode(planDetail.getCode()); + planStandard.setPlanCode(equPlan.getPlanCode()); + planStandard.setCode("D" + equPlan.getPlanCode() + String.format("%02d", ++detailCodeTemp)); + planStandard.setCreateBy(SecurityContextHolder.getUserName()); + planStandard.setCreateTime(DateUtils.getNowDate()); + planStandard.setUpdateBy(SecurityContextHolder.getUserName()); + planStandard.setUpdateTime(DateUtils.getNowDate()); + + // 详情插入数据库 + equPlanStandardMapper.insertEquPlanStandard(planStandard); + } + + } + + // 检查项详情为空则不生成检查项信息-检查项插入数据库 + if (checkInsert) { + equPlanDetailMapper.insertEquPlanDetail(planDetail); + } + } + + } + + // 设备插入数据库 + equPlanEquMapper.insertEquPlanEqu(equipment); + } + + // 处理备件信息 + List spareList = equipment.getSpareList(); + // 计划备件流水号 + int spareCodeTemp = 0; + if (spareList != null) { + for (EquPlanEquSpare spare : spareList) { + spare.setId(IdUtils.fastSimpleUUID()); + spare.setCode("S" + equPlan.getPlanCode() + String.format("%02d", ++equipmentCodeTemp)); + spare.setPlanCode(equPlan.getPlanCode()); + spare.setParentCode(equPlan.getPlanCode()); + spare.setFactoryCode(factory); + spare.setCreateBy(SecurityContextHolder.getUserName()); + spare.setCreateTime(DateUtils.getNowDate()); + spare.setUpdateBy(SecurityContextHolder.getUserName()); + spare.setUpdateTime(DateUtils.getNowDate()); + + equPlanEquSpareMapper.insertEquPlanEquSpare(spare); + } + } + } + // 处理人员信息 + List personList = equPlan.getPersonList(); + for (SysUser user : personList) { + EquPlanPerson equPlanPerson = new EquPlanPerson(); + + equPlanPerson.setId(IdUtils.fastSimpleUUID()); + equPlanPerson.setUserId(user.getUserId()); + equPlanPerson.setPlanCode(equPlan.getPlanCode()); + equPlanPerson.setFactoryCode(factory); + equPlanPerson.setCreateBy(SecurityContextHolder.getUserName()); + equPlanPerson.setCreateTime(DateUtils.getNowDate()); + equPlanPerson.setUpdateBy(SecurityContextHolder.getUserName()); + equPlanPerson.setUpdateTime(DateUtils.getNowDate()); + + equPlanPersonMapper.insertEquPlanPerson(equPlanPerson); + } + + return success(equPlan); } /** diff --git a/op-modules/op-device/src/main/resources/mapper/device/EquPlanEquSpareMapper.xml b/op-modules/op-device/src/main/resources/mapper/device/EquPlanEquSpareMapper.xml new file mode 100644 index 00000000..266c2708 --- /dev/null +++ b/op-modules/op-device/src/main/resources/mapper/device/EquPlanEquSpareMapper.xml @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select id, code, plan_code, parent_code, material_code, material_desc, spare_type, apply_num, factory_code, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time from equ_plan_equ_spare + + + + + + + + insert into equ_plan_equ_spare + + id, + code, + plan_code, + parent_code, + material_code, + material_desc, + spare_type, + apply_num, + factory_code, + attr1, + attr2, + attr3, + del_flag, + create_by, + create_time, + update_by, + update_time, + + + #{id}, + #{code}, + #{planCode}, + #{parentCode}, + #{materialCode}, + #{materialDesc}, + #{spareType}, + #{applyNum}, + #{factoryCode}, + #{attr1}, + #{attr2}, + #{attr3}, + #{delFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update equ_plan_equ_spare + + code = #{code}, + plan_code = #{planCode}, + parent_code = #{parentCode}, + material_code = #{materialCode}, + material_desc = #{materialDesc}, + spare_type = #{spareType}, + apply_num = #{applyNum}, + factory_code = #{factoryCode}, + attr1 = #{attr1}, + attr2 = #{attr2}, + attr3 = #{attr3}, + del_flag = #{delFlag}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from equ_plan_equ_spare where id = #{id} + + + + delete from equ_plan_equ_spare where id in + + #{id} + + + \ No newline at end of file diff --git a/op-modules/op-device/src/main/resources/mapper/device/EquPlanMapper.xml b/op-modules/op-device/src/main/resources/mapper/device/EquPlanMapper.xml index 062eebd7..2f42777f 100644 --- a/op-modules/op-device/src/main/resources/mapper/device/EquPlanMapper.xml +++ b/op-modules/op-device/src/main/resources/mapper/device/EquPlanMapper.xml @@ -22,6 +22,9 @@ + + + @@ -34,7 +37,7 @@ - select plan_id, plan_code, plan_name, plan_workshop, plan_prod_line, equipment_name, equipment_code, plan_loop, plan_loop_type, plan_loop_start, plan_loop_end, plan_person, plan_status, plan_restrict, plan_type, plan_outsource, work_code, factory_code, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time from equ_plan + select plan_id, plan_code, plan_name, plan_workshop, plan_prod_line, equipment_name, equipment_code, plan_loop, plan_loop_type, plan_loop_start, plan_loop_end, plan_person, plan_status, plan_restrict, plan_type, plan_outsource, work_code, upkeep, calculation_rule, shut_down, factory_code, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time from equ_plan @@ -113,6 +119,9 @@ plan_type, plan_outsource, work_code, + upkeep, + calculation_rule, + shut_down, factory_code, attr1, attr2, @@ -141,6 +150,9 @@ #{planType}, #{planOutsource}, #{workCode}, + #{upkeep}, + #{calculationRule}, + #{shutDown}, #{factoryCode}, #{attr1}, #{attr2}, @@ -172,6 +184,9 @@ plan_type = #{planType}, plan_outsource = #{planOutsource}, work_code = #{workCode}, + upkeep = #{upkeep}, + calculation_rule = #{calculationRule}, + shut_down = #{shutDown}, factory_code = #{factoryCode}, attr1 = #{attr1}, attr2 = #{attr2}, @@ -182,7 +197,7 @@ update_by = #{updateBy}, update_time = #{updateTime}, - where plan_id = #{planId} and del_flag = '0' + where plan_id = #{planId}