diff --git a/src/main/java/com/glxp/api/common/enums/ResultEnum.java b/src/main/java/com/glxp/api/common/enums/ResultEnum.java index f19fc0ed6..42ebe9512 100644 --- a/src/main/java/com/glxp/api/common/enums/ResultEnum.java +++ b/src/main/java/com/glxp/api/common/enums/ResultEnum.java @@ -17,6 +17,7 @@ public enum ResultEnum { DATA_CHANGE(6, "数据没有任何更改"), DATA_REPEAT(7, "数据已存在"), DATA_ERROR(8, "参数错误"), + ; private Integer code; diff --git a/src/main/java/com/glxp/api/common/req/UpdateRequest.java b/src/main/java/com/glxp/api/common/req/UpdateRequest.java index 570b0b295..ff27f2e72 100644 --- a/src/main/java/com/glxp/api/common/req/UpdateRequest.java +++ b/src/main/java/com/glxp/api/common/req/UpdateRequest.java @@ -2,6 +2,8 @@ package com.glxp.api.common.req; import lombok.Data; +import java.util.Date; + /** * 更新审核接口基础参数 */ @@ -28,4 +30,23 @@ public class UpdateRequest { */ private String auditOpinion; + /** + * 维修人 + */ + private String repariName; + + /** + * 维修照片 + */ + private String repariImage; + + /** + * 维修说明 + */ + private String repariRemark; + + private String inspectUser; + + private Date expectedTime; + } diff --git a/src/main/java/com/glxp/api/constant/Constant.java b/src/main/java/com/glxp/api/constant/Constant.java index e8496ecaf..ffd24cc8f 100644 --- a/src/main/java/com/glxp/api/constant/Constant.java +++ b/src/main/java/com/glxp/api/constant/Constant.java @@ -58,6 +58,11 @@ public class Constant { */ public static final String DEVICE_INSPECT_PLAN_ORDER = "DIP"; + /** + * 设备巡检计划前缀 + */ + public static final String DEVICE_INSPECT_TAKE_ORDER = "DIT"; + /** * 设备报修前缀 */ diff --git a/src/main/java/com/glxp/api/constant/DeviceStatus.java b/src/main/java/com/glxp/api/constant/DeviceStatus.java new file mode 100644 index 000000000..18f09ca48 --- /dev/null +++ b/src/main/java/com/glxp/api/constant/DeviceStatus.java @@ -0,0 +1,18 @@ +package com.glxp.api.constant; + +//设备任务状态 +public class DeviceStatus { + + public static final int DEVICE_STATUS_TEMP_SAVE = 0; //草稿 + + public static final int DEVICE_STATUS_TEMP_UNDISTRIBUTTED = 1; //未分配 + + public static final int DEVICE_STATUS_TEMP_UNINSPECTTION = 2; //未巡检 已分配 + + public static final int DEVICE_STATUS_TEMP_DURINGINSPECTTION = 3; //巡检中 + + public static final int DEVICE_STATUS_TEMP_INSPECTED = 4; //已巡检 + + + +} diff --git a/src/main/java/com/glxp/api/constant/DeviceType.java b/src/main/java/com/glxp/api/constant/DeviceType.java new file mode 100644 index 000000000..49f89c4a9 --- /dev/null +++ b/src/main/java/com/glxp/api/constant/DeviceType.java @@ -0,0 +1,10 @@ +package com.glxp.api.constant; + +public interface DeviceType { + + int TYPE_INSPECTTION = 1; //巡检 + + int TYPE_MAINTAIN = 2; //养护 + + int TYPE_REPAIR = 3; //报修 +} diff --git a/src/main/java/com/glxp/api/controller/inv/DeviceInspectPlanController.java b/src/main/java/com/glxp/api/controller/inv/DeviceInspectPlanController.java index 6515e3eb6..c4f0d617d 100644 --- a/src/main/java/com/glxp/api/controller/inv/DeviceInspectPlanController.java +++ b/src/main/java/com/glxp/api/controller/inv/DeviceInspectPlanController.java @@ -96,7 +96,7 @@ public class DeviceInspectPlanController { if (null == updateRequest || StrUtil.isBlank(updateRequest.getOrderId())) { return ResultVOUtils.paramVerifyFail(); } - return deviceInspectPlanService.updateStatus(updateRequest.getOrderId(), updateRequest.getStatus()); + return deviceInspectPlanService.updateStatus(updateRequest.getOrderId(), updateRequest.getStatus(), updateRequest.getInspectUser(),updateRequest.getExpectedTime()); } /** diff --git a/src/main/java/com/glxp/api/controller/inv/DeviceInspectPlanDelectController.java b/src/main/java/com/glxp/api/controller/inv/DeviceInspectPlanDelectController.java new file mode 100644 index 000000000..d4df8dba3 --- /dev/null +++ b/src/main/java/com/glxp/api/controller/inv/DeviceInspectPlanDelectController.java @@ -0,0 +1,105 @@ +package com.glxp.api.controller.inv; + +import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.StrUtil; +import com.glxp.api.common.res.BaseResponse; +import com.glxp.api.common.util.ResultVOUtils; +import com.glxp.api.entity.auth.AuthAdmin; +import com.glxp.api.entity.inv.DeviceInspectPlanDelectEntity; +import com.glxp.api.entity.inv.DeviceInspectSetEntity; +import com.glxp.api.req.inv.AddDeviceInspectSetRequest; +import com.glxp.api.res.inv.DeviceInspectSetResponse; +import com.glxp.api.service.auth.CustomerService; +import com.glxp.api.service.inv.DeviceInspectPlanDelectService; +import lombok.extern.slf4j.Slf4j; +import org.apache.lucene.util.CollectionUtil; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + +@Slf4j +@RestController +public class DeviceInspectPlanDelectController { + + @Resource + DeviceInspectPlanDelectService deviceInspectPlanDelectService; + @Resource + CustomerService customerService; + + + /** + * 查询巡检设置配置项 + * + * @param deviceInspectPlanDelectEntity + * @return + */ + @GetMapping("/udiwms/inv/device/inspect/plan/selectDeviceInspectPlanDelect") + public BaseResponse selectDeviceInspectPlanDelect(DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity) { + List deviceInspectPlanDelectEntityList = deviceInspectPlanDelectService.selectDeviceInspectPlanDelect(deviceInspectPlanDelectEntity); + return ResultVOUtils.success(deviceInspectPlanDelectEntityList); + } + + /** + * 添加巡检设置配置项 + * + * @param deviceInspectPlanDelectEntity + * @return + */ + @PostMapping("/udiwms/inv/device/inspect/plan/addDeviceInspectPlanDelect") + public BaseResponse addDeviceInspectPlanDelect(@RequestBody DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity) { + + AuthAdmin authAdmin=customerService.getUserBean(); + deviceInspectPlanDelectEntity.setId(IdUtil.getSnowflakeNextId()); + deviceInspectPlanDelectEntity.setUpdateTime(new Date()); + deviceInspectPlanDelectEntity.setUpdateUser(authAdmin.getId() + ""); + Boolean falg=deviceInspectPlanDelectService.addDeviceInspectPlanDelectEntity(deviceInspectPlanDelectEntity); + if(!falg){ + return ResultVOUtils.error(999,"添加失败!"); + } + return ResultVOUtils.success(); + } + + /** + * 更新巡检设置配置项 + * + * @param deviceInspectPlanDelectEntity + * @return + */ + @PostMapping("/udiwms/inv/device/inspect/plan/uploadDeviceInspectPlanDelect") + public BaseResponse uploadDeviceInspectPlanDelect(@RequestBody DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity) { + + + AuthAdmin authAdmin=customerService.getUserBean(); + deviceInspectPlanDelectEntity.setUpdateTime(new Date()); + deviceInspectPlanDelectEntity.setUpdateUser(authAdmin.getId() + ""); + Boolean falg=deviceInspectPlanDelectService.uploadDeviceInspectPlanDelectEntity(deviceInspectPlanDelectEntity); + if(!falg){ + return ResultVOUtils.error(999,"更新失败!"); + } + return ResultVOUtils.success(); + } + + + /** + * 删除巡检设置配置项 + * + * @param deviceInspectPlanDelectEntity + * @return + */ + @PostMapping("/udiwms/inv/device/inspect/plan/delectDeviceInspectPlanDelect") + public BaseResponse delectDeviceInspectPlanDelect(@RequestBody DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity) { + + Boolean falg=deviceInspectPlanDelectService.delectDeviceInspectPlanDelectEntity(deviceInspectPlanDelectEntity); + if(!falg){ + return ResultVOUtils.error(999,"删除失败!"); + } + return ResultVOUtils.success(); + } + + +} diff --git a/src/main/java/com/glxp/api/controller/inv/DeviceInspectTakeController.java b/src/main/java/com/glxp/api/controller/inv/DeviceInspectTakeController.java new file mode 100644 index 000000000..84dc9d69f --- /dev/null +++ b/src/main/java/com/glxp/api/controller/inv/DeviceInspectTakeController.java @@ -0,0 +1,123 @@ +package com.glxp.api.controller.inv; + +import com.github.pagehelper.PageInfo; +import com.glxp.api.common.res.BaseResponse; +import com.glxp.api.common.util.ResultVOUtils; +import com.glxp.api.constant.Constant; +import com.glxp.api.entity.inv.DeviceInspectTaskDetailEntity; +import com.glxp.api.entity.inv.DeviceInspectTaskEntity; +import com.glxp.api.req.inv.FilterDeviceInspectTakeRequest; +import com.glxp.api.res.inv.DeviceInspectTakeResponse; +import com.glxp.api.service.inv.DeviceInspectTaskDetailService; +import com.glxp.api.service.inv.DeviceInspectTaskService; +import com.glxp.api.util.GennerOrderUtils; +import com.glxp.api.util.OrderNoTypeBean; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + +/** + * 设备巡检任务接口 + */ +@Slf4j +@RestController +public class DeviceInspectTakeController { + + @Resource + DeviceInspectTaskService deviceInspectTaskService; + + @Resource + DeviceInspectTaskDetailService deviceInspectTaskDetailService; + @Resource + private GennerOrderUtils gennerOrderUtils; + + /** + * 查询设设备巡检任务接口 + * + * @param filterDeviceInspectTakeRequest + * @return + */ + @GetMapping("/udiwms/inv/device/inspect/take/filter") + public BaseResponse filterList(FilterDeviceInspectTakeRequest filterDeviceInspectTakeRequest) { + List list = deviceInspectTaskService.filterList(filterDeviceInspectTakeRequest); + PageInfo pageInfo = new PageInfo<>(list); + return ResultVOUtils.page(pageInfo); + } + @PostMapping("/udiwms/inv/device/inspect/take/uploadDeviceInspecTake") + public BaseResponse uploadDeviceInspecTake(@RequestBody DeviceInspectTaskEntity deviceInspectTaskEntity) { + deviceInspectTaskEntity.setUpdateTime(new Date()); + if(deviceInspectTaskEntity.getStatus() == 1){ + deviceInspectTaskEntity.setStrartTime(new Date()); + }else{ + deviceInspectTaskEntity.setEndTime(new Date()); + } + boolean falg=deviceInspectTaskService.updateById(deviceInspectTaskEntity); + if(!falg){ + return ResultVOUtils.error(999,"更新失败"); + } + return ResultVOUtils.success(); + } + + @PostMapping("/udiwms/inv/device/inspect/take/uploadDeviceTake") + public BaseResponse uploadDeviceTake(@RequestBody DeviceInspectTaskEntity deviceInspectTaskEntity) { + deviceInspectTaskEntity.setUpdateTime(new Date()); + boolean falg=deviceInspectTaskService.updateById(deviceInspectTaskEntity); + if(!falg){ + return ResultVOUtils.error(999,"更新失败"); + } + return ResultVOUtils.success(); + } + + + + @PostMapping("/udiwms/inv/device/inspect/take/addDeviceInspecTake") + public BaseResponse addDeviceInspecTake(@RequestBody DeviceInspectTaskEntity deviceInspectTaskEntity) { + String orderId = gennerOrderUtils.createStOrderNo(new OrderNoTypeBean(Constant.DEVICE_INSPECT_PLAN_ORDER, "yyyyMMdd")); + deviceInspectTaskEntity.setOrderId(orderId); + deviceInspectTaskEntity.setCreateTime(new Date()); + deviceInspectTaskService.addDeviceInspectTask(deviceInspectTaskEntity); + return ResultVOUtils.success(deviceInspectTaskEntity); + } + + + + + + + + + //------------------------------------------ 详情方法--------------------------------------------------------------// + @GetMapping("/udiwms/inv/device/inspect/take/detail/selectDeviceInspecTakeDetail") + public BaseResponse selectDeviceInspecTakeDetail(DeviceInspectTaskDetailEntity deviceInspectTaskDetailEntity) { + List deviceInspectPlanDelectEntityList = deviceInspectTaskDetailService.selectDeviceInspectTakeDetail(deviceInspectTaskDetailEntity); + return ResultVOUtils.success(deviceInspectPlanDelectEntityList); + } + + @PostMapping("/udiwms/inv/device/inspect/take/detail/uploadDeviceInspecTakeDetail") + public BaseResponse uploadDeviceInspecTakeDetail(@RequestBody DeviceInspectTaskDetailEntity deviceInspectTaskDetailEntity) { + deviceInspectTaskDetailEntity.setUpdateTime(new Date()); + boolean falg=deviceInspectTaskDetailService.uploadDeviceInspecTakeDetail(deviceInspectTaskDetailEntity); + if(!falg){ + return ResultVOUtils.error(999,"更新失败"); + } + return ResultVOUtils.success(); + } + + @PostMapping("/udiwms/inv/device/inspect/take/detail/addDeviceInspecTakeDetail") + public BaseResponse addDeviceInspecTakeDetail(@RequestBody DeviceInspectTaskDetailEntity deviceInspectTaskDetailEntity) { + + boolean falg=deviceInspectTaskDetailService.addDeviceInspectTaskDelect(deviceInspectTaskDetailEntity); + if(!falg){ + return ResultVOUtils.error(999,"更新失败"); + } + return ResultVOUtils.success(); + } + + +} diff --git a/src/main/java/com/glxp/api/controller/inv/DeviceProjectSetController.java b/src/main/java/com/glxp/api/controller/inv/DeviceProjectSetController.java new file mode 100644 index 000000000..a8c57ab71 --- /dev/null +++ b/src/main/java/com/glxp/api/controller/inv/DeviceProjectSetController.java @@ -0,0 +1,99 @@ +package com.glxp.api.controller.inv; + +import com.github.pagehelper.PageInfo; +import com.glxp.api.common.enums.ResultEnum; +import com.glxp.api.common.res.BaseResponse; +import com.glxp.api.common.util.ResultVOUtils; +import com.glxp.api.req.inv.DeviceProjectSetRequest; +import com.glxp.api.res.inv.DeviceProjectSetResponse; +import com.glxp.api.service.inv.DeviceProjectSetService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 维保设备接口 + */ +@Slf4j +@RestController +public class DeviceProjectSetController { + + @Resource + private DeviceProjectSetService deviceProjectSetService; + + /** + * 查询维保设备列表 + * + * @param deviceProjectSetRequest + * @return + */ + @GetMapping("/udiwms/inv/device/project/set/filter") + public BaseResponse filterList(DeviceProjectSetRequest deviceProjectSetRequest) { + + List list = deviceProjectSetService.filterList(deviceProjectSetRequest); + PageInfo pageInfo = new PageInfo<>(list); + return ResultVOUtils.page(pageInfo); + } + + /** + * 添加维保设备维护 + * + * @param deviceProjectSetRequest + * @return + */ + @PostMapping("/udiwms/inv/device/project/set/insertDevprojectSet") + public BaseResponse insertDevprojectSet(@RequestBody DeviceProjectSetRequest deviceProjectSetRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + //判断编码是否存在 + boolean b = deviceProjectSetService.chcekCode(deviceProjectSetRequest.getCode(), null); + if(b){ + return ResultVOUtils.error(999,"编码已存在!"); + } + deviceProjectSetService.insertDevprojectSet(deviceProjectSetRequest); + return ResultVOUtils.success("添加成功"); + } + + /** + * 更新维保设备维护信息 + * + * @param deviceProjectSetRequest + * @return + */ + @PostMapping("/udiwms/inv/device/project/set/updateDevprojectSet") + public BaseResponse updateDevprojectSet(@RequestBody DeviceProjectSetRequest deviceProjectSetRequest, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + //判断编号是否存在 + boolean b = deviceProjectSetService.chcekCode(deviceProjectSetRequest.getCode(), deviceProjectSetRequest.getId() + ""); + if(b){ + return ResultVOUtils.error(999,"编码已存在!"); + } + + deviceProjectSetService.updateDevprojectSet(deviceProjectSetRequest); + return ResultVOUtils.success("更新成功"); + } + + + /** + * 删除维保设备维护 + * + * @param id + * @return + */ + @GetMapping("/udiwms/inv/device/project/set/deleteDevprojectSet") + public BaseResponse deleteDevprojectSet(String id) { + deviceProjectSetService.deleteDevprojectSet(id); + + return ResultVOUtils.success("删除成功"); + } + +} diff --git a/src/main/java/com/glxp/api/controller/inv/DeviceRepairOrderController.java b/src/main/java/com/glxp/api/controller/inv/DeviceRepairOrderController.java index 6321e960f..f8e1d8503 100644 --- a/src/main/java/com/glxp/api/controller/inv/DeviceRepairOrderController.java +++ b/src/main/java/com/glxp/api/controller/inv/DeviceRepairOrderController.java @@ -96,9 +96,44 @@ public class DeviceRepairOrderController { if (null == updateRequest) { return ResultVOUtils.paramVerifyFail(); } - return deviceRepairOrderService.updateStatus(updateRequest.getOrderId(), updateRequest.getStatus()); + if(!"".equals(updateRequest.getRepariName()) && null !=updateRequest.getRepariName() ){ + return deviceRepairOrderService.updateStatus(updateRequest.getOrderId(), updateRequest.getStatus(),updateRequest.getRepariName()); + }else + return deviceRepairOrderService.updateStatus(updateRequest.getOrderId(), updateRequest.getStatus(),null); } + /** + * 开始任务 + * 更新报修单状态和维修时间 + * + * @param updateRequest + * @return + */ + @PostMapping("/udiwms/inv/device/repair/order/updateStatusAndTime") + public BaseResponse updateStatusAndTime(@RequestBody UpdateRequest updateRequest) { + if (null == updateRequest) { + return ResultVOUtils.paramVerifyFail(); + } + return deviceRepairOrderService.updateStatusAndTime(updateRequest.getOrderId(), updateRequest.getStatus()); + } + + /** + * 结束任务 + * 更新报修单状态 维修时间 维修照片 + * + * @param updateRequest + * @return + */ + @PostMapping("/udiwms/inv/device/repair/order/updateStatusAndImg") + public BaseResponse updateStatusAndImg(@RequestBody UpdateRequest updateRequest) { + if (null == updateRequest) { + return ResultVOUtils.paramVerifyFail(); + } + return deviceRepairOrderService.updateStatusAndImg(updateRequest.getOrderId(), updateRequest.getStatus(), + updateRequest.getRepariImage(),updateRequest.getRepariRemark()); + } + + /** * 删除报修单 * diff --git a/src/main/java/com/glxp/api/controller/purchase/SupProductController.java b/src/main/java/com/glxp/api/controller/purchase/SupProductController.java index acd248ad6..9f52f29b3 100644 --- a/src/main/java/com/glxp/api/controller/purchase/SupProductController.java +++ b/src/main/java/com/glxp/api/controller/purchase/SupProductController.java @@ -86,11 +86,10 @@ public class SupProductController { @PostMapping("/sup/product/addRegistration") @Log(title = "资质证书", businessType = BusinessType.INSERT) public BaseResponse addRegistration(@RequestBody SupProductEntity supProductEntity) { - + System.out.println(supProductEntity.toString()); //提交审核 if (supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_UN) { //判断是否上级供应商是否审核通过 - SupManufacturerEntity supManufacturerEntity = supManufacturerService.findManufacturer(supProductEntity.getManufacturerIdFk()); if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_UN || supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_DRAFT) { @@ -135,15 +134,22 @@ public class SupProductController { return ResultVOUtils.error(500, errMsg.substring(1) + "等证书未上传,无法提交审核!"); } } - supProductEntity.setCreateTime(new Date()); - supProductEntity.setUpdateTime(new Date()); - supProductEntity.setId(IdUtil.getSnowflakeNextId()); - boolean b = supProductService.insertRegistration(supProductEntity); - if (b) { - return ResultVOUtils.success("添加成功"); + int i = supProductService.findProduct(supProductEntity); + System.out.println(i); + if (i == 0) { + supProductEntity.setCreateTime(new Date()); + supProductEntity.setUpdateTime(new Date()); + supProductEntity.setId(IdUtil.getSnowflakeNextId()); + boolean b = supProductService.insertRegistration(supProductEntity); + if (b) { + return ResultVOUtils.success("添加成功"); + } else { + return ResultVOUtils.error(ResultEnum.NOT_NETWORK); + } } else { - return ResultVOUtils.error(ResultEnum.NOT_NETWORK); + return ResultVOUtils.error(ResultEnum.DATA_REPEAT); } + } @@ -153,27 +159,27 @@ public class SupProductController { UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectUdiId(Long.valueOf(selectProductBindRequest.getRelIdFk())); SupProductEntity supProductEntity = supProductService.findByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory(), selectProductBindRequest.getManufacturerId()); - if (supProductEntity != null) { - return ResultVOUtils.error(500, "该产品资质已存在,请勿重复添加!"); - } else { - supProductEntity = new SupProductEntity(); - BeanUtils.copyProperties(udiRelevanceResponse, supProductEntity); - supProductEntity.setProductId(selectProductBindRequest.getProductId()); - supProductEntity.setRecordCode(udiRelevanceResponse.getZczbhhzbapzbh()); - supProductEntity.setRelIdFk(udiRelevanceResponse.getId() + ""); - supProductEntity.setRecordProductName(udiRelevanceResponse.getCpmctymc()); - supProductEntity.setProductType(udiRelevanceResponse.getQxlb()); - supProductEntity.setProductDirectoryCode(udiRelevanceResponse.getFlbm()); - supProductEntity.setRecordPeopleName(udiRelevanceResponse.getYlqxzcrbarmc()); - supProductEntity.setSpecification(udiRelevanceResponse.getGgxh()); - supProductEntity.setCreateTime(new Date()); - supProductEntity.setUpdateTime(new Date()); - supProductEntity.setManufacturerIdFk(selectProductBindRequest.getManufacturerId()); - supProductEntity.setCustomerId(selectProductBindRequest.getCustomerId()); - supProductEntity.setHchzsb(udiRelevanceResponse.getCplb()); +// if (supProductEntity != null) { +//// return ResultVOUtils.error(500, "该产品资质已存在,请勿重复添加!"); +// } else { + supProductEntity = new SupProductEntity(); + BeanUtils.copyProperties(udiRelevanceResponse, supProductEntity); + supProductEntity.setProductId(selectProductBindRequest.getProductId()); + supProductEntity.setRecordCode(udiRelevanceResponse.getZczbhhzbapzbh()); + supProductEntity.setRelIdFk(udiRelevanceResponse.getId() + ""); + supProductEntity.setRecordProductName(udiRelevanceResponse.getCpmctymc()); + supProductEntity.setProductType(udiRelevanceResponse.getQxlb()); + supProductEntity.setProductDirectoryCode(udiRelevanceResponse.getFlbm()); + supProductEntity.setRecordPeopleName(udiRelevanceResponse.getYlqxzcrbarmc()); + supProductEntity.setSpecification(udiRelevanceResponse.getGgxh()); + supProductEntity.setCreateTime(new Date()); + supProductEntity.setUpdateTime(new Date()); + supProductEntity.setManufacturerIdFk(selectProductBindRequest.getManufacturerId()); + supProductEntity.setCustomerId(selectProductBindRequest.getCustomerId()); + supProductEntity.setHchzsb(udiRelevanceResponse.getCplb()); // supProductEntity.setCompanyName(selectProductBindRequest.getCompanyName()); - supProductEntity.setAuditStatus(selectProductBindRequest.getAuditStatus()); - } + supProductEntity.setAuditStatus(selectProductBindRequest.getAuditStatus()); +// } return ResultVOUtils.success(supProductEntity); diff --git a/src/main/java/com/glxp/api/dao/inout/IoOrderDetailBizDao.java b/src/main/java/com/glxp/api/dao/inout/IoOrderDetailBizDao.java index 4d3c9acf0..1e56cf232 100644 --- a/src/main/java/com/glxp/api/dao/inout/IoOrderDetailBizDao.java +++ b/src/main/java/com/glxp/api/dao/inout/IoOrderDetailBizDao.java @@ -34,6 +34,7 @@ public interface IoOrderDetailBizDao extends BaseMapperPlus { +} \ No newline at end of file diff --git a/src/main/java/com/glxp/api/dao/inv/DeviceInspectTaskDetailMapper.java b/src/main/java/com/glxp/api/dao/inv/DeviceInspectTaskDetailMapper.java index 9977ba8b4..dda5195c3 100644 --- a/src/main/java/com/glxp/api/dao/inv/DeviceInspectTaskDetailMapper.java +++ b/src/main/java/com/glxp/api/dao/inv/DeviceInspectTaskDetailMapper.java @@ -1,9 +1,12 @@ package com.glxp.api.dao.inv; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.glxp.api.entity.inv.DeviceInspectTaskDetail; +import com.glxp.api.dao.BaseMapperPlus; +import com.glxp.api.dao.purchase.PurOrderDao; +import com.glxp.api.entity.inv.DeviceInspectTaskDetailEntity; +import com.glxp.api.entity.purchase.PurOrderEntity; import org.apache.ibatis.annotations.Mapper; @Mapper -public interface DeviceInspectTaskDetailMapper extends BaseMapper { +public interface DeviceInspectTaskDetailMapper extends BaseMapperPlus { } \ No newline at end of file diff --git a/src/main/java/com/glxp/api/dao/inv/DeviceInspectTaskMapper.java b/src/main/java/com/glxp/api/dao/inv/DeviceInspectTaskMapper.java index 0b805c96b..acbf6c706 100644 --- a/src/main/java/com/glxp/api/dao/inv/DeviceInspectTaskMapper.java +++ b/src/main/java/com/glxp/api/dao/inv/DeviceInspectTaskMapper.java @@ -1,9 +1,17 @@ package com.glxp.api.dao.inv; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.glxp.api.entity.inv.DeviceInspectTask; +import com.glxp.api.entity.inv.DeviceInspectTaskEntity; +import com.glxp.api.req.inv.FilterDeviceInspectPlanRequest; +import com.glxp.api.req.inv.FilterDeviceInspectTakeRequest; +import com.glxp.api.res.inv.DeviceInspectPlanResponse; +import com.glxp.api.res.inv.DeviceInspectTakeResponse; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + @Mapper -public interface DeviceInspectTaskMapper extends BaseMapper { +public interface DeviceInspectTaskMapper extends BaseMapper { + + List filterList(FilterDeviceInspectTakeRequest filterDeviceInspectTakeRequest); } \ No newline at end of file diff --git a/src/main/java/com/glxp/api/dao/inv/DeviceProjectSetMapper.java b/src/main/java/com/glxp/api/dao/inv/DeviceProjectSetMapper.java index 126bb0179..47758a366 100644 --- a/src/main/java/com/glxp/api/dao/inv/DeviceProjectSetMapper.java +++ b/src/main/java/com/glxp/api/dao/inv/DeviceProjectSetMapper.java @@ -2,8 +2,15 @@ package com.glxp.api.dao.inv; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.glxp.api.entity.inv.DeviceProjectSet; +import com.glxp.api.req.inv.DeviceProjectSetRequest; +import com.glxp.api.res.inv.DeviceProjectSetResponse; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + @Mapper public interface DeviceProjectSetMapper extends BaseMapper { -} \ No newline at end of file + + List filterList(DeviceProjectSetRequest deviceProjectSetRequest); + +} diff --git a/src/main/java/com/glxp/api/dao/purchase/SupProductDao.java b/src/main/java/com/glxp/api/dao/purchase/SupProductDao.java index 14483eb33..052bf63b4 100644 --- a/src/main/java/com/glxp/api/dao/purchase/SupProductDao.java +++ b/src/main/java/com/glxp/api/dao/purchase/SupProductDao.java @@ -26,7 +26,7 @@ public interface SupProductDao extends BaseMapperPlus * diff --git a/src/main/java/com/glxp/api/http/ErpOrderClient.java b/src/main/java/com/glxp/api/http/ErpOrderClient.java index 2d98b6321..55a522d13 100644 --- a/src/main/java/com/glxp/api/http/ErpOrderClient.java +++ b/src/main/java/com/glxp/api/http/ErpOrderClient.java @@ -61,85 +61,5 @@ public class ErpOrderClient { return null; } - public List getErpOrder(FilterThrOrderRequest filterOrderRequest) { - try { - BaseResponse> responseBaseResponse = getThrOrderResponse(filterOrderRequest); - List purchaseinResponseList = responseBaseResponse.getData().getList(); - if (purchaseinResponseList != null && purchaseinResponseList.size() > 0) { - List erpOrderEntities = new ArrayList<>(); - for (ThrOrderResponse ThrOrderResponse : purchaseinResponseList) { - for (ThrOrderResponse.SubErpOrder subPurchase : ThrOrderResponse.getSubErpOrders()) { - ThrErpOrderResponse ThrErpOrderResponse = new ThrErpOrderResponse(); - ThrErpOrderResponse.setErpOrderId(ThrOrderResponse.getBillNo()); - ThrErpOrderResponse.setCompanyid(ThrOrderResponse.getCorpId()); - ThrErpOrderResponse.setCompanyname(ThrOrderResponse.getCorpName()); - ThrErpOrderResponse.setCredate(ThrOrderResponse.getBilldate()); - ThrErpOrderResponse.setGoodsid(subPurchase.getProductId()); - ThrErpOrderResponse.setGoodsname(subPurchase.getProductName()); - ThrErpOrderResponse.setBatchNo(subPurchase.getBatchNo()); - ThrErpOrderResponse.setProductDate(subPurchase.getProductDate()); - ThrErpOrderResponse.setExpireDate(subPurchase.getExpireDate()); - ThrErpOrderResponse.setErpCount(subPurchase.getCount()); - ThrErpOrderResponse.setReCount(subPurchase.getReCount()); - ThrErpOrderResponse.setOriginType(ThrOrderResponse.getOriginType()); - ThrErpOrderResponse.setGoodsunit(subPurchase.getSpec()); - ThrErpOrderResponse.setOrderFromType(ConstantStatus.SORDER_FROM_ONLINE); - erpOrderEntities.add(ThrErpOrderResponse); - } - } - return erpOrderEntities; - } - } catch ( - Exception e) { - e.printStackTrace(); - } - return null; - } - - -// public BaseResponse submitOrder(UdiwmsOrderRequest udiwmsOrderRequest) { -// BasicThirdSysEntity basicThirdSysEntity = basicThirdSysService.selectByThirdId(udiwmsOrderRequest.getThirdSys()); -// String url = basicThirdSysEntity.getThridUrl() + "/udiwms/erp/submitOrders"; -// String response = httpOkClient.uCloudPost(url, udiwmsOrderRequest); -// try { -// BaseResponse> responseBaseResponse = -// JSONObject.parseObject(response, new TypeReference>>() { -// }); -// return responseBaseResponse; -// } catch (Exception e) { -// log.error("获取订单数据异常", e); -// } -// return null; -// } - - -// public BaseResponse postBill(Map> postMap, String billAction, String uploadUrl, String thirdSysFk) { -// ERPPostBillRequest erpPostBillRequest = new ERPPostBillRequest(); -// erpPostBillRequest.setPostMap(postMap); -// erpPostBillRequest.setBillAction(billAction); -// -// //查询第三方服务授权参数 -// BasicThirdSysEntity basicThirdSysEntity = basicThirdSysService.selectByThirdId(thirdSysFk); -// String response = httpOkClient.uCloudPost(uploadUrl, erpPostBillRequest, basicThirdSysEntity); -// BaseResponse baseResponse = JSONObject.parseObject(response, new TypeReference() { -// }); -// return baseResponse; -// } -// -// public BaseResponse postBill(ERPPostBillRequest erpPostBillRequest, String uploadUrl) { -// String response = httpOkClient.uCloudPost(uploadUrl, erpPostBillRequest); -// BaseResponse baseResponse = -// JSONObject.parseObject(response, new TypeReference() { -// }); -// return baseResponse; -// } -// -// public BaseResponse signBill(USignRequest signRequest, String url) { -// String response = httpOkClient.uCloudPost(url, signRequest); -// BaseResponse baseResponse = -// JSONObject.parseObject(response, new TypeReference() { -// }); -// return baseResponse; -// } } diff --git a/src/main/java/com/glxp/api/req/inv/AddDeviceInspectPlanRequest.java b/src/main/java/com/glxp/api/req/inv/AddDeviceInspectPlanRequest.java index 8e906600e..8380db3f0 100644 --- a/src/main/java/com/glxp/api/req/inv/AddDeviceInspectPlanRequest.java +++ b/src/main/java/com/glxp/api/req/inv/AddDeviceInspectPlanRequest.java @@ -2,6 +2,8 @@ package com.glxp.api.req.inv; import lombok.Data; +import java.util.Date; + /** * 添加部门设备巡检计划参数 */ @@ -38,4 +40,39 @@ public class AddDeviceInspectPlanRequest { */ private String remark; + + /** + * 计划开始时间 + */ + private Date startTime; + /** + * 计划结束时间 + */ + private Date endTime; + /** + * 时间频率 + */ + private String frequency; + /** + * 时间频率单位(1:年;2:月:3:日;4:小时;5:分钟: 6:秒) + */ + private Integer frequencyUnit; + /** + * 计划状态(1:未启用;2:运行中;3:已结束;4:已过期 + */ + private Integer planStatus; + /** + * 巡检人 + */ + private String inspectUser; + /** + * 上次巡检时间 + */ + private Date lastTime; + /** + * 下一次巡检时间 + */ + private Date nextTime; + + } diff --git a/src/main/java/com/glxp/api/req/inv/AddDeviceRepairOrderRequest.java b/src/main/java/com/glxp/api/req/inv/AddDeviceRepairOrderRequest.java index a1e10629b..45b817b62 100644 --- a/src/main/java/com/glxp/api/req/inv/AddDeviceRepairOrderRequest.java +++ b/src/main/java/com/glxp/api/req/inv/AddDeviceRepairOrderRequest.java @@ -2,6 +2,8 @@ package com.glxp.api.req.inv; import lombok.Data; +import java.util.Date; + /** * 添加设备报修单参数 */ @@ -24,7 +26,7 @@ public class AddDeviceRepairOrderRequest { private String code; /** - * 状态(1:新增;2:未审核;3:已审核) + * 状态(0:草稿;1:未审核;2:已审核;3:未处理 4:维修中 5:已处理) */ private Integer status; @@ -38,4 +40,45 @@ public class AddDeviceRepairOrderRequest { */ private String remark; + + // ----------------------新增字段=------------------------------- + /** + * 维修类型 1:自行维修;2:外部维修 + */ + private Integer repairType; + /** + * 紧急类型 1,正常;2,较急;3,特急 + */ + private Integer urgencyType; + /** + * 计划完成日期 + */ + private Date planTime; + /** + * 报修图片 + */ + private String uploadImage; + + + /** + * 维修人 + */ + private String repariName; + /** + * 维修开始时间 + */ + private String repariStartTime; + /** + * 维修结束时间 + */ + private String repariEndTime; + /** + * 维修说明 + */ + private String repariRemark; + /** + * 维修图片 + */ + private String repariImage; + } diff --git a/src/main/java/com/glxp/api/req/inv/DeviceProjectSetRequest.java b/src/main/java/com/glxp/api/req/inv/DeviceProjectSetRequest.java new file mode 100644 index 000000000..35370cf35 --- /dev/null +++ b/src/main/java/com/glxp/api/req/inv/DeviceProjectSetRequest.java @@ -0,0 +1,55 @@ +package com.glxp.api.req.inv; + +import com.glxp.api.util.page.ListPageRequest; +import lombok.Data; + +import java.util.Date; + +@Data +public class DeviceProjectSetRequest extends ListPageRequest { + private Integer id; + + /** + * 项目编号 + */ + private String code; + + /** + * 项目内容 + */ + private String content; + + /** + * 项目类型:1:巡检;2:养护 + */ + private Integer type; + + /** + * 备注 + */ + private String remak; + + /** + * 更新时间 + */ + private Date udpateTime; + + /** + * 更新人 + */ + private String updateUser; + + /** + * 创建人 + */ + private String createUser; + + /** + * 创建时间 + */ + private Date createTime; + + private String startTime; + private String endTime; + +} diff --git a/src/main/java/com/glxp/api/req/inv/FilterDeviceInspectPlanRequest.java b/src/main/java/com/glxp/api/req/inv/FilterDeviceInspectPlanRequest.java index 6b963e85b..3bbe659c2 100644 --- a/src/main/java/com/glxp/api/req/inv/FilterDeviceInspectPlanRequest.java +++ b/src/main/java/com/glxp/api/req/inv/FilterDeviceInspectPlanRequest.java @@ -3,6 +3,8 @@ package com.glxp.api.req.inv; import com.glxp.api.util.page.ListPageRequest; import lombok.Data; +import java.util.List; + /** * 查询设备设备巡检计划接口参数 */ @@ -41,4 +43,24 @@ public class FilterDeviceInspectPlanRequest extends ListPageRequest { */ private Integer status; + private List statusList; + + private Integer planStatus; + + + private String ksStartDate; + + private String ksEndDate; + + private String jsStartDate; + + private String jsEndDate; + + private String auditStartDate; + + private String auditEndDate; + + + + } diff --git a/src/main/java/com/glxp/api/req/inv/FilterDeviceInspectTakeRequest.java b/src/main/java/com/glxp/api/req/inv/FilterDeviceInspectTakeRequest.java new file mode 100644 index 000000000..3d82505ee --- /dev/null +++ b/src/main/java/com/glxp/api/req/inv/FilterDeviceInspectTakeRequest.java @@ -0,0 +1,64 @@ +package com.glxp.api.req.inv; + +import com.glxp.api.util.page.ListPageRequest; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * 查询设备设备巡检计划接口参数 + */ +@Data +public class FilterDeviceInspectTakeRequest extends ListPageRequest { + + private Integer id; + + /** + * 单号 + */ + private String orderId; + + /** + * 部门编码 + */ + private String deptCode; + + /** + * 仓库编码 + */ + private String invCode; + + /** + * 资产编码 + */ + private String code; + + /** + * 计划级别(1:低级;2:中级;3:高级) + */ + private Integer level; + + /** + * 状态(1:新增;2:未审核;3:已审核) + */ + private Integer status; + + private List statusList; + + private Date expectedTime; + + private String ksStartDate; + + private String ksEndDate; + + private String jsStartDate; + + private String jsEndDate; + + private String yjjsStartDate; + + private String yjjsEndDate; + + +} diff --git a/src/main/java/com/glxp/api/req/inv/FilterDeviceRepairOrderRequest.java b/src/main/java/com/glxp/api/req/inv/FilterDeviceRepairOrderRequest.java index 2c26ce6c2..48774e5d4 100644 --- a/src/main/java/com/glxp/api/req/inv/FilterDeviceRepairOrderRequest.java +++ b/src/main/java/com/glxp/api/req/inv/FilterDeviceRepairOrderRequest.java @@ -3,6 +3,8 @@ package com.glxp.api.req.inv; import com.glxp.api.util.page.ListPageRequest; import lombok.Data; +import java.util.List; + /** * 查询部门设备报修单接口参数 */ @@ -32,8 +34,24 @@ public class FilterDeviceRepairOrderRequest extends ListPageRequest { private String code; /** - * 状态(1:新增;2:未审核;3:已审核) + * 状态(0:草稿;1:未审核;2:已审核;3:未处理 4:维修中 5:已处理) */ private Integer status; + private List statusList; + + /** + * 维修人 + */ + private String repariName; + + /** + * 维修类型 1:自行维修;2:外部维修 + */ + private Integer repairType; + /** + * 紧急类型 1,正常;2,较急;3,特急 + */ + private Integer urgencyType; + } diff --git a/src/main/java/com/glxp/api/res/inv/DeviceInspectPlanResponse.java b/src/main/java/com/glxp/api/res/inv/DeviceInspectPlanResponse.java index 2d2b101ba..a34e318cb 100644 --- a/src/main/java/com/glxp/api/res/inv/DeviceInspectPlanResponse.java +++ b/src/main/java/com/glxp/api/res/inv/DeviceInspectPlanResponse.java @@ -102,4 +102,37 @@ public class DeviceInspectPlanResponse { */ private String auditUserName; + /** + * 计划开始时间 + */ + private Date startTime; + /** + * 计划结束时间 + */ + private Date endTime; + /** + * 时间频率 + */ + private String frequency; + /** + * 时间频率单位(1:年;2:月:3:日;4:小时;5:分钟: 6:秒) + */ + private Integer frequencyUnit; + /** + * 计划状态(1:未启用;2:运行中;3:已结束;4:已过期 + */ + private Integer planStatus; + /** + * 巡检人 + */ + private String inspectUser; + /** + * 上次巡检时间 + */ + private Date lastTime; + /** + * 下一次巡检时间 + */ + private Date nextTime; + } diff --git a/src/main/java/com/glxp/api/res/inv/DeviceInspectTakeResponse.java b/src/main/java/com/glxp/api/res/inv/DeviceInspectTakeResponse.java new file mode 100644 index 000000000..3ce7a8062 --- /dev/null +++ b/src/main/java/com/glxp/api/res/inv/DeviceInspectTakeResponse.java @@ -0,0 +1,115 @@ +package com.glxp.api.res.inv; + +import lombok.Data; + +import java.util.Date; + +/** + * 设备巡检计划VO + */ +@Data +public class DeviceInspectTakeResponse { + + private Integer id; + + /** + * 单号 + */ + private String orderId; + + /** + * 部门编码 + */ + private String deptCode; + + /** + * 仓库编码 + */ + private String invCode; + + /** + * 资产编码 + */ + private String code; + + private String planOrderIdFk; + + /** + * 状态(0:未巡检;1:巡检中;2:已巡检) + */ + private Integer status; + + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 备注 + */ + private String remark; + + /** + * 部门名称 + */ + private String deptName; + + /** + * 仓库名称 + */ + private String invName; + + /** + * 设备名称 + */ + private String deviceName; + + /** + * 规格型号 + */ + private String ggxh; + + /** + * 批次号 + */ + private String batchNo; + + /** + * 创建人名称 + */ + private String createUserName; + + /** + * 审核人名称 + */ + private String auditUserName; + + /** + * 计划开始时间 + */ + private Date strartTime; + /** + * 计划结束时间 + */ + private Date endTime; + + /** + * 计划状态(1:未启用;2:运行中;3:已结束;4:已过期 + */ + private Integer planStatus; + /** + * 巡检人 + */ + private String inspectUser; + /** + * 上次巡检时间 + */ + private Date remindTime; + private String inspectName; + private Date expectedTime; + private Integer type; + + + +} diff --git a/src/main/java/com/glxp/api/res/inv/DeviceProjectSetResponse.java b/src/main/java/com/glxp/api/res/inv/DeviceProjectSetResponse.java new file mode 100644 index 000000000..43862670b --- /dev/null +++ b/src/main/java/com/glxp/api/res/inv/DeviceProjectSetResponse.java @@ -0,0 +1,60 @@ +package com.glxp.api.res.inv; + +import lombok.Data; + +import java.util.Date; + +@Data +public class DeviceProjectSetResponse { + private Integer id; + + /** + * 项目编号 + */ + private String code; + + /** + * 项目内容 + */ + private String content; + + /** + * 项目类型:1:巡检;2:养护 + */ + private Integer type; + + /** + * 备注 + */ + private String remak; + + /** + * 更新时间 + */ + private Date udpateTime; + + /** + * 更新人 + */ + private String updateUser; + + /** + * 更新人名称 + */ + private String updateUserName; + + /** + * 创建人 + */ + private String createUser; + /** + * 创建人名称 + */ + private String createUserName; + + /** + * 创建时间 + */ + private Date createTime; + +} diff --git a/src/main/java/com/glxp/api/res/inv/DeviceRepairOrderResponse.java b/src/main/java/com/glxp/api/res/inv/DeviceRepairOrderResponse.java index 264e2049b..4ac6041df 100644 --- a/src/main/java/com/glxp/api/res/inv/DeviceRepairOrderResponse.java +++ b/src/main/java/com/glxp/api/res/inv/DeviceRepairOrderResponse.java @@ -33,7 +33,7 @@ public class DeviceRepairOrderResponse { private String code; /** - * 状态(0:新增;1:未审核;2:已审核) + * 状态(0:草稿;1:未审核;2:已审核;3:未处理 4:维修中 5:已处理) */ private Integer status; @@ -102,4 +102,49 @@ public class DeviceRepairOrderResponse { */ private String batchNo; + // ----------------------新增字段=------------------------------- + /** + * 维修类型 1:自行维修;2:外部维修 + */ + private Integer repairType; + /** + * 紧急类型 1,正常;2,较急;3,特急 + */ + private Integer urgencyType; + /** + * 计划完成日期 + */ + private Date planTime; + /** + * 报修图片 + */ + private String uploadImage; + + + /** + * 维修人 + */ + private String repariName; + + /** + * 维修人名称 + */ + private String repName; + /** + * 维修开始时间 + */ + private String repariStartTime; + /** + * 维修结束时间 + */ + private String repariEndTime; + /** + * 维修说明 + */ + private String repariRemark; + /** + * 维修图片 + */ + private String repariImage; + } diff --git a/src/main/java/com/glxp/api/service/inout/IoCheckInoutService.java b/src/main/java/com/glxp/api/service/inout/IoCheckInoutService.java index 6262567b5..54bf762fa 100644 --- a/src/main/java/com/glxp/api/service/inout/IoCheckInoutService.java +++ b/src/main/java/com/glxp/api/service/inout/IoCheckInoutService.java @@ -11,6 +11,7 @@ import com.glxp.api.entity.basic.BasicBussinessTypeEntity; import com.glxp.api.entity.basic.UdiEntity; import com.glxp.api.entity.inout.*; import com.glxp.api.entity.inv.InvPreInProductDetailEntity; +import com.glxp.api.entity.system.SystemParamConfigEntity; import com.glxp.api.res.inout.IoOrderCheckResultResponse; import com.glxp.api.res.inout.IoOrderDetailBizResponse; import com.glxp.api.res.inout.IoOrderDetailCodeResponse; @@ -18,6 +19,7 @@ import com.glxp.api.service.auth.InvWarehouseService; import com.glxp.api.service.basic.IBasicBussinessTypeService; import com.glxp.api.service.inv.InvPreinDetailService; import com.glxp.api.service.inv.InvPreinProductDetailService; +import com.glxp.api.service.system.SystemParamConfigService; import com.glxp.api.util.CustomUtil; import com.glxp.api.util.GennerOrderUtils; import com.glxp.api.util.IntUtil; @@ -306,14 +308,27 @@ public class IoCheckInoutService { } } + SystemParamConfigService systemParamConfigService; + public String checkCode(IoCodeTempEntity codeEntity) { + SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("only_vail_batch"); + boolean vailBatchNo = false; + if (systemParamConfigEntity != null) { + if (systemParamConfigEntity.getParamValue().equals(1)) { + vailBatchNo = true; + } + } boolean isBillExit = orderDetailBizService.isExit(codeEntity.getOrderId()); if (!isBillExit) { return "请先录入业务详情"; } - - IoOrderDetailBizEntity bizEntity = orderDetailBizService.findByUnique(codeEntity.getOrderId(), codeEntity.getRelId(), codeEntity.getBatchNo(), codeEntity.getProduceDate(), codeEntity.getExpireDate()); + IoOrderDetailBizEntity bizEntity = null; + if (vailBatchNo) { + bizEntity = orderDetailBizService.findByUnique(codeEntity.getOrderId(), codeEntity.getRelId(), codeEntity.getBatchNo()); + } else { + bizEntity = orderDetailBizService.findByUnique(codeEntity.getOrderId(), codeEntity.getRelId(), codeEntity.getBatchNo(), codeEntity.getProduceDate(), codeEntity.getExpireDate()); + } if (bizEntity == null) { return "非此单产品!"; } @@ -1120,6 +1135,12 @@ public class IoCheckInoutService { } public String checkProductDate(IoOrderDetailBizEntity bizEntity, IoOrderDetailCodeEntity codeEntity) { + + String value = systemParamConfigService.selectValueByParamKey("only_vail_batch"); + if (StrUtil.isNotEmpty(value) && value.equals("1")) { + return null; + } + if (StrUtil.nullToEmpty(bizEntity.getProductDate()).equals(StrUtil.nullToEmpty(codeEntity.getProductDate()))) { return null; } else { @@ -1128,6 +1149,10 @@ public class IoCheckInoutService { } public String checkExpireDate(IoOrderDetailBizEntity bizEntity, IoOrderDetailCodeEntity codeEntity) { + String value = systemParamConfigService.selectValueByParamKey("only_vail_batch"); + if (StrUtil.isNotEmpty(value) && value.equals("1")) { + return null; + } if (StrUtil.nullToEmpty(bizEntity.getExpireDate()).equals(StrUtil.nullToEmpty(codeEntity.getExpireDate()))) { return null; } else { diff --git a/src/main/java/com/glxp/api/service/inout/IoOrderDetailBizService.java b/src/main/java/com/glxp/api/service/inout/IoOrderDetailBizService.java index a5def8022..d1773548e 100644 --- a/src/main/java/com/glxp/api/service/inout/IoOrderDetailBizService.java +++ b/src/main/java/com/glxp/api/service/inout/IoOrderDetailBizService.java @@ -33,6 +33,7 @@ public interface IoOrderDetailBizService { boolean isExit(Long relId, String bacthNo, Long ignoreId, String orderId); IoOrderDetailBizEntity findByUnique(String orderId, Long relId, String bacthNo, String productDate, String expireDate); + IoOrderDetailBizEntity findByUnique(String orderId, Long relId, String bacthNo); IoOrderDetailBizEntity findByRelId(String orderId, Long relId); diff --git a/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java b/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java index fff113029..379f20e61 100644 --- a/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java @@ -96,8 +96,13 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService { } @Override - public IoOrderDetailBizEntity findByUnique(String orderId, Long relId, String bacthNo, String productDate, String expireDate) { - return ioOrderDetailBizDao.selectOrderDetailBiz(orderId, relId, bacthNo, productDate, expireDate); + public IoOrderDetailBizEntity findByUnique(String orderId, Long relId, String batchNo, String productDate, String expireDate) { + return ioOrderDetailBizDao.selectOrderDetailBiz(orderId, relId, batchNo, productDate, expireDate); + } + + @Override + public IoOrderDetailBizEntity findByUnique(String orderId, Long relId, String batchNo) { + return ioOrderDetailBizDao.findByRelBatch(orderId, relId, batchNo); } @Override diff --git a/src/main/java/com/glxp/api/service/inv/DeviceInspectPlanDelectService.java b/src/main/java/com/glxp/api/service/inv/DeviceInspectPlanDelectService.java new file mode 100644 index 000000000..7256023fb --- /dev/null +++ b/src/main/java/com/glxp/api/service/inv/DeviceInspectPlanDelectService.java @@ -0,0 +1,20 @@ +package com.glxp.api.service.inv; + +import com.glxp.api.dao.inv.DeviceInspectPlanDelectMapper; +import com.glxp.api.entity.inv.DeviceInspectPlanDelectEntity; +import com.baomidou.mybatisplus.extension.service.IService; + +import javax.annotation.Resource; +import java.util.List; + +public interface DeviceInspectPlanDelectService extends IService { + + List selectDeviceInspectPlanDelect(DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity); + + Boolean addDeviceInspectPlanDelectEntity(DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity); + + Boolean uploadDeviceInspectPlanDelectEntity(DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity); + + Boolean delectDeviceInspectPlanDelectEntity(DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity); + +} diff --git a/src/main/java/com/glxp/api/service/inv/DeviceInspectPlanService.java b/src/main/java/com/glxp/api/service/inv/DeviceInspectPlanService.java index 6ed4b8a9d..517340db4 100644 --- a/src/main/java/com/glxp/api/service/inv/DeviceInspectPlanService.java +++ b/src/main/java/com/glxp/api/service/inv/DeviceInspectPlanService.java @@ -6,6 +6,7 @@ import com.glxp.api.req.inv.AddDeviceInspectPlanRequest; import com.glxp.api.req.inv.FilterDeviceInspectPlanRequest; import com.glxp.api.res.inv.DeviceInspectPlanResponse; +import java.util.Date; import java.util.List; /** @@ -52,7 +53,7 @@ public interface DeviceInspectPlanService { * @param status * @return */ - BaseResponse updateStatus(String orderId, Integer status); + BaseResponse updateStatus(String orderId, Integer status, String inspectUser, Date expectedTime); /** * 删除巡检计划 diff --git a/src/main/java/com/glxp/api/service/inv/DeviceInspectTaskDetailService.java b/src/main/java/com/glxp/api/service/inv/DeviceInspectTaskDetailService.java index f870cdb76..ccf059ff9 100644 --- a/src/main/java/com/glxp/api/service/inv/DeviceInspectTaskDetailService.java +++ b/src/main/java/com/glxp/api/service/inv/DeviceInspectTaskDetailService.java @@ -1,12 +1,60 @@ package com.glxp.api.service.inv; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.glxp.api.dao.inv.DeviceInspectTaskMapper; +import com.glxp.api.entity.inv.DeviceInspectPlanDelectEntity; +import com.glxp.api.entity.inv.DeviceInspectTaskEntity; import org.springframework.stereotype.Service; -import javax.annotation.Resource; -import java.util.List; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.glxp.api.entity.inv.DeviceInspectTaskDetail; +import com.glxp.api.entity.inv.DeviceInspectTaskDetailEntity; import com.glxp.api.dao.inv.DeviceInspectTaskDetailMapper; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + @Service -public class DeviceInspectTaskDetailService extends ServiceImpl { +public class DeviceInspectTaskDetailService extends ServiceImpl { + + @Resource + private DeviceInspectTaskDetailMapper deviceInspectTaskDetailMapper; + + public Boolean addDeviceInspectTaskDelect(DeviceInspectTaskDetailEntity deviceInspectTaskDetailEntity){ + deviceInspectTaskDetailEntity.setUpdateTime(new Date()); + deviceInspectTaskDetailMapper.insert(deviceInspectTaskDetailEntity); + return true; + } + + public Boolean addDeviceInspectTaskDelectList(List deviceInspectTaskDetailEntityList){ + deviceInspectTaskDetailMapper.insertBatch(deviceInspectTaskDetailEntityList); + return true; + } + + + public List selectDeviceInspectTakeDetail(DeviceInspectTaskDetailEntity deviceInspectTaskDetailEntity) { + + QueryWrapper ew = new QueryWrapper<>(); + if(deviceInspectTaskDetailEntity.getProjectCode() != null){ + ew.eq("projectCode",deviceInspectTaskDetailEntity.getProjectCode()); + } + if(deviceInspectTaskDetailEntity.getId() != null){ + ew.eq("id",deviceInspectTaskDetailEntity.getId()); + } + if(deviceInspectTaskDetailEntity.getTaskOrderIdFk() != null){ + ew.eq("taskOrderIdFk",deviceInspectTaskDetailEntity.getTaskOrderIdFk()); + } + if(deviceInspectTaskDetailEntity.getStatus() != null){ + ew.like("status",deviceInspectTaskDetailEntity.getStatus()); + } + ew.select("*, ( SELECT `employeeName` FROM auth_user WHERE id = device_inspect_task_detail.inspectUser ) inspectName"); + List deviceInspectPlanDelectEntities=deviceInspectTaskDetailMapper.selectList(ew); + return deviceInspectPlanDelectEntities; + } + + public Boolean uploadDeviceInspecTakeDetail(DeviceInspectTaskDetailEntity deviceInspectTaskDetailEntityList){ + return deviceInspectTaskDetailMapper.updateById(deviceInspectTaskDetailEntityList) > 0 ? true : false; + } + + } diff --git a/src/main/java/com/glxp/api/service/inv/DeviceInspectTaskService.java b/src/main/java/com/glxp/api/service/inv/DeviceInspectTaskService.java index 75dff98bd..28b7e125d 100644 --- a/src/main/java/com/glxp/api/service/inv/DeviceInspectTaskService.java +++ b/src/main/java/com/glxp/api/service/inv/DeviceInspectTaskService.java @@ -1,12 +1,42 @@ package com.glxp.api.service.inv; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.github.pagehelper.PageHelper; +import com.glxp.api.dao.inv.DeviceInspectTaskMapper; +import com.glxp.api.entity.inv.DeviceInspectTaskEntity; +import com.glxp.api.req.inv.FilterDeviceInspectTakeRequest; +import com.glxp.api.res.inv.DeviceInspectTakeResponse; import org.springframework.stereotype.Service; + import javax.annotation.Resource; +import java.util.Collections; +import java.util.Date; import java.util.List; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.glxp.api.dao.inv.DeviceInspectTaskMapper; -import com.glxp.api.entity.inv.DeviceInspectTask; + @Service -public class DeviceInspectTaskService extends ServiceImpl { +public class DeviceInspectTaskService extends ServiceImpl { + + @Resource + private DeviceInspectTaskMapper deviceInspectTaskMapper; + + public Boolean addDeviceInspectTask(DeviceInspectTaskEntity deviceInspectTaskEntity){ + deviceInspectTaskEntity.setUpdateTime(new Date()); + deviceInspectTaskMapper.insert(deviceInspectTaskEntity); + return true; + } + + + + public List filterList(FilterDeviceInspectTakeRequest filterDeviceInspectTakeRequest) { + if (null == filterDeviceInspectTakeRequest) { + return Collections.emptyList(); + } + if (null != filterDeviceInspectTakeRequest.getPage() && null != filterDeviceInspectTakeRequest.getLimit()) { + PageHelper.offsetPage((filterDeviceInspectTakeRequest.getPage() - 1) * filterDeviceInspectTakeRequest.getLimit(), filterDeviceInspectTakeRequest.getLimit()); + } + return deviceInspectTaskMapper.filterList(filterDeviceInspectTakeRequest); + } } + + diff --git a/src/main/java/com/glxp/api/service/inv/DeviceProjectSetService.java b/src/main/java/com/glxp/api/service/inv/DeviceProjectSetService.java index 1eac4ddd0..ef5303192 100644 --- a/src/main/java/com/glxp/api/service/inv/DeviceProjectSetService.java +++ b/src/main/java/com/glxp/api/service/inv/DeviceProjectSetService.java @@ -1,12 +1,77 @@ package com.glxp.api.service.inv; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.github.pagehelper.PageHelper; +import com.glxp.api.dao.inv.DeviceProjectSetMapper; +import com.glxp.api.entity.auth.AuthAdmin; +import com.glxp.api.entity.inv.DeviceProjectSet; +import com.glxp.api.req.inv.DeviceProjectSetRequest; +import com.glxp.api.res.inv.DeviceProjectSetResponse; +import com.glxp.api.service.auth.CustomerService; +import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; + import javax.annotation.Resource; +import java.util.Collections; +import java.util.Date; import java.util.List; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.glxp.api.entity.inv.DeviceProjectSet; -import com.glxp.api.dao.inv.DeviceProjectSetMapper; + @Service public class DeviceProjectSetService extends ServiceImpl { + @Resource + DeviceProjectSetMapper deviceProjectSetMapper; + @Resource + CustomerService customerService; + + public List filterList(DeviceProjectSetRequest deviceProjectSetRequest) { + + if (null == deviceProjectSetRequest) { + return Collections.emptyList(); + } + if (null != deviceProjectSetRequest.getPage() && null != deviceProjectSetRequest.getLimit()) { + PageHelper.offsetPage((deviceProjectSetRequest.getPage() - 1) * deviceProjectSetRequest.getLimit(), deviceProjectSetRequest.getLimit()); + } + return deviceProjectSetMapper.filterList(deviceProjectSetRequest); + + } + + public boolean insertDevprojectSet(DeviceProjectSetRequest deviceProjectSetRequest) { + AuthAdmin user = customerService.getUserBean(); + DeviceProjectSet projectSet = new DeviceProjectSet(); + BeanUtils.copyProperties(deviceProjectSetRequest, projectSet); + projectSet.setCreateTime(new Date()); + projectSet.setCreateUser(user.getId()+""); + return deviceProjectSetMapper.insert(projectSet) > 0; + } + + public boolean deleteDevprojectSet(String id) { + + return deviceProjectSetMapper.deleteById(id) > 0; + } + + public boolean updateDevprojectSet(DeviceProjectSetRequest deviceProjectSetRequest) { + AuthAdmin user = customerService.getUserBean(); + DeviceProjectSet projectSet = new DeviceProjectSet(); + BeanUtils.copyProperties(deviceProjectSetRequest, projectSet); + projectSet.setUdpateTime(new Date()); + projectSet.setUpdateUser(user.getId()+""); + return deviceProjectSetMapper.updateById(projectSet) > 0; + } + + public boolean chcekCode(String code, String id) { + List list = null; + if (id != null && !"".equals(id)) { + list = deviceProjectSetMapper.selectList(new QueryWrapper().eq("code", code).ne("id", id)); + } else + list = deviceProjectSetMapper.selectList(new QueryWrapper().eq("code", code)); + if (list != null && list.size() > 0) { + return true; + } else + return false; + + } + + } diff --git a/src/main/java/com/glxp/api/service/inv/DeviceRepairOrderService.java b/src/main/java/com/glxp/api/service/inv/DeviceRepairOrderService.java index 73f2fc8ec..56dcc90ef 100644 --- a/src/main/java/com/glxp/api/service/inv/DeviceRepairOrderService.java +++ b/src/main/java/com/glxp/api/service/inv/DeviceRepairOrderService.java @@ -52,7 +52,12 @@ public interface DeviceRepairOrderService { * @param status * @return */ - BaseResponse updateStatus(String orderId, Integer status); + BaseResponse updateStatus(String orderId, Integer status,String repariName); + + BaseResponse updateStatusAndTime(String orderId, Integer status); + + BaseResponse updateStatusAndImg(String orderId, Integer status,String repariImage,String repariRemark); + /** * 删除设备报修单 diff --git a/src/main/java/com/glxp/api/service/inv/impl/DeviceInspectPlanDelectServiceImpl.java b/src/main/java/com/glxp/api/service/inv/impl/DeviceInspectPlanDelectServiceImpl.java new file mode 100644 index 000000000..072874859 --- /dev/null +++ b/src/main/java/com/glxp/api/service/inv/impl/DeviceInspectPlanDelectServiceImpl.java @@ -0,0 +1,56 @@ +package com.glxp.api.service.inv.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.glxp.api.dao.inv.DeviceInspectPlanDelectMapper; +import com.glxp.api.entity.inv.DeviceInspectPlanDelectEntity; +import com.glxp.api.service.inv.DeviceInspectPlanDelectService; + +import javax.annotation.Resource; +import java.util.List; + +@Service +public class DeviceInspectPlanDelectServiceImpl extends ServiceImpl implements DeviceInspectPlanDelectService { + + @Resource + DeviceInspectPlanDelectMapper deviceInspectPlanDelectMapper; + + @Override + public List selectDeviceInspectPlanDelect(DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity) { + + QueryWrapper ew = new QueryWrapper<>(); + if(deviceInspectPlanDelectEntity.getOrderIdFk() != null){ + ew.eq("orderIdFk",deviceInspectPlanDelectEntity.getOrderIdFk()); + } + if(deviceInspectPlanDelectEntity.getId() != null){ + ew.eq("id",deviceInspectPlanDelectEntity.getId()); + } + if(deviceInspectPlanDelectEntity.getCode() != null){ + ew.eq("code",deviceInspectPlanDelectEntity.getCode()); + } + if(deviceInspectPlanDelectEntity.getContent() != null){ + ew.like("content",deviceInspectPlanDelectEntity.getContent()); + } + if(deviceInspectPlanDelectEntity.getType() != null){ + ew.eq("type",deviceInspectPlanDelectEntity.getType()); + } + List deviceInspectPlanDelectEntities=deviceInspectPlanDelectMapper.selectList(ew); + return deviceInspectPlanDelectEntities; + } + + @Override + public Boolean addDeviceInspectPlanDelectEntity(DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity) { + return deviceInspectPlanDelectMapper.insert(deviceInspectPlanDelectEntity) > 0; + } + + @Override + public Boolean uploadDeviceInspectPlanDelectEntity(DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity) { + return deviceInspectPlanDelectMapper.updateById(deviceInspectPlanDelectEntity) > 0; + } + + @Override + public Boolean delectDeviceInspectPlanDelectEntity(DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity) { + return deviceInspectPlanDelectMapper.deleteById(deviceInspectPlanDelectEntity) > 0; + } +} diff --git a/src/main/java/com/glxp/api/service/inv/impl/DeviceInspectPlanServiceImpl.java b/src/main/java/com/glxp/api/service/inv/impl/DeviceInspectPlanServiceImpl.java index a54e78390..c543b46a0 100644 --- a/src/main/java/com/glxp/api/service/inv/impl/DeviceInspectPlanServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inv/impl/DeviceInspectPlanServiceImpl.java @@ -2,18 +2,27 @@ package com.glxp.api.service.inv.impl; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.github.pagehelper.PageHelper; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.constant.Constant; import com.glxp.api.dao.inv.DeviceInspectPlanDao; +import com.glxp.api.dao.inv.DeviceInspectPlanDelectMapper; +import com.glxp.api.dao.inv.DeviceInspectTaskDetailMapper; +import com.glxp.api.dao.inv.DeviceInspectTaskMapper; +import com.glxp.api.entity.inv.DeviceInspectPlanDelectEntity; import com.glxp.api.entity.inv.DeviceInspectPlanEntity; +import com.glxp.api.entity.inv.DeviceInspectTaskDetailEntity; +import com.glxp.api.entity.inv.DeviceInspectTaskEntity; import com.glxp.api.req.inv.AddDeviceInspectPlanRequest; import com.glxp.api.req.inv.FilterDeviceInspectPlanRequest; import com.glxp.api.res.inv.DeviceInspectPlanResponse; import com.glxp.api.service.auth.CustomerService; import com.glxp.api.service.inv.DeviceInspectOrderService; import com.glxp.api.service.inv.DeviceInspectPlanService; +import com.glxp.api.service.inv.DeviceInspectTaskDetailService; +import com.glxp.api.service.inv.DeviceInspectTaskService; import com.glxp.api.util.GennerOrderUtils; import com.glxp.api.util.OrderNoTypeBean; import lombok.extern.slf4j.Slf4j; @@ -21,6 +30,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; +import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.List; @@ -38,6 +48,12 @@ public class DeviceInspectPlanServiceImpl implements DeviceInspectPlanService { private GennerOrderUtils gennerOrderUtils; @Resource private DeviceInspectOrderService deviceInspectOrderService; + @Resource + private DeviceInspectTaskService deviceInspectTaskService; + @Resource + private DeviceInspectPlanDelectMapper deviceInspectPlanDelectMapper; + @Resource + private DeviceInspectTaskDetailService deviceInspectTaskDetailService; @Override public List filterList(FilterDeviceInspectPlanRequest filterDeviceInspectPlanRequest) { @@ -52,6 +68,7 @@ public class DeviceInspectPlanServiceImpl implements DeviceInspectPlanService { @Override public BaseResponse addDeviceInspectPlan(AddDeviceInspectPlanRequest deviceInspectPlanRequest) { + DeviceInspectPlanEntity deviceInspectPlanEntity = new DeviceInspectPlanEntity(); BeanUtil.copyProperties(deviceInspectPlanRequest, deviceInspectPlanEntity); deviceInspectPlanEntity.setCreateUser(customerService.getUserIdStr()); @@ -62,7 +79,7 @@ public class DeviceInspectPlanServiceImpl implements DeviceInspectPlanService { deviceInspectPlanEntity.setCreateTime(date); deviceInspectPlanEntity.setUpdateTime(date); deviceInspectPlanDao.insert(deviceInspectPlanEntity); - return ResultVOUtils.success(); + return ResultVOUtils.success(deviceInspectPlanEntity); } @Override @@ -71,7 +88,7 @@ public class DeviceInspectPlanServiceImpl implements DeviceInspectPlanService { BeanUtil.copyProperties(deviceInspectPlanEntity, deviceInspectPlan, "id", "createTime", "createUser"); deviceInspectPlan.setUpdateTime(new Date()); deviceInspectPlanDao.updateById(deviceInspectPlan); - return ResultVOUtils.success(); + return ResultVOUtils.success(deviceInspectPlan); } @Override @@ -87,18 +104,23 @@ public class DeviceInspectPlanServiceImpl implements DeviceInspectPlanService { } @Override - public BaseResponse updateStatus(String orderId, Integer status) { + public BaseResponse updateStatus(String orderId, Integer status, String inspectUser,Date expectedTime) { if (StrUtil.isBlank(orderId) || null == status) { return ResultVOUtils.paramVerifyFail(); } DeviceInspectPlanEntity deviceInspectPlanEntity = deviceInspectPlanDao.selectByOrderId(orderId); deviceInspectPlanEntity.setStatus(status); deviceInspectPlanEntity.setUpdateTime(new Date()); + deviceInspectPlanEntity.setInspectUser(inspectUser); if (status == 2) { - //审核通过,生成维保单 - deviceInspectOrderService.addByPlanOrderId(orderId); deviceInspectPlanEntity.setAuditTime(new Date()); deviceInspectPlanEntity.setAuditUser(customerService.getUserIdStr()); +// //审核通过,生成任务单 +// deviceInspectOrderService.addByPlanOrderId(orderId); +// //生成计划主表 +// DeviceInspectTaskEntity deviceInspectTaskEntity = getDeviceInspectTaskEntity(orderId,expectedTime); +// //生成计划详情主表 +// getDeviceInspectTaskDetailEntity(orderId, deviceInspectTaskEntity.getOrderId()); } deviceInspectPlanDao.updateById(deviceInspectPlanEntity); return ResultVOUtils.success(); @@ -113,4 +135,53 @@ public class DeviceInspectPlanServiceImpl implements DeviceInspectPlanService { return ResultVOUtils.success(); } + //组装任务实体 + public DeviceInspectTaskEntity getDeviceInspectTaskEntity(String orderId,Date expectedTime) { + //查询计划单 + DeviceInspectPlanEntity deviceInspectPlanEntity = deviceInspectPlanDao.selectByOrderId(orderId); + if (deviceInspectPlanEntity == null) { + return null; + } + String takeOrderId = gennerOrderUtils.createStOrderNo(new OrderNoTypeBean(Constant.DEVICE_INSPECT_TAKE_ORDER, "yyyyMMdd")); + DeviceInspectTaskEntity deviceInspectTaskEntity = new DeviceInspectTaskEntity(); + deviceInspectTaskEntity.setOrderId(takeOrderId); + deviceInspectTaskEntity.setPlanOrderIdFk(orderId); + deviceInspectTaskEntity.setExpectedTime(expectedTime); + deviceInspectTaskEntity.setDeptCode(deviceInspectPlanEntity.getDeptCode()); + deviceInspectTaskEntity.setInvCode(deviceInspectPlanEntity.getInvCode()); + deviceInspectTaskEntity.setCode(deviceInspectPlanEntity.getCode()); + deviceInspectTaskEntity.setStatus(0); + deviceInspectTaskEntity.setInspectUser(deviceInspectPlanEntity.getInspectUser()); + deviceInspectTaskEntity.setRemark(deviceInspectPlanEntity.getRemark()); + deviceInspectTaskEntity.setCreateTime(new Date()); + deviceInspectTaskEntity.setUpdateTime(new Date()); + deviceInspectTaskService.addDeviceInspectTask(deviceInspectTaskEntity); + return deviceInspectTaskEntity; + } + + //组装任务实体 + public List getDeviceInspectTaskDetailEntity(String orderId, String taskOrderIdFk) { + //查询计划详情单 + DeviceInspectPlanEntity deviceInspectPlanEntity = deviceInspectPlanDao.selectByOrderId(orderId); + List deviceInspectTaskDetailEntityLis = new ArrayList<>(); + QueryWrapper ew = new QueryWrapper<>(); + ew.eq("orderIdFK", orderId); + List deviceInspectPlanDelectEntityList = deviceInspectPlanDelectMapper.selectList(ew); + if (deviceInspectPlanDelectEntityList == null && deviceInspectPlanDelectEntityList.size() == 0) { + return null; + } + for (DeviceInspectPlanDelectEntity deviceInspectPlanDelectEntity : deviceInspectPlanDelectEntityList) { + DeviceInspectTaskDetailEntity deviceInspectTaskDetailEntity = new DeviceInspectTaskDetailEntity(); + deviceInspectTaskDetailEntity.setProjectCode(deviceInspectPlanEntity.getCode()); + deviceInspectTaskDetailEntity.setProjectContent(deviceInspectPlanDelectEntity.getContent()); + deviceInspectTaskDetailEntity.setStatus(1); + deviceInspectTaskDetailEntity.setInspectUser(deviceInspectPlanEntity.getInspectUser()); + deviceInspectTaskDetailEntity.setUpdateTime(new Date()); + deviceInspectTaskDetailEntity.setTaskOrderIdFk(taskOrderIdFk); + deviceInspectTaskDetailEntityLis.add(deviceInspectTaskDetailEntity); + } + deviceInspectTaskDetailService.addDeviceInspectTaskDelectList(deviceInspectTaskDetailEntityLis); + return deviceInspectTaskDetailEntityLis; + } + } diff --git a/src/main/java/com/glxp/api/service/inv/impl/DeviceRepairOrderServiceImpl.java b/src/main/java/com/glxp/api/service/inv/impl/DeviceRepairOrderServiceImpl.java index 0fe6fde00..84c4b3b51 100644 --- a/src/main/java/com/glxp/api/service/inv/impl/DeviceRepairOrderServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inv/impl/DeviceRepairOrderServiceImpl.java @@ -7,6 +7,7 @@ import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.constant.Constant; import com.glxp.api.dao.inv.DeviceRepairOrderDao; +import com.glxp.api.entity.auth.AuthAdmin; import com.glxp.api.entity.inv.DeviceRepairOrderEntity; import com.glxp.api.req.inv.AddDeviceRepairOrderRequest; import com.glxp.api.req.inv.FilterDeviceRepairOrderRequest; @@ -18,7 +19,6 @@ import com.glxp.api.util.GennerOrderUtils; import com.glxp.api.util.OrderNoTypeBean; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; @@ -62,6 +62,10 @@ public class DeviceRepairOrderServiceImpl implements DeviceRepairOrderService { deviceRepairOrderEntity.setStatus(0); deviceRepairOrderEntity.setCreateTime(date); deviceRepairOrderEntity.setUpdateTime(date); + deviceRepairOrderEntity.setRepairType(addDeviceRepairOrderRequest.getRepairType()); + deviceRepairOrderEntity.setUrgencyType(addDeviceRepairOrderRequest.getUrgencyType()); + deviceRepairOrderEntity.setPlanTime(addDeviceRepairOrderRequest.getPlanTime()); + deviceRepairOrderEntity.setUploadImage(addDeviceRepairOrderRequest.getUploadImage()); deviceRepairOrderDao.insert(deviceRepairOrderEntity); return ResultVOUtils.success(); } @@ -88,20 +92,55 @@ public class DeviceRepairOrderServiceImpl implements DeviceRepairOrderService { } @Override - public BaseResponse updateStatus(String orderId, Integer status) { + public BaseResponse updateStatus(String orderId, Integer status,String repariName) { if (StrUtil.isBlank(orderId) || null == status) { return ResultVOUtils.paramVerifyFail(); } + AuthAdmin authAdmin=customerService.getUserBean(); DeviceRepairOrderEntity deviceRepairOrderEntity = deviceRepairOrderDao.selectByOrderId(orderId); deviceRepairOrderEntity.setStatus(status); Date date = new Date(); - if (status == 2) { - //审核通过,生成维保单 - deviceInspectOrderService.addByRepairOrderId(orderId); - deviceRepairOrderEntity.setAuditUser(customerService.getUserIdStr()); - deviceRepairOrderEntity.setAuditTime(date); - } +// if (status == 2) { +// //审核通过,生成维保单 +// deviceInspectOrderService.addByRepairOrderId(orderId); +// deviceRepairOrderEntity.setAuditUser(customerService.getUserIdStr()); +// deviceRepairOrderEntity.setAuditTime(date); +// } deviceRepairOrderEntity.setUpdateTime(date); + deviceRepairOrderEntity.setAuditTime(date); + deviceRepairOrderEntity.setAuditUser(authAdmin.getId()+""); + if(null != repariName){ + deviceRepairOrderEntity.setRepariName(repariName); + } + deviceRepairOrderDao.updateById(deviceRepairOrderEntity); + return ResultVOUtils.success(); + } + + @Override + public BaseResponse updateStatusAndTime(String orderId, Integer status) { + if (StrUtil.isBlank(orderId) || null == status) { + return ResultVOUtils.paramVerifyFail(); + } + DeviceRepairOrderEntity deviceRepairOrderEntity = deviceRepairOrderDao.selectByOrderId(orderId); + deviceRepairOrderEntity.setStatus(status); + //插入开始时间 + deviceRepairOrderEntity.setRepariStartTime(new Date()); + + deviceRepairOrderDao.updateById(deviceRepairOrderEntity); + return ResultVOUtils.success(); + } + + @Override + public BaseResponse updateStatusAndImg(String orderId, Integer status, String repariImage, String repariRemark) { + if (StrUtil.isBlank(orderId) || null == status) { + return ResultVOUtils.paramVerifyFail(); + } + DeviceRepairOrderEntity deviceRepairOrderEntity = deviceRepairOrderDao.selectByOrderId(orderId); + deviceRepairOrderEntity.setStatus(status); + //插入结束时间 + deviceRepairOrderEntity.setRepariEndTime(new Date()); + deviceRepairOrderEntity.setRepariImage(repariImage); + deviceRepairOrderEntity.setRepariRemark(repariRemark); deviceRepairOrderDao.updateById(deviceRepairOrderEntity); return ResultVOUtils.success(); } diff --git a/src/main/java/com/glxp/api/service/purchase/SupProductService.java b/src/main/java/com/glxp/api/service/purchase/SupProductService.java index d27a20df5..cf93ff97a 100644 --- a/src/main/java/com/glxp/api/service/purchase/SupProductService.java +++ b/src/main/java/com/glxp/api/service/purchase/SupProductService.java @@ -18,7 +18,7 @@ public interface SupProductService extends IService { SupProductEntity findByRelIdFk(String relIdFk); - SupProductEntity findByManufactury(String cpmctymc, String manufactory,String manufacturerIdFk); + SupProductEntity findByManufactury(String cpmctymc, String manufactory, String manufacturerIdFk); SupProductResponse findByPassByReCert(String registerCert); @@ -34,6 +34,8 @@ public interface SupProductService extends IService { boolean insertRegistration(SupProductEntity supProductEntity); + int findProduct(SupProductEntity supProductEntity); + boolean deleteById(@Param("id") String id); boolean deleteByEnterpriseId(@Param("enterpriseId") String enterpriseId); diff --git a/src/main/java/com/glxp/api/service/purchase/impl/SupProductServiceImpl.java b/src/main/java/com/glxp/api/service/purchase/impl/SupProductServiceImpl.java index c1fac32a5..414bfd757 100644 --- a/src/main/java/com/glxp/api/service/purchase/impl/SupProductServiceImpl.java +++ b/src/main/java/com/glxp/api/service/purchase/impl/SupProductServiceImpl.java @@ -143,6 +143,10 @@ public class SupProductServiceImpl extends ServiceImpl 0 ? true : false; } + @Override + public int findProduct(SupProductEntity supProductEntity) { + return supProductDao.findProduct(supProductEntity); + } @Override public boolean deleteById(String id) { return supProductDao.deleteById(id); diff --git a/src/main/java/com/glxp/api/service/thrsys/ThrOrdersDlService.java b/src/main/java/com/glxp/api/service/thrsys/ThrOrdersDlService.java index a9bf3e3b2..466133ebb 100644 --- a/src/main/java/com/glxp/api/service/thrsys/ThrOrdersDlService.java +++ b/src/main/java/com/glxp/api/service/thrsys/ThrOrdersDlService.java @@ -99,7 +99,7 @@ public class ThrOrdersDlService { ThrOrderEntity originEntity = thrOrderService.findByUnique(thrOrderEntity.getBillNo(), thrOrderEntity.getThirdSysFk()); if (originEntity != null) { thrOrderService.deleteById(originEntity.getId() + ""); - thrOrderDetailService.deleteByOrderIdFk(originEntity.getId() + ""); + thrOrderDetailService.deleteByOrderIdFk(originEntity.getBillNo() + ""); } thrOrderService.insertThrOrder(thrOrderEntity); List thrOrderDetailEntities = new ArrayList<>(); @@ -352,61 +352,6 @@ public class ThrOrdersDlService { } return -1; } - - // -// public List> exportThrOrders(FilterThrOrderRequest filterThrOrderRequest) { -// BussinessTypeFilterRequest bussinessTypeFilterRequest = new BussinessTypeFilterRequest(); -// bussinessTypeFilterRequest.setEnabled(true); -// List bussinessTypeEntities = bussinessTypeService.filterList(bussinessTypeFilterRequest); -// BasicThirdSysDetailEntity basicThirdSysDetailEntity = basicThirdSysDetailService.selectByKey("orderQueryUrl", filterThrOrderRequest.getThirdSysFk()); -// int page = 1; -// int limit = 100; -// List erpOrderResponseList = new ArrayList<>(); -// while (true) { -// List datas = getThrOrders(page, limit, basicThirdSysDetailEntity.getValue(), filterThrOrderRequest); -// if (datas != null && datas.size() >= limit) { -// erpOrderResponseList.addAll(datas); -// page++; -// -// } else { -// if (datas != null) { -// erpOrderResponseList.addAll(datas); -// } -// break; -// } -// } -// List> excelData = new ArrayList<>(); -// for (ErpOrderResponse erpOrderResponse : erpOrderResponseList) { -// for (ErpOrderResponse.SubErpOrder subPurchase : erpOrderResponse.getSubErpOrders()) { -// List rows = new ArrayList<>(); -// rows.add(erpOrderResponse.getBillNo()); -// rows.add(erpOrderResponse.getBilldate()); -// BasicUnitMaintainEntity basicUnitMaintainEntity = basicUnitMaintainService.selectByThirdId(erpOrderResponse.getCorpId(), filterThrOrderRequest.getThirdSysFk()); -//// if (basicUnitMaintainEntity != null) -//// rows.add(basicUnitMaintainEntity.getErpId()); -//// else -// rows.add(erpOrderResponse.getCorpId()); -//// rows.add(basicUnitMaintainEntity.getErpId()); -//// rows.add(erpOrderResponse.getCorpId()); -// rows.add(erpOrderResponse.getCorpName()); -// rows.add(getName(bussinessTypeEntities, erpOrderResponse.getBillType())); -//// rows.add(erpOrderResponse.getBillType()); -// rows.add(erpOrderResponse.getBillFlag()); -// rows.add(subPurchase.getProductId()); -// rows.add(subPurchase.getProductName()); -// rows.add(subPurchase.getSpec()); -// rows.add(subPurchase.getBatchNo()); -// rows.add(subPurchase.getProductDate()); -// rows.add(subPurchase.getExpireDate()); -// rows.add(subPurchase.getCount() + ""); -// rows.add(subPurchase.getReCount() + ""); -// rows.add(erpOrderResponse.getOriginType()); -// excelData.add(rows); -// } -// } -// return excelData; -// } -// public List getThrOrders(FilterThrOrderRequest filterThrOrderRequest) { ThrSystemDetailEntity thrSystemDetailEntity = thrSystemDetailService.selectByKey("orderQueryUrl", filterThrOrderRequest.getThirdSysFk()); int page = 1; diff --git a/src/main/java/com/glxp/api/service/thrsys/impl/ThrProductsServiceImpl.java b/src/main/java/com/glxp/api/service/thrsys/impl/ThrProductsServiceImpl.java index 317e91686..9fc482659 100644 --- a/src/main/java/com/glxp/api/service/thrsys/impl/ThrProductsServiceImpl.java +++ b/src/main/java/com/glxp/api/service/thrsys/impl/ThrProductsServiceImpl.java @@ -43,7 +43,6 @@ import java.util.List; */ @Slf4j @Service -@Transactional(rollbackFor = Exception.class) public class ThrProductsServiceImpl extends ServiceImpl implements ThrProductsService { @Resource @@ -224,6 +223,7 @@ public class ThrProductsServiceImpl extends ServiceImpl= limit && !baseResponse.getData().getTotal().equals(-666)) { page++; } else { - break; + if (count == 0) { + page++; + count++; + } else + break; } } else { - return ResultVOUtils.error(500, "下载第三方系统产品信息异常"); + if (count == 0) { + page++; + count++; + } else + return ResultVOUtils.error(500, "下载第三方系统产品信息异常"); } } log.error("下载结束-------"); diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 9463b3440..e043ce625 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -4,7 +4,7 @@ server: spring: datasource: driver-class-name: com.p6spy.engine.spy.P6SpyDriver - jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_zyy?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_pzh?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true username: root password: 123456 hikari: diff --git a/src/main/resources/mybatis/mapper/inout/IoOrderDetailBizDao.xml b/src/main/resources/mybatis/mapper/inout/IoOrderDetailBizDao.xml index fa9523c9e..24abc9a04 100644 --- a/src/main/resources/mybatis/mapper/inout/IoOrderDetailBizDao.xml +++ b/src/main/resources/mybatis/mapper/inout/IoOrderDetailBizDao.xml @@ -117,6 +117,27 @@ AND (expireDate is null or expireDate = '') + limit 1 + + + diff --git a/src/main/resources/mybatis/mapper/inv/DeviceInspectPlanDelectMapper.xml b/src/main/resources/mybatis/mapper/inv/DeviceInspectPlanDelectMapper.xml new file mode 100644 index 000000000..15a6555a6 --- /dev/null +++ b/src/main/resources/mybatis/mapper/inv/DeviceInspectPlanDelectMapper.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/inv/DeviceInspectTaskDetailMapper.xml b/src/main/resources/mybatis/mapper/inv/DeviceInspectTaskDetailMapper.xml index c7e341c5f..6707f009a 100644 --- a/src/main/resources/mybatis/mapper/inv/DeviceInspectTaskDetailMapper.xml +++ b/src/main/resources/mybatis/mapper/inv/DeviceInspectTaskDetailMapper.xml @@ -1,7 +1,7 @@ - + diff --git a/src/main/resources/mybatis/mapper/inv/DeviceInspectTaskMapper.xml b/src/main/resources/mybatis/mapper/inv/DeviceInspectTaskMapper.xml index 200a32b01..0caccb29c 100644 --- a/src/main/resources/mybatis/mapper/inv/DeviceInspectTaskMapper.xml +++ b/src/main/resources/mybatis/mapper/inv/DeviceInspectTaskMapper.xml @@ -1,7 +1,7 @@ - + @@ -21,7 +21,78 @@ - id, orderId, planOrderIdFk, deptCode, invCode, code, `status`, inspectUser, remindTime, + id, orderId, planOrderIdFk, deptCode, invCode, code, `status`, inspectUser, remindTime, remark, strartTime, endTime, createTime, updateTime - \ No newline at end of file + + + + + + + diff --git a/src/main/resources/mybatis/mapper/inv/DeviceProjectSetMapper.xml b/src/main/resources/mybatis/mapper/inv/DeviceProjectSetMapper.xml index bf97420b9..21edfe657 100644 --- a/src/main/resources/mybatis/mapper/inv/DeviceProjectSetMapper.xml +++ b/src/main/resources/mybatis/mapper/inv/DeviceProjectSetMapper.xml @@ -18,4 +18,30 @@ id, code, content, `type`, remak, udpateTime, updateUser, `createUser`, createTime - \ No newline at end of file + + + + + diff --git a/src/main/resources/mybatis/mapper/inv/DeviceRepairOrderDao.xml b/src/main/resources/mybatis/mapper/inv/DeviceRepairOrderDao.xml index a7bb8aa4a..91d30d8d5 100644 --- a/src/main/resources/mybatis/mapper/inv/DeviceRepairOrderDao.xml +++ b/src/main/resources/mybatis/mapper/inv/DeviceRepairOrderDao.xml @@ -13,17 +13,27 @@ t.deptCode, t.invCode, t.code, - t.status, + t.`status`, t.createUser, t.auditUser, t.msg, t.createTime, t.auditTime, t.remark, + t.repairType, + t.urgencyType, + t.planTime, + t.uploadImage, + t.repariStartTime, + t.repariEndTime, + t.repariName, + t.repariImage, + t.repariRemark, (select employeeName from auth_user where id = t.createUser) createUserName, (select employeeName from auth_user where id = t.auditUser) auditUserName, (select `name` from auth_dept where code = t.deptCode) deptName, (select `name` from auth_warehouse where code = t.invCode) invName, + (select employeeName from auth_user where id = t.repariName) repName, t1.deviceName, t1.ggxh, t1.batchNo @@ -39,12 +49,27 @@ AND t.invCode = #{invCode} + + AND t.repariName = #{repariName} + AND t.code like concat('%', #{code}, '%') AND t.status = #{status} + + and t.status in + + #{item} + + + + and t.repairType = #{repairType} + + + and t.urgencyType = #{urgencyType} + diff --git a/src/main/resources/mybatis/mapper/purchase/SupProductDao.xml b/src/main/resources/mybatis/mapper/purchase/SupProductDao.xml index 8fe545e1c..c3cbd0e0b 100644 --- a/src/main/resources/mybatis/mapper/purchase/SupProductDao.xml +++ b/src/main/resources/mybatis/mapper/purchase/SupProductDao.xml @@ -389,4 +389,18 @@ FROM sup_product WHERE enterpriseId = #{enterpriseId} + + + diff --git a/src/main/resources/mybatis/mapper/thrsys/ThrProductsDao.xml b/src/main/resources/mybatis/mapper/thrsys/ThrProductsDao.xml index 2b0e09eac..e35418593 100644 --- a/src/main/resources/mybatis/mapper/thrsys/ThrProductsDao.xml +++ b/src/main/resources/mybatis/mapper/thrsys/ThrProductsDao.xml @@ -3,9 +3,9 @@ @@ -219,7 +219,7 @@ cplb, flbm, qxlb, ybbm, sptm, tyshxydm, zczbhhzbapzbh, ylqxzcrbarmc, ylqxzcrbarywmc, cpms, thirdSysFk, updateTime, supName, model, standard, qtbm, zczyxqz, remark, remark1, remark2, remark3, price, - createUser, createTime, updateUser, manufactoryCode, supCode,type) + createUser, createTime, updateUser, manufactoryCode, supCode, type) values #{item.code}, @@ -252,7 +252,7 @@ #{item.price}, #{item.createUser}, #{item.createTime}, - #{item.updateUser}, #{manufactoryCode}, #{supCode} , #{type} + #{item.updateUser}, #{manufactoryCode}, #{supCode}, #{type} @@ -330,7 +330,7 @@ price = #{price,jdbcType=VARCHAR}, manufactoryCode = #{manufactoryCode,jdbcType=VARCHAR}, supCode = #{supCode,jdbcType=VARCHAR}, - type = #{type,jdbcType=VARCHAR} + type = #{type,jdbcType=VARCHAR} where id = #{id,jdbcType=INTEGER} @@ -338,14 +338,11 @@ - - - diff --git a/src/main/resources/schemas/schema_v2.2.sql b/src/main/resources/schemas/schema_v2.2.sql index 39627cec2..4ffc83b51 100644 --- a/src/main/resources/schemas/schema_v2.2.sql +++ b/src/main/resources/schemas/schema_v2.2.sql @@ -8,7 +8,8 @@ CREATE TABLE IF NOT EXISTS `device_inspect_task` `deptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '部门', `invCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库', `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '资产编码', - `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '状态', + `status` int NULL DEFAULT NULL COMMENT '状态', + `type` int NULL DEFAULT NULL COMMENT '类型', `inspectUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '巡检人', `remindTime` datetime(0) NULL DEFAULT NULL COMMENT '提醒时间', `remark` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '巡检备注', @@ -16,6 +17,7 @@ CREATE TABLE IF NOT EXISTS `device_inspect_task` `endTime` datetime(0) NULL DEFAULT NULL COMMENT '任务结束时间', `createTime` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', `updateTime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + `expectedTime` datetime(0) NULL DEFAULT NULL COMMENT '预期结束时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 @@ -30,7 +32,7 @@ CREATE TABLE IF NOT EXISTS `device_inspect_task_detail` `id` int NOT NULL AUTO_INCREMENT, `projectCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '巡检项目编码', `projectContent` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '巡检内容', - `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '状态(1:未开始;2:已检查;3:异常;4:不巡检', + `status` int NULL DEFAULT NULL COMMENT '状态(1:未开始;2:已检查;3:异常;4:不巡检', `result` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '巡检结果备注', `inspectImage` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '巡检图片', `inspectUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '巡检人', @@ -65,15 +67,15 @@ CREATE TABLE IF NOT EXISTS `device_project_set` SET FOREIGN_KEY_CHECKS = 1; -CALL Pro_Temp_ColumnWork('device_repair_order', 'repairType', 'varchar(255)', 1); +CALL Pro_Temp_ColumnWork('device_repair_order', 'repairType', 'tinyint', 1); CALL Pro_Temp_ColumnWork('device_repair_order', 'urgencyType', 'tinyint', 1); CALL Pro_Temp_ColumnWork('device_repair_order', 'planTime', 'datetime', 1); -CALL Pro_Temp_ColumnWork('device_repair_order', 'uploadImage', 'varchar(255)', 1); +CALL Pro_Temp_ColumnWork('device_repair_order', 'uploadImage', 'text', 1); CALL Pro_Temp_ColumnWork('device_repair_order', 'repariName', 'varchar(255)', 1); -CALL Pro_Temp_ColumnWork('device_repair_order', 'reparistartTime', 'varchar(255)', 1); -CALL Pro_Temp_ColumnWork('device_repair_order', 'repariEndTime', 'varchar(255)', 1); +CALL Pro_Temp_ColumnWork('device_repair_order', 'reparistartTime', 'datetime', 1); +CALL Pro_Temp_ColumnWork('device_repair_order', 'repariEndTime', 'datetime', 1); CALL Pro_Temp_ColumnWork('device_repair_order', 'repariRemark', 'varchar(255)', 1); -CALL Pro_Temp_ColumnWork('device_repair_order', 'repariImage', 'varchar(255)', 1); +CALL Pro_Temp_ColumnWork('device_repair_order', 'repariImage', 'text', 1); CALL Pro_Temp_ColumnWork('device_inspect_plan', 'startTime', 'datetime', 1); CALL Pro_Temp_ColumnWork('device_inspect_plan', 'endTime', 'datetime', 1); @@ -82,4 +84,4 @@ CALL Pro_Temp_ColumnWork('device_inspect_plan', 'frequencyUnit', 'tinyint', 1); CALL Pro_Temp_ColumnWork('device_inspect_plan', 'planStatus', 'tinyint', 1); CALL Pro_Temp_ColumnWork('device_inspect_plan', 'inspectUser', 'varchar(255)', 1); CALL Pro_Temp_ColumnWork('device_inspect_plan', 'lastTime', 'datetime', 1); -CALL Pro_Temp_ColumnWork('device_inspect_plan', 'nextTime', 'datetime', 1); \ No newline at end of file +CALL Pro_Temp_ColumnWork('device_inspect_plan', 'nextTime', 'datetime', 1);