Browse Source

Merge remote-tracking branch 'origin/master'

LLL 1 year ago
parent
commit
9576183e60

+ 4 - 0
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/flowpath/controller/ItdmRunFlowPathController.java

@@ -148,6 +148,7 @@ public class ItdmRunFlowPathController extends JeecgController<ItdmRunFlowPath,
     @DeleteMapping(value = "/delete")
     public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
         itdmRunFlowPathService.removeById(id);
+        itdmRunFlowPathStepService.remove(Wrappers.lambdaQuery(ItdmRunFlowPathStep.class).eq(ItdmRunFlowPathStep::getRunFlowPath, id));
         return Result.OK("删除成功!");
     }
 
@@ -163,6 +164,9 @@ public class ItdmRunFlowPathController extends JeecgController<ItdmRunFlowPath,
     @DeleteMapping(value = "/deleteBatch")
     public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
         this.itdmRunFlowPathService.removeByIds(Arrays.asList(ids.split(",")));
+        itdmRunFlowPathStepService.remove(Wrappers.lambdaQuery(ItdmRunFlowPathStep.class)
+                .in(ItdmRunFlowPathStep::getRunFlowPath, Arrays.asList(ids.split(","))));
+
         return Result.OK("批量删除成功!");
     }
 

+ 1 - 1
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/flowpath/convert/FlowPathConvert.java

@@ -40,7 +40,7 @@ public interface FlowPathConvert {
     @Mapping(target = "dangqian", source = "dangqian")
     @Mapping(target = "itdmWeituoInfo", source = "itdmWeituoInfo")
     @Mapping(target = "sort", source = "step.sort")
-    @Mapping(target = "shenheTime", source = "step.updateTime")
+    @Mapping(target = "shenheTime", source = "step.shenheTime")
 
     ItdmRunFlowPathStepVO to(ItdmRunFlowPathStep step, Boolean isUpdate, Boolean dangqian, ItdmWeituoInfo itdmWeituoInfo);
 

+ 7 - 0
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/flowpath/entity/ItdmRunFlowPathStep.java

@@ -75,6 +75,13 @@ public class ItdmRunFlowPathStep implements Serializable {
 	@Excel(name = "表单数据", width = 15)
     @ApiModelProperty(value = "表单数据")
     private String saveData;
+
+
+    @Excel(name = "审核时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "审核时间")
+    private java.util.Date shenheTime;
 	/**创建人*/
     @ApiModelProperty(value = "创建人")
     private String createBy;

+ 17 - 0
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/flowpath/service/impl/ItdmRunFlowPathStepServiceImpl.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.exception.JeecgBootException;
 import org.jeecg.common.system.vo.LoginUser;
@@ -34,6 +35,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.HashMap;
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
@@ -106,9 +108,15 @@ public class ItdmRunFlowPathStepServiceImpl extends ServiceImpl<ItdmRunFlowPathS
     public void pass(ItdmSaveRunFlowPath saveRunFlowPath) {
 
         ItdmRunFlowPathStep select = this.baseMapper.selectById(saveRunFlowPath.getRunFlowPathStep());
+        if (StringUtils.isBlank(saveRunFlowPath.getSaveData())) {
+
+            throw new JeecgBootException("数据为空");
+
+        }
         select.setSaveData(saveRunFlowPath.getSaveData());
         LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         select.setFqUser(user.getUsername());
+        select.setShenheTime(new Date());
         this.baseMapper.updateById(select);
         ItdmRunFlowPathStep nextstep = this.baseMapper.selectOne(Wrappers.lambdaQuery(ItdmRunFlowPathStep.class)
                 .eq(ItdmRunFlowPathStep::getRunFlowPath, select.getRunFlowPath())
@@ -136,13 +144,22 @@ public class ItdmRunFlowPathStepServiceImpl extends ServiceImpl<ItdmRunFlowPathS
     public void pass1(ItdmPassRunFlowPath itdmRunFlowPathStep) {
 
         ItdmRunFlowPath itdmRunFlowPath = this.itdmRunFlowPathMapper.selectById(itdmRunFlowPathStep.getRunFlowPath());
+
+
         ItdmRunFlowPathStep select = this.baseMapper.selectOne(Wrappers.lambdaQuery(ItdmRunFlowPathStep.class)
                 .eq(ItdmRunFlowPathStep::getRunFlowPath, itdmRunFlowPath.getId())
                 .eq(ItdmRunFlowPathStep::getFlowPathSetp, itdmRunFlowPath.getDqSetp())
 
         );
+        if (StringUtils.isBlank(select.getSaveData())) {
+
+            throw new JeecgBootException("数据为空");
+
+        }
         LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         select.setFqUser(user.getUsername());
+        select.setShenheTime(new Date());
+
         this.baseMapper.updateById(select);
         ItdmRunFlowPathStep nextstep = this.baseMapper.selectOne(Wrappers.lambdaQuery(ItdmRunFlowPathStep.class)
                 .eq(ItdmRunFlowPathStep::getRunFlowPath, select.getRunFlowPath())