From e56dc7446b9113c9390651902c2a9c2135e72248 Mon Sep 17 00:00:00 2001 From: wws <18630710203@163.com> Date: Wed, 18 Oct 2023 16:21:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A1=E6=A3=80=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../device/controller/EquPlanController.java | 172 +++++------ .../com/op/device/domain/EquCheckItem.java | 10 + .../op/device/domain/EquCheckItemDetail.java | 30 ++ .../java/com/op/device/domain/EquPlan.java | 21 ++ .../java/com/op/device/domain/EquPlanEqu.java | 20 ++ .../device/domain/dto/InspectionPlanDTO.java | 23 ++ .../mapper/EquCheckItemDetailMapper.java | 7 + .../op/device/mapper/EquCheckItemMapper.java | 7 + .../com/op/device/mapper/EquPlanMapper.java | 2 + .../com/op/device/mapper/SysUserMapper.java | 61 ++++ .../op/device/service/IEquPlanService.java | 8 +- .../service/impl/EquPlanServiceImpl.java | 272 ++++++++++-------- .../device/EquCheckItemDetailMapper.xml | 5 + .../mapper/device/EquCheckItemMapper.xml | 7 +- .../resources/mapper/device/SysUserMapper.xml | 130 +++++++++ 15 files changed, 578 insertions(+), 197 deletions(-) create mode 100644 op-modules/op-device/src/main/java/com/op/device/mapper/SysUserMapper.java create mode 100644 op-modules/op-device/src/main/resources/mapper/device/SysUserMapper.xml diff --git a/op-modules/op-device/src/main/java/com/op/device/controller/EquPlanController.java b/op-modules/op-device/src/main/java/com/op/device/controller/EquPlanController.java index a2c3482a..a884e99a 100644 --- a/op-modules/op-device/src/main/java/com/op/device/controller/EquPlanController.java +++ b/op-modules/op-device/src/main/java/com/op/device/controller/EquPlanController.java @@ -28,98 +28,110 @@ import com.op.common.core.web.page.TableDataInfo; /** * 计划Controller - * + * * @author Open Platform * @date 2023-10-16 */ @RestController @RequestMapping("/plan") public class EquPlanController extends BaseController { - @Autowired - private IEquPlanService equPlanService; + @Autowired + private IEquPlanService equPlanService; - /** - * 处理计划-设备信息 - * @param equPlanEquList - * @return - */ - @PostMapping("/formatEquItem") - public AjaxResult formatEquItem(@RequestBody List equPlanEquList) { - return equPlanService.formatEquItem(equPlanEquList); - } + /** + * 获取人员信息list + * + * @return + */ + @GetMapping("/getPersonList") + public AjaxResult getPersonList() { + return equPlanService.getPersonList(); + } - /** - * 获取设备信息list - * @param baseEquipment - * @return - */ - @RequiresPermissions("device:plan:list") - @GetMapping("/getEquList") - public TableDataInfo getEquList(BaseEquipment baseEquipment) { - startPage(); - List list = equPlanService.getEquList(baseEquipment); - return getDataTable(list); - } + /** + * 处理计划-设备信息 + * + * @param equPlanEquList + * @return + */ + @PostMapping("/formatEquItem") + public AjaxResult formatEquItem(@RequestBody List equPlanEquList) { + return equPlanService.formatEquItem(equPlanEquList); + } - /** - * 查询计划列表 - */ - @RequiresPermissions("device:plan:list") - @GetMapping("/list") - public TableDataInfo list(EquPlan equPlan) { - startPage(); - List list = equPlanService.selectEquPlanList(equPlan); - return getDataTable(list); - } + /** + * 获取设备信息list + * + * @param baseEquipment + * @return + */ + @RequiresPermissions("device:plan:list") + @GetMapping("/getEquList") + public TableDataInfo getEquList(BaseEquipment baseEquipment) { + startPage(); + List list = equPlanService.getEquList(baseEquipment); + return getDataTable(list); + } - /** - * 导出计划列表 - */ - @RequiresPermissions("device:plan:export") - @Log(title = "计划", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, EquPlan equPlan) { - List list = equPlanService.selectEquPlanList(equPlan); - ExcelUtil util = new ExcelUtil(EquPlan.class); - util.exportExcel(response, list, "计划数据"); - } + /** + * 查询计划列表 + */ + @RequiresPermissions("device:plan:list") + @GetMapping("/list") + public TableDataInfo list(EquPlan equPlan) { + startPage(); + List list = equPlanService.selectEquPlanList(equPlan); + return getDataTable(list); + } - /** - * 获取计划详细信息 - */ - @RequiresPermissions("device:plan:query") - @GetMapping(value = "/{planId}") - public AjaxResult getInfo(@PathVariable("planId") String planId) { - return success(equPlanService.selectEquPlanByPlanId(planId)); - } + /** + * 导出计划列表 + */ + @RequiresPermissions("device:plan:export") + @Log(title = "计划", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, EquPlan equPlan) { + List list = equPlanService.selectEquPlanList(equPlan); + ExcelUtil util = new ExcelUtil(EquPlan.class); + util.exportExcel(response, list, "计划数据"); + } - /** - * 新增计划 - */ - @RequiresPermissions("device:plan:add") - @Log(title = "计划", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody EquPlan equPlan) { - return toAjax(equPlanService.insertEquPlan(equPlan)); - } + /** + * 获取计划详细信息 + */ + @RequiresPermissions("device:plan:query") + @GetMapping(value = "/{planId}") + public AjaxResult getInfo(@PathVariable("planId") String planId) { + return success(equPlanService.selectEquPlanByPlanId(planId)); + } - /** - * 修改计划 - */ - @RequiresPermissions("device:plan:edit") - @Log(title = "计划", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody EquPlan equPlan) { - return toAjax(equPlanService.updateEquPlan(equPlan)); - } + /** + * 新增计划 + */ + @RequiresPermissions("device:plan:add") + @Log(title = "计划", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody EquPlan equPlan) { + return equPlanService.insertEquPlan(equPlan); + } - /** - * 删除计划 - */ - @RequiresPermissions("device:plan:remove") - @Log(title = "计划", businessType = BusinessType.DELETE) - @DeleteMapping("/{planIds}") - public AjaxResult remove(@PathVariable String[] planIds) { - return toAjax(equPlanService.deleteEquPlanByPlanIds(planIds)); - } + /** + * 修改计划 + */ + @RequiresPermissions("device:plan:edit") + @Log(title = "计划", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody EquPlan equPlan) { + return toAjax(equPlanService.updateEquPlan(equPlan)); + } + + /** + * 删除计划 + */ + @RequiresPermissions("device:plan:remove") + @Log(title = "计划", businessType = BusinessType.DELETE) + @DeleteMapping("/{planIds}") + public AjaxResult remove(@PathVariable String[] planIds) { + return toAjax(equPlanService.deleteEquPlanByPlanIds(planIds)); + } } diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/EquCheckItem.java b/op-modules/op-device/src/main/java/com/op/device/domain/EquCheckItem.java index de557fa7..67a5bbf7 100644 --- a/op-modules/op-device/src/main/java/com/op/device/domain/EquCheckItem.java +++ b/op-modules/op-device/src/main/java/com/op/device/domain/EquCheckItem.java @@ -95,6 +95,16 @@ public class EquCheckItem extends BaseEntity { // 更新日期结束 private String updateTimeEnd; + private List equCheckItemDetailList; + + public List getEquCheckItemDetailList() { + return equCheckItemDetailList; + } + + public void setEquCheckItemDetailList(List equCheckItemDetailList) { + this.equCheckItemDetailList = equCheckItemDetailList; + } + public List getUpdateTimeArray() { return updateTimeArray; } diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/EquCheckItemDetail.java b/op-modules/op-device/src/main/java/com/op/device/domain/EquCheckItemDetail.java index 09358df4..4c7a6578 100644 --- a/op-modules/op-device/src/main/java/com/op/device/domain/EquCheckItemDetail.java +++ b/op-modules/op-device/src/main/java/com/op/device/domain/EquCheckItemDetail.java @@ -85,6 +85,36 @@ public class EquCheckItemDetail extends BaseEntity { @Excel(name = "详情编码") private String detailCode; + private Boolean showFlag; + + private String standardTypeName; + + private String itemName; + + public String getItemName() { + return itemName; + } + + public void setItemName(String itemName) { + this.itemName = itemName; + } + + public String getStandardTypeName() { + return standardTypeName; + } + + public void setStandardTypeName(String standardTypeName) { + this.standardTypeName = standardTypeName; + } + + public Boolean getShowFlag() { + return showFlag; + } + + public void setShowFlag(Boolean showFlag) { + this.showFlag = showFlag; + } + public String getDetailCode() { return detailCode; } 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 efa224ca..c8fa43a5 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 @@ -4,6 +4,7 @@ import java.util.Date; import java.util.List; import com.fasterxml.jackson.annotation.JsonFormat; +import com.op.system.api.domain.SysUser; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.op.common.core.annotation.Excel; @@ -128,6 +129,26 @@ public class EquPlan extends BaseEntity { // 关联-计划->设备list private List equPlanEquList; + private List equipmentItem; + + public List getEquipmentItem() { + return equipmentItem; + } + + public void setEquipmentItem(List equipmentItem) { + this.equipmentItem = equipmentItem; + } + + private List personList; + + public List getPersonList() { + return personList; + } + + public void setPersonList(List personList) { + this.personList = personList; + } + public List getEquPlanEquList() { return equPlanEquList; } 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 f26dd20f..0d61f90a 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 @@ -57,6 +57,26 @@ public class EquPlanEqu extends BaseEntity { // 关联-设备->检查项list private List equPlanDetailList; + private List equCheckItemList; + + private String itemTempName; + + public String getItemTempName() { + return itemTempName; + } + + public void setItemTempName(String itemTempName) { + this.itemTempName = itemTempName; + } + + public List getEquCheckItemList() { + return equCheckItemList; + } + + public void setEquCheckItemList(List equCheckItemList) { + this.equCheckItemList = equCheckItemList; + } + public List getEquPlanDetailList() { return equPlanDetailList; } diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/dto/InspectionPlanDTO.java b/op-modules/op-device/src/main/java/com/op/device/domain/dto/InspectionPlanDTO.java index 93b3d829..6c11d033 100644 --- a/op-modules/op-device/src/main/java/com/op/device/domain/dto/InspectionPlanDTO.java +++ b/op-modules/op-device/src/main/java/com/op/device/domain/dto/InspectionPlanDTO.java @@ -1,6 +1,7 @@ package com.op.device.domain.dto; import com.fasterxml.jackson.annotation.JsonFormat; +import com.op.system.api.domain.SysUser; import java.util.Date; import java.util.List; @@ -93,6 +94,28 @@ public class InspectionPlanDTO { // 创建日期结束 private String createTimeEnd; + // 执行时间arr + private List planTimeArray; + + // 人员list + private List personList; + + public List getPlanTimeArray() { + return planTimeArray; + } + + public void setPlanTimeArray(List planTimeArray) { + this.planTimeArray = planTimeArray; + } + + public List getPersonList() { + return personList; + } + + public void setPersonList(List personList) { + this.personList = personList; + } + public String getPlanId() { return planId; } diff --git a/op-modules/op-device/src/main/java/com/op/device/mapper/EquCheckItemDetailMapper.java b/op-modules/op-device/src/main/java/com/op/device/mapper/EquCheckItemDetailMapper.java index 31308191..39b52b3b 100644 --- a/op-modules/op-device/src/main/java/com/op/device/mapper/EquCheckItemDetailMapper.java +++ b/op-modules/op-device/src/main/java/com/op/device/mapper/EquCheckItemDetailMapper.java @@ -84,4 +84,11 @@ public interface EquCheckItemDetailMapper { * @param itemId */ void delEquCheckItemDetailByItemId(String itemId); + + /** + * 通过检查项code查询检查项详情list + * @param itemCode + * @return + */ + List selectCheckItemDetailByItemCode(String itemCode); } diff --git a/op-modules/op-device/src/main/java/com/op/device/mapper/EquCheckItemMapper.java b/op-modules/op-device/src/main/java/com/op/device/mapper/EquCheckItemMapper.java index 892c7133..2baa336e 100644 --- a/op-modules/op-device/src/main/java/com/op/device/mapper/EquCheckItemMapper.java +++ b/op-modules/op-device/src/main/java/com/op/device/mapper/EquCheckItemMapper.java @@ -78,4 +78,11 @@ public interface EquCheckItemMapper { * @return */ List selectAllEquipmentList(); + + /** + * 通过设备编码查询检查项list + * @param equipmentCode + * @return + */ + List selectCheckItemByEquipmentCode(String equipmentCode); } diff --git a/op-modules/op-device/src/main/java/com/op/device/mapper/EquPlanMapper.java b/op-modules/op-device/src/main/java/com/op/device/mapper/EquPlanMapper.java index a6e22009..2695e4b4 100644 --- a/op-modules/op-device/src/main/java/com/op/device/mapper/EquPlanMapper.java +++ b/op-modules/op-device/src/main/java/com/op/device/mapper/EquPlanMapper.java @@ -2,6 +2,8 @@ package com.op.device.mapper; import java.util.List; +import com.op.device.domain.EquCheckItem; +import com.op.device.domain.EquCheckItemDetail; import com.op.device.domain.EquPlan; import com.op.device.domain.dto.InspectionPlanDTO; import com.op.device.domain.vo.InspectionPlanVO; diff --git a/op-modules/op-device/src/main/java/com/op/device/mapper/SysUserMapper.java b/op-modules/op-device/src/main/java/com/op/device/mapper/SysUserMapper.java new file mode 100644 index 00000000..291db485 --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/mapper/SysUserMapper.java @@ -0,0 +1,61 @@ +package com.op.device.mapper; + +import com.op.system.api.domain.SysUser; + +import java.util.List; + +/** + * 用户信息Mapper接口 + * + * @author Open Platform + * @date 2023-10-18 + */ +public interface SysUserMapper { + /** + * 查询用户信息 + * + * @param userId 用户信息主键 + * @return 用户信息 + */ + public SysUser selectSysUserByUserId(Long userId); + + /** + * 查询用户信息列表 + * + * @param sysUser 用户信息 + * @return 用户信息集合 + */ + public List selectSysUserList(SysUser sysUser); + + /** + * 新增用户信息 + * + * @param sysUser 用户信息 + * @return 结果 + */ + public int insertSysUser(SysUser sysUser); + + /** + * 修改用户信息 + * + * @param sysUser 用户信息 + * @return 结果 + */ + public int updateSysUser(SysUser sysUser); + + /** + * 删除用户信息 + * + * @param userId 用户信息主键 + * @return 结果 + */ + public int deleteSysUserByUserId(Long userId); + + /** + * 批量删除用户信息 + * + * @param userIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSysUserByUserIds(Long[] userIds); +} diff --git a/op-modules/op-device/src/main/java/com/op/device/service/IEquPlanService.java b/op-modules/op-device/src/main/java/com/op/device/service/IEquPlanService.java index 8f323907..7689f1ff 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/IEquPlanService.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/IEquPlanService.java @@ -38,7 +38,7 @@ public interface IEquPlanService { * @param equPlan 计划 * @return 结果 */ - public int insertEquPlan(EquPlan equPlan); + public AjaxResult insertEquPlan(EquPlan equPlan); /** * 修改计划 @@ -77,4 +77,10 @@ public interface IEquPlanService { * @return */ AjaxResult formatEquItem(List equPlanEquList); + + /** + * 获取人员list + * @return + */ + AjaxResult getPersonList(); } diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquPlanServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquPlanServiceImpl.java index bc276ae5..9cccde9f 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquPlanServiceImpl.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquPlanServiceImpl.java @@ -6,139 +6,181 @@ import java.util.List; import com.baomidou.dynamic.datasource.annotation.DS; import com.op.common.core.utils.DateUtils; import com.op.common.core.web.domain.AjaxResult; -import com.op.device.domain.BaseEquipment; -import com.op.device.domain.EquPlanEqu; -import com.op.device.domain.dto.InspectionPlanDTO; -import com.op.device.domain.vo.InspectionPlanVO; -import com.op.device.mapper.BaseEquipmentMapper; +import com.op.device.domain.*; +import com.op.device.mapper.*; +import com.op.system.api.domain.SysUser; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import com.op.device.mapper.EquPlanMapper; -import com.op.device.domain.EquPlan; import com.op.device.service.IEquPlanService; +import static com.op.common.core.web.domain.AjaxResult.success; + /** * 计划Service业务层处理 - * + * * @author Open Platform * @date 2023-10-16 */ @Service public class EquPlanServiceImpl implements IEquPlanService { - @Autowired - private EquPlanMapper equPlanMapper; - @Autowired - private BaseEquipmentMapper baseEquipmentMapper; + @Autowired + private EquPlanMapper equPlanMapper; + @Autowired + private BaseEquipmentMapper baseEquipmentMapper; + @Autowired + private EquCheckItemMapper equCheckItemMapper; + @Autowired + private EquCheckItemDetailMapper equCheckItemDetailMapper; + @Autowired + private SysUserMapper sysUserMapper; + + /** + * 查询计划 + * + * @param planId 计划主键 + * @return 计划 + */ + @Override + @DS("#header.poolName") + public EquPlan selectEquPlanByPlanId(String planId) { + return equPlanMapper.selectEquPlanByPlanId(planId); + } + + /** + * 查询计划列表 + * + * @param equPlan 计划 + * @return 计划 + */ + @Override + @DS("#header.poolName") + public List selectEquPlanList(EquPlan equPlan) { + if (equPlan.getCreateTimeArray() != null) { + // 设置创建日期开始和结束值 + if (equPlan.getCreateTimeArray().size() == 2) { + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); + equPlan.setCreateTimeStart(formatter.format(equPlan.getCreateTimeArray().get(0))); + equPlan.setCreateTimeEnd(formatter.format(equPlan.getCreateTimeArray().get(1))); + } + } + if (equPlan.getUpdateTimeArray() != null) { + // 设置更新日期开始和结束 + if (equPlan.getUpdateTimeArray().size() == 2) { + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); + equPlan.setUpdateTimeStart(formatter.format(equPlan.getUpdateTimeArray().get(0))); + equPlan.setUpdateTimeEnd(formatter.format(equPlan.getUpdateTimeArray().get(1))); + } + } + return equPlanMapper.selectEquPlanList(equPlan); + } - /** - * 查询计划 - * - * @param planId 计划主键 - * @return 计划 - */ - @Override - @DS("#header.poolName") - public EquPlan selectEquPlanByPlanId(String planId) { - return equPlanMapper.selectEquPlanByPlanId(planId); - } + /** + * 新增计划 + * + * @param equPlan 计划 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public AjaxResult insertEquPlan(EquPlan equPlan) { + equPlan.setCreateTime(DateUtils.getNowDate()); + return success(); + } - /** - * 查询计划列表 - * - * @param equPlan 计划 - * @return 计划 - */ - @Override - @DS("#header.poolName") - public List selectEquPlanList(EquPlan equPlan) { - if (equPlan.getCreateTimeArray() != null) { - // 设置创建日期开始和结束值 - if (equPlan.getCreateTimeArray().size() == 2) { - SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); - equPlan.setCreateTimeStart(formatter.format(equPlan.getCreateTimeArray().get(0))); - equPlan.setCreateTimeEnd(formatter.format(equPlan.getCreateTimeArray().get(1))); - } - } - if (equPlan.getUpdateTimeArray() != null) { - // 设置更新日期开始和结束 - if (equPlan.getUpdateTimeArray().size() == 2) { - SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); - equPlan.setUpdateTimeStart(formatter.format(equPlan.getUpdateTimeArray().get(0))); - equPlan.setUpdateTimeEnd(formatter.format(equPlan.getUpdateTimeArray().get(1))); - } - } - return equPlanMapper.selectEquPlanList(equPlan); - } + /** + * 修改计划 + * + * @param equPlan 计划 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int updateEquPlan(EquPlan equPlan) { + equPlan.setUpdateTime(DateUtils.getNowDate()); + return equPlanMapper.updateEquPlan(equPlan); + } - /** - * 新增计划 - * - * @param equPlan 计划 - * @return 结果 - */ - @Override - @DS("#header.poolName") - public int insertEquPlan(EquPlan equPlan) { - equPlan.setCreateTime(DateUtils.getNowDate()); - return equPlanMapper.insertEquPlan(equPlan); - } + /** + * 批量删除计划 + * + * @param planIds 需要删除的计划主键 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int deleteEquPlanByPlanIds(String[] planIds) { + return equPlanMapper.deleteEquPlanByPlanIds(planIds); + } - /** - * 修改计划 - * - * @param equPlan 计划 - * @return 结果 - */ - @Override - @DS("#header.poolName") - public int updateEquPlan(EquPlan equPlan) { - equPlan.setUpdateTime(DateUtils.getNowDate()); - return equPlanMapper.updateEquPlan(equPlan); - } + /** + * 删除计划信息 + * + * @param planId 计划主键 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int deleteEquPlanByPlanId(String planId) { + return equPlanMapper.deleteEquPlanByPlanId(planId); + } - /** - * 批量删除计划 - * - * @param planIds 需要删除的计划主键 - * @return 结果 - */ - @Override - @DS("#header.poolName") - public int deleteEquPlanByPlanIds(String[] planIds) { - return equPlanMapper.deleteEquPlanByPlanIds(planIds); - } + /** + * 获取设备信息list + * + * @param baseEquipment + * @return + */ + @Override + @DS("#header.poolName") + public List getEquList(BaseEquipment baseEquipment) { + return baseEquipmentMapper.selectBaseEquipmentList(baseEquipment); + } - /** - * 删除计划信息 - * - * @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 equPlanEquList) { + for (EquPlanEqu data : equPlanEquList) { - /** - * 获取设备信息list - * @param baseEquipment - * @return - */ - @Override - @DS("#header.poolName") - public List getEquList(BaseEquipment baseEquipment) { - return baseEquipmentMapper.selectBaseEquipmentList(baseEquipment); - } + StringBuilder itemTempName = new StringBuilder(); - /** - * 处理计划-设备信息 - * @param equPlanEquList - * @return - */ - @Override - public AjaxResult formatEquItem(List equPlanEquList) { + // 获取检查项list + List equCheckItemList = equCheckItemMapper.selectCheckItemByEquipmentCode(data.getEquipmentCode()); + if (equCheckItemList.size() > 0) { + for (EquCheckItem checkItem : equCheckItemList) { + if (!checkItem.getItemCode().isEmpty()) { + itemTempName.append(checkItem.getItemName()).append(","); + // 获取检查项详情list + List 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()); + } + } + return success(equPlanEquList); + } - return null; - } + /** + * 查询人员list + * @return + */ + @Override + @DS("#master") + public AjaxResult getPersonList() { + SysUser sysUser = new SysUser(); + List personList = sysUserMapper.selectSysUserList(sysUser); + return success(personList); + } } diff --git a/op-modules/op-device/src/main/resources/mapper/device/EquCheckItemDetailMapper.xml b/op-modules/op-device/src/main/resources/mapper/device/EquCheckItemDetailMapper.xml index 84360378..7d6a5679 100644 --- a/op-modules/op-device/src/main/resources/mapper/device/EquCheckItemDetailMapper.xml +++ b/op-modules/op-device/src/main/resources/mapper/device/EquCheckItemDetailMapper.xml @@ -67,6 +67,11 @@ ORDER BY create_time + + insert into equ_check_item_detail diff --git a/op-modules/op-device/src/main/resources/mapper/device/EquCheckItemMapper.xml b/op-modules/op-device/src/main/resources/mapper/device/EquCheckItemMapper.xml index a6e56013..73bb9b7e 100644 --- a/op-modules/op-device/src/main/resources/mapper/device/EquCheckItemMapper.xml +++ b/op-modules/op-device/src/main/resources/mapper/device/EquCheckItemMapper.xml @@ -72,7 +72,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select equipment_name AS 'equipmentName',equipment_code AS 'equipmentCode' from base_equipment where del_flag = '0' - + + + insert into equ_check_item item_id, diff --git a/op-modules/op-device/src/main/resources/mapper/device/SysUserMapper.xml b/op-modules/op-device/src/main/resources/mapper/device/SysUserMapper.xml new file mode 100644 index 00000000..a981915c --- /dev/null +++ b/op-modules/op-device/src/main/resources/mapper/device/SysUserMapper.xml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + select user_id, dept_id, user_name, nick_name, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_by, create_time, update_by, update_time, remark from sys_user + + + + + + + + insert into sys_user + + dept_id, + user_name, + nick_name, + email, + phonenumber, + sex, + avatar, + password, + status, + del_flag, + login_ip, + login_date, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{deptId}, + #{userName}, + #{nickName}, + #{email}, + #{phonenumber}, + #{sex}, + #{avatar}, + #{password}, + #{status}, + #{delFlag}, + #{loginIp}, + #{loginDate}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update sys_user + + dept_id = #{deptId}, + user_name = #{userName}, + nick_name = #{nickName}, + email = #{email}, + phonenumber = #{phonenumber}, + sex = #{sex}, + avatar = #{avatar}, + password = #{password}, + status = #{status}, + del_flag = #{delFlag}, + login_ip = #{loginIp}, + login_date = #{loginDate}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where user_id = #{userId} + + + + delete from sys_user where user_id = #{userId} + + + + delete from sys_user where user_id in + + #{userId} + + + \ No newline at end of file