Merge remote-tracking branch 'origin/master'

highway
zhaoxiaolin 1 year ago
commit 05546bb4dd

@ -95,7 +95,7 @@ public class EquUpkeepController extends BaseController {
@Log(title = "保养计划", businessType = BusinessType.UPDATE) @Log(title = "保养计划", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody EquPlan equPlan) { public AjaxResult edit(@RequestBody EquPlan equPlan) {
return toAjax(equUpkeepService.updateEquPlan(equPlan)); return equUpkeepService.updateEquPlan(equPlan);
} }
/** /**

@ -76,6 +76,16 @@ public class EquPlanStandard extends BaseEntity {
private String standardTypeName; private String standardTypeName;
private Boolean showFlag;
public Boolean getShowFlag() {
return showFlag;
}
public void setShowFlag(Boolean showFlag) {
this.showFlag = showFlag;
}
public String getStandardTypeName() { public String getStandardTypeName() {
return standardTypeName; return standardTypeName;
} }

@ -58,4 +58,10 @@ public interface EquPlanEquSpareMapper {
* @return * @return
*/ */
public int deleteEquPlanEquSpareByIds(String[] ids); public int deleteEquPlanEquSpareByIds(String[] ids);
/**
*
* @param planCode
*/
void deleteEquPlanEquSpareByPlanCode(String planCode);
} }

@ -44,7 +44,7 @@ public interface IEquUpkeepService {
* @param equPlan * @param equPlan
* @return * @return
*/ */
public int updateEquPlan(EquPlan equPlan); public AjaxResult updateEquPlan(EquPlan equPlan);
/** /**
* *

@ -51,6 +51,8 @@ public class EquPlanServiceImpl implements IEquPlanService {
private EquPlanDetailMapper equPlanDetailMapper; private EquPlanDetailMapper equPlanDetailMapper;
@Autowired @Autowired
private EquPlanEquMapper equPlanEquMapper; private EquPlanEquMapper equPlanEquMapper;
@Autowired
private EquPlanEquSpareMapper equPlanEquSpareMapper;
/** /**
* *
@ -244,20 +246,30 @@ public class EquPlanServiceImpl implements IEquPlanService {
// 获取检查项list // 获取检查项list
List<EquCheckItem> equCheckItemList = equCheckItemMapper.selectCheckItemByEquipmentCode(data.getEquipmentCode(),"inspection"); List<EquCheckItem> equCheckItemList = equCheckItemMapper.selectCheckItemByEquipmentCode(data.getEquipmentCode(),"inspection");
if (equCheckItemList.size() > 0) { if (equCheckItemList.size() > 0) {
List<EquPlanDetail> detailList = new ArrayList<>();
for (EquCheckItem checkItem : equCheckItemList) { for (EquCheckItem checkItem : equCheckItemList) {
if (!checkItem.getItemCode().isEmpty()) { EquPlanDetail detail = new EquPlanDetail();
itemTempName.append(checkItem.getItemName()).append(","); BeanUtils.copyProperties(checkItem,detail);
if (!detail.getItemCode().isEmpty()) {
itemTempName.append(detail.getItemName()).append(",");
// 获取检查项详情list // 获取检查项详情list
List<EquCheckItemDetail> equCheckItemDetailList = equCheckItemDetailMapper.selectCheckItemDetailByItemCode(checkItem.getItemCode()); List<EquCheckItemDetail> equCheckItemDetailList = equCheckItemDetailMapper.selectCheckItemDetailByItemCode(detail.getItemCode());
if (equCheckItemList.size() > 0) { if (equCheckItemList.size() > 0) {
for (EquCheckItemDetail detail : equCheckItemDetailList) { List<EquPlanStandard> standardList = new ArrayList<>();
detail.setShowFlag(true); for (EquCheckItemDetail standardTemp : equCheckItemDetailList) {
EquPlanStandard standard = new EquPlanStandard();
BeanUtils.copyProperties(standardTemp,standard);
standard.setShowFlag(true);
standardList.add(standard);
} }
checkItem.setEquCheckItemDetailList(equCheckItemDetailList); detail.setEquPlanStandardList(standardList);
} }
} }
detailList.add(detail);
} }
data.setEquCheckItemList(equCheckItemList); data.setEquPlanDetailList(detailList);
data.setItemTempName(itemTempName.toString()); data.setItemTempName(itemTempName.toString());
}else { }else {
return error(500,"存在设备未设置巡检项!"); return error(500,"存在设备未设置巡检项!");
@ -310,9 +322,11 @@ public class EquPlanServiceImpl implements IEquPlanService {
EquPlan plan = equPlanMapper.selectEquPlanByPlanCode(equPlan.getPlanCode()); EquPlan plan = equPlanMapper.selectEquPlanByPlanCode(equPlan.getPlanCode());
// 处理计划信息 // 处理计划信息
List<Date> planTimeArray = new ArrayList<>(); List<Date> planTimeArray = new ArrayList<>();
if (plan.getPlanLoopStart() != null) {
planTimeArray.add(plan.getPlanLoopStart()); planTimeArray.add(plan.getPlanLoopStart());
planTimeArray.add(plan.getPlanLoopEnd()); planTimeArray.add(plan.getPlanLoopEnd());
plan.setPlanTimeArray(planTimeArray); plan.setPlanTimeArray(planTimeArray);
}
// 获取人员信息 // 获取人员信息
@ -339,6 +353,9 @@ public class EquPlanServiceImpl implements IEquPlanService {
selectStandard.setParentCode(detail.getCode()); selectStandard.setParentCode(detail.getCode());
selectStandard.setPlanCode(equPlan.getPlanCode()); selectStandard.setPlanCode(equPlan.getPlanCode());
List<EquPlanStandard> standardList = equPlanStandardMapper.selectEquPlanStandardList(selectStandard); List<EquPlanStandard> standardList = equPlanStandardMapper.selectEquPlanStandardList(selectStandard);
for (EquPlanStandard standard : standardList) {
standard.setShowFlag(true);
}
// 置入标准 // 置入标准
detail.setEquPlanStandardList(standardList); detail.setEquPlanStandardList(standardList);
@ -346,6 +363,14 @@ public class EquPlanServiceImpl implements IEquPlanService {
// 置入检查项 // 置入检查项
equipment.setEquPlanDetailList(detailList); equipment.setEquPlanDetailList(detailList);
EquPlanEquSpare spare = new EquPlanEquSpare();
spare.setParentCode(equipment.getCode());
List<EquPlanEquSpare> spareList = equPlanEquSpareMapper.selectEquPlanEquSpareList(spare);
if (spareList.size() > 0) {
equipment.setSpareList(spareList);
}
} }
plan.setEquipmentItem(equipmentList); plan.setEquipmentItem(equipmentList);
@ -398,28 +423,25 @@ public class EquPlanServiceImpl implements IEquPlanService {
equipment.setUpdateTime(DateUtils.getNowDate()); equipment.setUpdateTime(DateUtils.getNowDate());
// 处理检查项信息 // 处理检查项信息
List<EquCheckItem> equCheckItemList = equipment.getEquCheckItemList(); List<EquPlanDetail> detailList = equipment.getEquPlanDetailList();
if (equCheckItemList != null) { if (detailList != null) {
// 计划检查项流水号 // 计划检查项流水号
int itemCodeTemp = 0; int itemCodeTemp = 0;
for (EquCheckItem item : equCheckItemList) { for (EquPlanDetail item : detailList) {
if (item != null) { if (item != null) {
EquPlanDetail planDetail = new EquPlanDetail(); item.setId(IdUtils.fastSimpleUUID());
BeanUtils.copyProperties(item, planDetail); item.setPlanCode(equPlan.getPlanCode());
item.setCode("C" + equPlan.getPlanCode() + String.format("%02d", ++itemCodeTemp));
planDetail.setId(IdUtils.fastSimpleUUID()); item.setParentCode(equipment.getCode());
planDetail.setPlanCode(equPlan.getPlanCode()); item.setCreateBy(SecurityContextHolder.getUserName());
planDetail.setCode("C" + equPlan.getPlanCode() + String.format("%02d", ++itemCodeTemp)); item.setCreateTime(DateUtils.getNowDate());
planDetail.setParentCode(equipment.getCode()); item.setUpdateBy(SecurityContextHolder.getUserName());
planDetail.setCreateBy(SecurityContextHolder.getUserName()); item.setUpdateTime(DateUtils.getNowDate());
planDetail.setCreateTime(DateUtils.getNowDate());
planDetail.setUpdateBy(SecurityContextHolder.getUserName());
planDetail.setUpdateTime(DateUtils.getNowDate());
// 处理标准 // 处理标准
List<EquCheckItemDetail> equCheckItemDetailList = item.getEquCheckItemDetailList(); List<EquPlanStandard> standardList = item.getEquPlanStandardList();
// 检查项详情流水号 // 检查项详情流水号
int detailCodeTemp = 0; int detailCodeTemp = 0;
@ -427,33 +449,30 @@ public class EquPlanServiceImpl implements IEquPlanService {
// 判断是否插入检查项 // 判断是否插入检查项
boolean checkInsert = false; boolean checkInsert = false;
for (EquCheckItemDetail detail : equCheckItemDetailList) { for (EquPlanStandard standard : standardList) {
if (detail.getShowFlag()) { if (standard.getShowFlag()) {
checkInsert = true; checkInsert = true;
EquPlanStandard planStandard = new EquPlanStandard(); standard.setId(IdUtils.fastSimpleUUID());
BeanUtils.copyProperties(detail, planStandard); standard.setParentCode(item.getCode());
standard.setPlanCode(equPlan.getPlanCode());
planStandard.setId(IdUtils.fastSimpleUUID()); standard.setCode("D" + equPlan.getPlanCode() + String.format("%02d", ++detailCodeTemp));
planStandard.setParentCode(planDetail.getCode()); standard.setCreateBy(SecurityContextHolder.getUserName());
planStandard.setPlanCode(equPlan.getPlanCode()); standard.setCreateTime(DateUtils.getNowDate());
planStandard.setCode("D" + equPlan.getPlanCode() + String.format("%02d", ++detailCodeTemp)); standard.setUpdateBy(SecurityContextHolder.getUserName());
planStandard.setCreateBy(SecurityContextHolder.getUserName()); standard.setUpdateTime(DateUtils.getNowDate());
planStandard.setCreateTime(DateUtils.getNowDate());
planStandard.setUpdateBy(SecurityContextHolder.getUserName());
planStandard.setUpdateTime(DateUtils.getNowDate());
// 详情插入数据库 // 详情插入数据库
equPlanStandardMapper.insertEquPlanStandard(planStandard); equPlanStandardMapper.insertEquPlanStandard(standard);
} }
} }
// 检查项详情为空则不生成检查项信息-检查项插入数据库 // 检查项详情为空则不生成检查项信息-检查项插入数据库
if (checkInsert) { if (checkInsert) {
equPlanDetailMapper.insertEquPlanDetail(planDetail); equPlanDetailMapper.insertEquPlanDetail(item);
} }
} }

@ -16,6 +16,7 @@ import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import static com.op.common.core.web.domain.AjaxResult.error; import static com.op.common.core.web.domain.AjaxResult.error;
@ -101,10 +102,147 @@ public class EquUpkeepServiceImpl implements IEquUpkeepService {
// 主计划插入数据库 // 主计划插入数据库
equPlanMapper.insertEquPlan(equPlan); equPlanMapper.insertEquPlan(equPlan);
// 处理设备信息 insertCommonInfo(equPlan,factory);
return success(equPlan);
}
/**
*
*
* @param equPlan
* @return
*/
@Override
@DS("#header.poolName")
public AjaxResult updateEquPlan(EquPlan equPlan) {
// 更新巡检计划
equPlan.setPlanLoopStart(equPlan.getPlanTimeArray().get(0));
equPlan.setPlanLoopEnd(equPlan.getPlanTimeArray().get(1));
equPlanMapper.updateEquPlan(equPlan);
// 删除该计划下设备、人员、检查项、标准、备件信息
equPlanPersonMapper.deleteEquPlanPersonByPlanCode(equPlan.getPlanCode());
equPlanDetailMapper.deleteEquPlanDetailByPlanCode(equPlan.getPlanCode());
equPlanEquMapper.deleteEquPlanEquByPlanCode(equPlan.getPlanCode());
equPlanStandardMapper.deleteEquPlanStandardByPlanCode(equPlan.getPlanCode());
equPlanEquSpareMapper.deleteEquPlanEquSpareByPlanCode(equPlan.getPlanCode());
//获取当前所选工厂
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);
// 插入设备、人员、检查项、标准信息
insertCommonInfo(equPlan, factory);
return success("修改成功");
}
/**
*
*
* @param planIds
* @return
*/
@Override
@DS("#header.poolName")
public int deleteEquPlanByPlanIds(String[] planIds) {
return equPlanMapper.deleteEquPlanByPlanIds(planIds);
}
/**
*
*
* @param planId
* @return
*/
@Override
@DS("#header.poolName")
public int deleteEquPlanByPlanId(String planId) {
return equPlanMapper.deleteEquPlanByPlanId(planId);
}
/**
* -
*
* @param equPlanEquList
* @return
*/
@Override
@DS("#header.poolName")
public AjaxResult formatEquItem(List<EquPlanEqu> equPlanEquList) {
for (EquPlanEqu data : equPlanEquList) {
StringBuilder itemTempName = new StringBuilder();
// 获取检查项list
List<EquCheckItem> equCheckItemList = equCheckItemMapper.selectCheckItemByEquipmentCode(data.getEquipmentCode(),"maintenance");
if (equCheckItemList.size() > 0) {
List<EquPlanDetail> detailList = new ArrayList<>();
for (EquCheckItem checkItem : equCheckItemList) {
EquPlanDetail detail = new EquPlanDetail();
BeanUtils.copyProperties(checkItem,detail);
if (!detail.getItemCode().isEmpty()) {
itemTempName.append(detail.getItemName()).append(",");
// 获取检查项详情list
List<EquCheckItemDetail> equCheckItemDetailList = equCheckItemDetailMapper.selectCheckItemDetailByItemCode(detail.getItemCode());
if (equCheckItemList.size() > 0) {
List<EquPlanStandard> standardList = new ArrayList<>();
for (EquCheckItemDetail standardTemp : equCheckItemDetailList) {
EquPlanStandard standard = new EquPlanStandard();
BeanUtils.copyProperties(standardTemp,standard);
standard.setShowFlag(true);
standardList.add(standard);
}
detail.setEquPlanStandardList(standardList);
}
}
detailList.add(detail);
}
data.setEquPlanDetailList(detailList);
data.setItemTempName(itemTempName.toString());
}else {
return error(500,"存在设备未设置保养项!");
}
}
return success(equPlanEquList);
}
/**
* TODO
*
* @param equPlan
* @param factory
*/
private void insertCommonInfo(EquPlan equPlan, String factory) {
// 处理计划-巡检人员信息
List<SysUser> 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);
}
// 处理计划1-n设备信息
List<EquPlanEqu> equipmentItemList = equPlan.getEquipmentItem(); List<EquPlanEqu> equipmentItemList = equPlan.getEquipmentItem();
// 计划-设备流水号 // 计划-设备流水号
int equipmentCodeTemp = 0; int equipmentCodeTemp = 0;
for (EquPlanEqu equipment : equipmentItemList) { for (EquPlanEqu equipment : equipmentItemList) {
equipment.setId(IdUtils.fastSimpleUUID()); equipment.setId(IdUtils.fastSimpleUUID());
equipment.setPlanCode(equPlan.getPlanCode()); equipment.setPlanCode(equPlan.getPlanCode());
@ -117,28 +255,25 @@ public class EquUpkeepServiceImpl implements IEquUpkeepService {
equipment.setUpdateTime(DateUtils.getNowDate()); equipment.setUpdateTime(DateUtils.getNowDate());
// 处理检查项信息 // 处理检查项信息
List<EquCheckItem> equCheckItemList = equipment.getEquCheckItemList(); List<EquPlanDetail> detailList = equipment.getEquPlanDetailList();
if (equCheckItemList != null) { if (detailList != null) {
// 计划检查项流水号 // 计划检查项流水号
int itemCodeTemp = 0; int itemCodeTemp = 0;
for (EquCheckItem item : equCheckItemList) { for (EquPlanDetail item : detailList) {
if (item != null) { if (item != null) {
EquPlanDetail planDetail = new EquPlanDetail(); item.setId(IdUtils.fastSimpleUUID());
BeanUtils.copyProperties(item, planDetail); item.setPlanCode(equPlan.getPlanCode());
item.setCode("C" + equPlan.getPlanCode() + String.format("%02d", ++itemCodeTemp));
planDetail.setId(IdUtils.fastSimpleUUID()); item.setParentCode(equipment.getCode());
planDetail.setPlanCode(equPlan.getPlanCode()); item.setCreateBy(SecurityContextHolder.getUserName());
planDetail.setCode("C" + equPlan.getPlanCode() + String.format("%02d", ++itemCodeTemp)); item.setCreateTime(DateUtils.getNowDate());
planDetail.setParentCode(equipment.getCode()); item.setUpdateBy(SecurityContextHolder.getUserName());
planDetail.setCreateBy(SecurityContextHolder.getUserName()); item.setUpdateTime(DateUtils.getNowDate());
planDetail.setCreateTime(DateUtils.getNowDate());
planDetail.setUpdateBy(SecurityContextHolder.getUserName());
planDetail.setUpdateTime(DateUtils.getNowDate());
// 处理标准 // 处理标准
List<EquCheckItemDetail> equCheckItemDetailList = item.getEquCheckItemDetailList(); List<EquPlanStandard> standardList = item.getEquPlanStandardList();
// 检查项详情流水号 // 检查项详情流水号
int detailCodeTemp = 0; int detailCodeTemp = 0;
@ -146,33 +281,30 @@ public class EquUpkeepServiceImpl implements IEquUpkeepService {
// 判断是否插入检查项 // 判断是否插入检查项
boolean checkInsert = false; boolean checkInsert = false;
for (EquCheckItemDetail detail : equCheckItemDetailList) { for (EquPlanStandard standard : standardList) {
if (detail.getShowFlag()) { if (standard.getShowFlag()) {
checkInsert = true; checkInsert = true;
EquPlanStandard planStandard = new EquPlanStandard(); standard.setId(IdUtils.fastSimpleUUID());
BeanUtils.copyProperties(detail, planStandard); standard.setParentCode(item.getCode());
standard.setPlanCode(equPlan.getPlanCode());
planStandard.setId(IdUtils.fastSimpleUUID()); standard.setCode("D" + equPlan.getPlanCode() + String.format("%02d", ++detailCodeTemp));
planStandard.setParentCode(planDetail.getCode()); standard.setCreateBy(SecurityContextHolder.getUserName());
planStandard.setPlanCode(equPlan.getPlanCode()); standard.setCreateTime(DateUtils.getNowDate());
planStandard.setCode("D" + equPlan.getPlanCode() + String.format("%02d", ++detailCodeTemp)); standard.setUpdateBy(SecurityContextHolder.getUserName());
planStandard.setCreateBy(SecurityContextHolder.getUserName()); standard.setUpdateTime(DateUtils.getNowDate());
planStandard.setCreateTime(DateUtils.getNowDate());
planStandard.setUpdateBy(SecurityContextHolder.getUserName());
planStandard.setUpdateTime(DateUtils.getNowDate());
// 详情插入数据库 // 详情插入数据库
equPlanStandardMapper.insertEquPlanStandard(planStandard); equPlanStandardMapper.insertEquPlanStandard(standard);
} }
} }
// 检查项详情为空则不生成检查项信息-检查项插入数据库 // 检查项详情为空则不生成检查项信息-检查项插入数据库
if (checkInsert) { if (checkInsert) {
equPlanDetailMapper.insertEquPlanDetail(planDetail); equPlanDetailMapper.insertEquPlanDetail(item);
} }
} }
@ -189,9 +321,9 @@ public class EquUpkeepServiceImpl implements IEquUpkeepService {
if (spareList != null) { if (spareList != null) {
for (EquPlanEquSpare spare : spareList) { for (EquPlanEquSpare spare : spareList) {
spare.setId(IdUtils.fastSimpleUUID()); spare.setId(IdUtils.fastSimpleUUID());
spare.setCode("S" + equPlan.getPlanCode() + String.format("%02d", ++equipmentCodeTemp)); spare.setCode("S" + equPlan.getPlanCode() + String.format("%02d", ++spareCodeTemp));
spare.setPlanCode(equPlan.getPlanCode()); spare.setPlanCode(equPlan.getPlanCode());
spare.setParentCode(equPlan.getPlanCode()); spare.setParentCode(equipment.getCode());
spare.setFactoryCode(factory); spare.setFactoryCode(factory);
spare.setCreateBy(SecurityContextHolder.getUserName()); spare.setCreateBy(SecurityContextHolder.getUserName());
spare.setCreateTime(DateUtils.getNowDate()); spare.setCreateTime(DateUtils.getNowDate());
@ -201,99 +333,8 @@ public class EquUpkeepServiceImpl implements IEquUpkeepService {
equPlanEquSpareMapper.insertEquPlanEquSpare(spare); equPlanEquSpareMapper.insertEquPlanEquSpare(spare);
} }
} }
}
// 处理人员信息
List<SysUser> 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);
} }
/**
*
*
* @param equPlan
* @return
*/
@Override
@DS("#header.poolName")
public int updateEquPlan(EquPlan equPlan) {
equPlan.setUpdateTime(DateUtils.getNowDate());
return equPlanMapper.updateEquPlan(equPlan);
}
/**
*
*
* @param planIds
* @return
*/
@Override
@DS("#header.poolName")
public int deleteEquPlanByPlanIds(String[] planIds) {
return equPlanMapper.deleteEquPlanByPlanIds(planIds);
}
/**
*
*
* @param planId
* @return
*/
@Override
@DS("#header.poolName")
public int deleteEquPlanByPlanId(String planId) {
return equPlanMapper.deleteEquPlanByPlanId(planId);
}
/**
* -
*
* @param equPlanEquList
* @return
*/
@Override
@DS("#header.poolName")
public AjaxResult formatEquItem(List<EquPlanEqu> equPlanEquList) {
for (EquPlanEqu data : equPlanEquList) {
StringBuilder itemTempName = new StringBuilder();
// 获取检查项list
List<EquCheckItem> equCheckItemList = equCheckItemMapper.selectCheckItemByEquipmentCode(data.getEquipmentCode(),"maintenance");
if (equCheckItemList.size() > 0) {
for (EquCheckItem checkItem : equCheckItemList) {
if (!checkItem.getItemCode().isEmpty()) {
itemTempName.append(checkItem.getItemName()).append(",");
// 获取检查项详情list
List<EquCheckItemDetail> equCheckItemDetailList = equCheckItemDetailMapper.selectCheckItemDetailByItemCode(checkItem.getItemCode());
if (equCheckItemList.size() > 0) {
for (EquCheckItemDetail detail : equCheckItemDetailList) {
detail.setShowFlag(true);
}
checkItem.setEquCheckItemDetailList(equCheckItemDetailList);
}
}
}
data.setEquCheckItemList(equCheckItemList);
data.setItemTempName(itemTempName.toString());
}else {
return error(500,"存在设备未设置保养项!");
}
}
return success(equPlanEquList);
}
} }

@ -125,4 +125,8 @@
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
<delete id="deleteEquPlanEquSpareByPlanCode">
delete from equ_plan_equ_spare where plan_code = #{planCode}
</delete>
</mapper> </mapper>
Loading…
Cancel
Save