|
@@ -15,6 +15,7 @@ import com.jeeplus.test.garbageClearance.domain.LookOver;
|
|
|
import com.jeeplus.test.garbageClearance.service.DTO.LookOverDTO;
|
|
|
import com.jeeplus.test.garbageClearance.service.LookOverService;
|
|
|
import com.jeeplus.test.garbageClearance.utils.SnowFlake;
|
|
|
+import com.jeeplus.test.oss.domain.WorkAttachment;
|
|
|
import com.jeeplus.test.oss.domain.WorkAttachmentInfo;
|
|
|
import com.jeeplus.test.oss.service.OssService;
|
|
|
import com.jeeplus.test.wdt.disposeRubbish.domain.DisposeRubbish;
|
|
@@ -68,6 +69,20 @@ public class DisposeRubbishController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 查询巡视工单
|
|
|
+ *
|
|
|
+ * @param id
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("getByProcInsId")
|
|
|
+ public ResponseEntity getByProcInsId(String procInsId) {
|
|
|
+ // 还需要处理单位 清运专员 联系方式 及 附件信息
|
|
|
+ DisposeRubbish post = disposeRubbishService.getByProcInsId ( procInsId );
|
|
|
+
|
|
|
+ return ResponseEntity.ok ( post );
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 保存巡视信息
|
|
|
*/
|
|
|
@ApiLog("保存巡视信息")
|
|
@@ -75,9 +90,6 @@ public class DisposeRubbishController {
|
|
|
@PostMapping("save")
|
|
|
public ResponseEntity <String> save(@Valid @RequestBody DisposeRubbish disposeRubbish) {
|
|
|
//新增或编辑表单保存
|
|
|
- String lookOverId = SnowFlake.getId();
|
|
|
- disposeRubbish.setId(lookOverId);
|
|
|
-
|
|
|
if (StringUtils.isNotBlank(disposeRubbish.getNo())) {
|
|
|
// 剔除掉XJ-J 只保留纯数字
|
|
|
// 使用正则表达式替换掉所有非数字字符
|
|
@@ -88,10 +100,28 @@ public class DisposeRubbishController {
|
|
|
String programIds = String.join(",", disposeRubbish.getProgramId());
|
|
|
disposeRubbish.setProgramId(programIds);
|
|
|
}
|
|
|
- disposeRubbish.setStatus("2");
|
|
|
+
|
|
|
|
|
|
disposeRubbishService.saveOrUpdate (disposeRubbish);
|
|
|
|
|
|
+
|
|
|
+ //对过磅数据进行处理
|
|
|
+ if (null != disposeRubbish.getFileList4() && disposeRubbish.getFileList4().size() > 0 ) {
|
|
|
+ UserDTO userDTO = UserUtils.getCurrentUserDTO();
|
|
|
+ // 进行附件保存操作,保存到work_attachment 表中
|
|
|
+ for (WorkAttachment attachment : disposeRubbish.getFileList4()) {
|
|
|
+ // 生成id
|
|
|
+ String detailId = SnowFlake.getId();
|
|
|
+ attachment.setId(detailId);
|
|
|
+ attachment.setAttachmentId(disposeRubbish.getId());
|
|
|
+ attachment.setCreateTime(new Date());
|
|
|
+ attachment.setUpdateTime(new Date());
|
|
|
+ attachment.setDelFlag(0);
|
|
|
+ attachment.setAttachmentFlag("weigh");
|
|
|
+ ossService.insertWorkAttachment(attachment,userDTO);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
for (String workOverId : disposeRubbish.getProgramIds()) {
|
|
|
LookOver lookOver = overService.getById(workOverId);
|
|
|
//处理巡查单的状态信息,将巡查单的status调整为处理中
|