Преглед изворни кода

```快速構建流程調整-修復

fangq пре 3 година
родитељ
комит
9e96077927
20 измењених фајлова са 751 додато и 89 уклоњено
  1. 226 71
      src/main/java/org/springblade/bank/autodata/controller/AutoDataController.java
  2. 4 0
      src/main/java/org/springblade/bank/autodata/dto/AutoDataDTO.java
  3. 10 11
      src/main/java/org/springblade/bank/autodata/mapper/AutoDataMapper.xml
  4. 4 0
      src/main/java/org/springblade/bank/autodata/vo/AutoDataVO.java
  5. 129 0
      src/main/java/org/springblade/bank/autosetting/controller/AutoSettingController.java
  6. 34 0
      src/main/java/org/springblade/bank/autosetting/dto/AutoSettingDTO.java
  7. 61 0
      src/main/java/org/springblade/bank/autosetting/entity/AutoSetting.java
  8. 42 0
      src/main/java/org/springblade/bank/autosetting/mapper/AutoSettingMapper.java
  9. 25 0
      src/main/java/org/springblade/bank/autosetting/mapper/AutoSettingMapper.xml
  10. 42 0
      src/main/java/org/springblade/bank/autosetting/service/IAutoSettingService.java
  11. 49 0
      src/main/java/org/springblade/bank/autosetting/service/impl/AutoSettingServiceImpl.java
  12. 36 0
      src/main/java/org/springblade/bank/autosetting/vo/AutoSettingVO.java
  13. 49 0
      src/main/java/org/springblade/bank/autosetting/wrapper/AutoSettingWrapper.java
  14. 3 1
      src/main/java/org/springblade/bank/constant/Approve.java
  15. 6 0
      src/main/java/org/springblade/bank/constant/ApproveSwitch.java
  16. 6 0
      src/main/java/org/springblade/bank/constant/CreateSettingType.java
  17. 6 3
      src/main/java/org/springblade/bank/constant/ProcessStatus.java
  18. 6 3
      src/main/java/org/springblade/bank/returns/controller/ReturnsController.java
  19. 3 0
      src/main/java/org/springblade/bank/userlog/mapper/UserLogMapper.xml
  20. 10 0
      src/main/java/org/springblade/modules/systemexpand/controller/ExpandController.java

+ 226 - 71
src/main/java/org/springblade/bank/autodata/controller/AutoDataController.java

@@ -25,11 +25,14 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import lombok.AllArgsConstructor;
+import org.springblade.bank.autodata.dto.AutoDataDTO;
 import org.springblade.bank.autodata.entity.ApproveBean;
 import org.springblade.bank.autodata.entity.AutoData;
 import org.springblade.bank.autodata.service.IAutoDataService;
 import org.springblade.bank.autodata.vo.AutoDataVO;
 import org.springblade.bank.autodata.wrapper.AutoDataWrapper;
+import org.springblade.bank.autosetting.entity.AutoSetting;
+import org.springblade.bank.autosetting.service.IAutoSettingService;
 import org.springblade.bank.autostruct.entity.AutoStruct;
 import org.springblade.bank.autostruct.service.IAutoStructService;
 import org.springblade.bank.constant.*;
@@ -71,6 +74,7 @@ public class AutoDataController extends BladeController {
 	private final IAutoStructService autoStructService;
 	private final IDeptService deptService;
 	private final IUserService userService;
+	private final IAutoSettingService autoSettingService;
 
 	/**
 	 * 详情
@@ -135,6 +139,7 @@ public class AutoDataController extends BladeController {
 		IPage<AutoDataVO> pages = autoDataService.selectAutoDataPage(Condition.getPage(query), autoData);
 		List<AutoDataVO> records = pages.getRecords();
 		List<AutoDataVO> list = new ArrayList<>();
+		boolean flag = ApproveSwitch.OPEN.equals(autoStruct.getApproveSwitch()) && ApproveType.SERIAL.equals(autoStruct.getApproveType()) && SettingType.GRADUALLY.equals(autoStruct.getSettingType());
 		for (int i = 0; i < records.size(); i++) {
 			AutoDataVO autoDataVO = new AutoDataVO();
 			BeanUtil.copyProperties(records.get(i), autoDataVO);
@@ -142,6 +147,13 @@ public class AutoDataController extends BladeController {
 			if (createUser != null){
 				autoDataVO.setCreateUserName(createUser.getName());
 			}
+			if (flag) {
+				AutoSetting autoSetting = autoSettingService.getUserSettingByBusinessId(autoDataVO.getId());
+				if (autoSetting != null) {
+					autoDataVO.setCreateSettingType(autoSetting.getCreateSettingType());
+					autoDataVO.setCreateSetting(autoSetting.getSetting());
+				}
+			}
 			list.add(autoDataVO);
 		}
 		pages.setRecords(list);
@@ -154,25 +166,58 @@ public class AutoDataController extends BladeController {
 	@PostMapping("/save")
 	@ApiOperationSupport(order = 4)
 	@ApiOperation(value = "新增", notes = "传入autoData")
-	public R save(@Valid @RequestBody AutoData autoData) {
+	public R save(@Valid @RequestBody AutoDataDTO autoData) {
+		autoDataService.save(autoData);
 		autoData.setProcess(Process.FIRST);
 		autoData.setProcessStatus(ProcessStatus.TOBEREVIEWED);
 
 		Long tableId = autoData.getTableId();
 		AutoStruct struct = autoStructService.getById(tableId);
 //		if (struct.getApproveType().equals(1) && struct.getSettingType().equals(1)){
-		if (new Integer(1).equals(struct.getApproveSwitch())){
-			JSONArray jsonArray = JSONUtil.parseArray(struct.getSetting());
+		if (ApproveSwitch.OPEN.equals(struct.getApproveSwitch())){
+			JSONArray jsonArray = JSONUtil.parseArray(StringUtil.isBlank(struct.getSetting()) ? "[]" : struct.getSetting());
 			// 串行 & 统一设置
-			if (new Integer(1).equals(struct.getApproveType()) && new Integer(1).equals(struct.getSettingType())){
-				// 取出下一個審批人
-				Map<String, String > tobePerson = (Map<String, String>) jsonArray.get(0);
-				autoData.setReceiverId(tobePerson.get("id"));
-				autoData.setReceiverName(tobePerson.get("name"));
-				autoData.setReceiverNo(tobePerson.get("ehr"));
+			if (ApproveType.SERIAL.equals(struct.getApproveType())){
+				if ( SettingType.UNIFIED.equals(struct.getSettingType())){
+					// 取出下一個審批人
+					Map<String, String > tobePerson = (Map<String, String>) jsonArray.get(0);
+					autoData.setReceiverId(tobePerson.get("id"));
+					autoData.setReceiverName(tobePerson.get("name"));
+					autoData.setReceiverNo(tobePerson.get("ehr"));
+				}else {
+					// 逐級設置
+					AutoSetting autoSetting = autoSettingService.getUserSettingByBusinessId(autoData.getId());
+					if (autoSetting == null) {
+						autoSetting = new AutoSetting();
+						autoSetting.setTableId(tableId);
+					}
+					autoSetting.setCreateSettingType(autoData.getCreateSettingType());
+					if (CreateSettingType.All.equals(autoData.getCreateSettingType())){
+						autoSetting.setSetting(autoData.getCreateSetting());
+						JSONArray settingArray = JSONUtil.parseArray(autoData.getCreateSetting());
+						Map<String, String> receiverMap = (Map<String, String>) settingArray.get(0);
+						autoData.setReceiverId(receiverMap.get("id"));
+						autoData.setReceiverName(receiverMap.get("name"));
+						autoData.setReceiverNo(receiverMap.get("ehr"));
+					}else{
+						JSONArray settingArray = new JSONArray();
+						Map<String, String > tobePerson = new HashMap<>();
+						tobePerson.put("id", autoData.getReceiverId());
+						tobePerson.put("name", autoData.getReceiverName());
+						tobePerson.put("ehr", autoData.getReceiverNo());
+						settingArray.set(tobePerson);
+						autoSetting.setSetting(settingArray.toJSONString(0));
+
+						autoData.setReceiverId(autoData.getReceiverId());
+						autoData.setReceiverName(autoData.getReceiverName());
+						autoData.setReceiverNo(autoData.getReceiverNo());
+					}
+					autoSetting.setBusinessId(autoData.getId());
+					autoSettingService.saveOrUpdate(autoSetting);
+				}
 			}
 			// 并行
-			if (new Integer(2).equals(struct.getApproveType())){
+			if (ApproveType.PARALLEL.equals(struct.getApproveType())){
 				List<String> idArr = new ArrayList<>();
 				List<String> nameArr = new ArrayList<>();
 				List<String> ehrArr = new ArrayList<>();
@@ -186,9 +231,10 @@ public class AutoDataController extends BladeController {
 				autoData.setReceiverName(StringUtil.join(nameArr, ","));
 				autoData.setReceiverNo(StringUtil.join(ehrArr, ","));
 			}
+			Assert.isTrue(!autoData.getReceiverId().contains(AuthUtil.getUserId()+""), "審批人不能為本人!");
 		}
 
-		return R.status(autoDataService.save(autoData));
+		return R.status(autoDataService.saveOrUpdate(autoData));
 	}
 
 	/**
@@ -197,24 +243,56 @@ public class AutoDataController extends BladeController {
 	@PostMapping("/update")
 	@ApiOperationSupport(order = 5)
 	@ApiOperation(value = "修改", notes = "传入autoData")
-	public R update(@Valid @RequestBody AutoData autoData) {
+	public R update(@Valid @RequestBody AutoDataDTO autoData) {
 		autoData.setProcess(Process.FIRST);
 		autoData.setProcessStatus(ProcessStatus.TOBEREVIEWED);
 
 		Long tableId = autoData.getTableId();
 		AutoStruct struct = autoStructService.getById(tableId);
-		if (new Integer(1).equals(struct.getApproveSwitch())){
-			JSONArray jsonArray = JSONUtil.parseArray(struct.getSetting());
+		if (ApproveSwitch.OPEN.equals(struct.getApproveSwitch())){
+			JSONArray jsonArray = JSONUtil.parseArray(StringUtil.isBlank(struct.getSetting()) ? "[]" : struct.getSetting());
 			// 串行 & 统一设置
-			if (new Integer(1).equals(struct.getApproveType()) && new Integer(1).equals(struct.getSettingType())){
-				// 取出下一個審批人
-				Map<String, String > tobePerson = (Map<String, String>) jsonArray.get(0);
-				autoData.setReceiverId(tobePerson.get("id"));
-				autoData.setReceiverName(tobePerson.get("name"));
-				autoData.setReceiverNo(tobePerson.get("ehr"));
+			if (ApproveType.SERIAL.equals(struct.getApproveType())){
+				if ( SettingType.UNIFIED.equals(struct.getSettingType())){
+					// 取出下一個審批人
+					Map<String, String > tobePerson = (Map<String, String>) jsonArray.get(0);
+					autoData.setReceiverId(tobePerson.get("id"));
+					autoData.setReceiverName(tobePerson.get("name"));
+					autoData.setReceiverNo(tobePerson.get("ehr"));
+				}else {
+					// 逐級設置
+					AutoSetting autoSetting = autoSettingService.getUserSettingByBusinessId(autoData.getId());
+					if (autoSetting == null) {
+						autoSetting = new AutoSetting();
+						autoSetting.setTableId(tableId);
+					}
+					autoSetting.setCreateSettingType(autoData.getCreateSettingType());
+					if (CreateSettingType.All.equals(autoData.getCreateSettingType())){
+						autoSetting.setSetting(autoData.getCreateSetting());
+						JSONArray settingArray = JSONUtil.parseArray(autoData.getCreateSetting());
+						Map<String, String> receiverMap = (Map<String, String>) settingArray.get(0);
+						autoData.setReceiverId(receiverMap.get("id"));
+						autoData.setReceiverName(receiverMap.get("name"));
+						autoData.setReceiverNo(receiverMap.get("ehr"));
+					}else{
+						JSONArray settingArray = new JSONArray();
+						Map<String, String > tobePerson = new HashMap<>();
+						tobePerson.put("id", autoData.getReceiverId());
+						tobePerson.put("name", autoData.getReceiverName());
+						tobePerson.put("ehr", autoData.getReceiverNo());
+						settingArray.set(tobePerson);
+						autoSetting.setSetting(settingArray.toJSONString(0));
+
+						autoData.setReceiverId(autoData.getReceiverId());
+						autoData.setReceiverName(autoData.getReceiverName());
+						autoData.setReceiverNo(autoData.getReceiverNo());
+					}
+					autoSetting.setBusinessId(autoData.getId());
+					autoSettingService.saveOrUpdate(autoSetting);
+				}
 			}
 			// 并行
-			if (new Integer(2).equals(struct.getApproveType())){
+			if (ApproveType.PARALLEL.equals(struct.getApproveType())){
 				List<String> idArr = new ArrayList<>();
 				List<String> nameArr = new ArrayList<>();
 				List<String> ehrArr = new ArrayList<>();
@@ -228,9 +306,9 @@ public class AutoDataController extends BladeController {
 				autoData.setReceiverName(StringUtil.join(nameArr, ","));
 				autoData.setReceiverNo(StringUtil.join(ehrArr, ","));
 			}
+			Assert.isTrue(!autoData.getReceiverId().contains(AuthUtil.getUserId()+""), "審批人不能為本人!");
 		}
 
-
 		return R.status(autoDataService.updateById(autoData));
 	}
 
@@ -248,65 +326,93 @@ public class AutoDataController extends BladeController {
 	/**
 	 * 審批通過
 	 */
-	@PostMapping("/approveYes")
+	@PostMapping("/approveYes/{end}")
 	@ApiOperationSupport(order = 6)
 	@ApiOperation(value = "審批通過", notes = "传入autoData")
-	public R approveYes(@Valid @RequestBody AutoData autoData) {
+	public R approveYes(@Valid @RequestBody AutoDataDTO autoData, @PathVariable("end") Boolean end) {
 		Long tableId = autoData.getTableId();
 		AutoStruct struct = autoStructService.getById(tableId);
 
-
 		// 並行-直接把審批人信息追加到已審批人字段
 		AutoData oldData = autoDataService.getById(autoData.getId());
-		if (struct.getApproveType().equals(ApproveType.PARALLEL)){
-			if (autoData.getApproveHistory() != null){
-				JSONArray jsonArray = JSONUtil.parseArray(autoData.getApproveHistory());
-				JSONArray jsonArray1 = JSONUtil.parseArray(struct.getSetting());
-				if ((jsonArray.size()+1) == jsonArray1.size()){
-					autoData.setProcessStatus(ProcessStatus.PASSED);
-				}else{
-					autoData.setProcessStatus(ProcessStatus.TOBEREVIEWED);
-				}
-			}
-		}else {
-			// 串行-統一設置-從設置中拿出相應位置的人員,填充到下一個審批人字段,process+1
-			String settingStr = struct.getSetting();
-			if (oldData.getProcess() < struct.getNum()){
-				if (struct.getSettingType().equals(SettingType.UNIFIED)){
-					JSONArray jsonArray = JSONUtil.parseArray(settingStr);
-					// 取出下一個審批人
-					Map<String, String > tobePerson = (Map<String, String>) jsonArray.get(oldData.getProcess());
-					autoData.setReceiverId(tobePerson.get("id"));
-					autoData.setReceiverName(tobePerson.get("name"));
-					autoData.setReceiverNo(tobePerson.get("ehr"));
-					jsonArray.toJSONString(0);
-				}else{
-					// 串行-逐級設置-把前端傳過來的審批人,保存到待審批人字段,保存,process+1
-					JSONArray jsonArray;
-					if (settingStr == null){
-						jsonArray = new JSONArray(1);
+		if (end){
+			//逐級設置-清空節點審核人
+			autoData.setProcessStatus(ProcessStatus.PASSED);
+			/*if (struct.getSettingType().equals(SettingType.GRADUALLY)){
+				AutoSetting autosetting = autoSettingService.getUserSettingByBusinessId(autoData.getId());
+				autosetting.setSetting("");
+				autoSettingService.updateById(autosetting);
+			}*/
+		} else {
+			// 並行
+			if (struct.getApproveType().equals(ApproveType.PARALLEL)){
+				if (oldData.getApproveHistory() != null){
+					JSONArray jsonArray = JSONUtil.parseArray(oldData.getApproveHistory());
+					JSONArray jsonArray1 = JSONUtil.parseArray(struct.getSetting());
+					if ((jsonArray.size()+1) == jsonArray1.size()){
+						autoData.setProcessStatus(ProcessStatus.PASSED);
 					}else{
-						jsonArray = JSONUtil.parseArray(settingStr);
+						autoData.setProcessStatus(ProcessStatus.TOBEREVIEWED);
+					}
+				}
+			}else {
+				// 串行-統一設置-從設置中拿出相應位置的人員,填充到下一個審批人字段,process+1
+				String settingStr = struct.getSetting();
+				if (oldData.getProcess() < struct.getNum()){
+					if (struct.getSettingType().equals(SettingType.UNIFIED)){
+						JSONArray jsonArray = JSONUtil.parseArray(settingStr);
+						// 取出下一個審批人
+						Map<String, String > tobePerson = (Map<String, String>) jsonArray.get(oldData.getProcess());
+						autoData.setReceiverId(tobePerson.get("id"));
+						autoData.setReceiverName(tobePerson.get("name"));
+						autoData.setReceiverNo(tobePerson.get("ehr"));
+					}else {
+						// 串行-逐級設置-把前端傳過來的審批人,保存到待審批人字段,保存,process+1
+						AutoSetting autosetting = autoSettingService.getUserSettingByBusinessId(autoData.getId());
+						Assert.notNull(autosetting, "找不到相應設置!");
+						if (autosetting.getCreateSettingType().equals(CreateSettingType.All)){
+							String setting = autosetting.getSetting();
+							JSONArray settingArray = JSONUtil.parseArray(setting);
+							Map<String, String > tobePerson = (Map<String, String>) settingArray.get(oldData.getProcess());
+							autoData.setReceiverId(tobePerson.get("id"));
+							autoData.setReceiverName(tobePerson.get("name"));
+							autoData.setReceiverNo(tobePerson.get("ehr"));
+						}else{
+							Assert.isTrue(!autoData.getReceiverId().contains(AuthUtil.getUserId()+""), "審批人不能為本人!");
+						}
+
+						JSONArray jsonArray;
+						if (StringUtil.isBlank(settingStr)){
+							jsonArray = new JSONArray(1);
+						}else{
+							jsonArray = JSONUtil.parseArray(settingStr);
+						}
+						Map<String, String > tobePerson = new HashMap<>();
+						tobePerson.put("id", autoData.getReceiverId());
+						tobePerson.put("name", autoData.getReceiverName());
+						tobePerson.put("ehr", autoData.getReceiverNo());
+						jsonArray.set(tobePerson);
+						String newSettingStr = jsonArray.toJSONString(0);
+						struct.setSetting(newSettingStr);
+						autoStructService.updateById(struct);
 					}
-					Map<String, String > tobePerson = new HashMap<>();
-					tobePerson.put("id", autoData.getReceiverId());
-					tobePerson.put("name", autoData.getReceiverName());
-					tobePerson.put("ehr", autoData.getReceiverNo());
-					jsonArray.set(tobePerson);
-					String newSettingStr = jsonArray.toJSONString(0);
-					struct.setSetting(newSettingStr);
-					autoStructService.updateById(struct);
 				}
-			}
 
-			autoData.setProcess(oldData.getProcess()+1);
-			if (oldData.getProcess().equals(struct.getNum())){
-				autoData.setProcessStatus(ProcessStatus.PASSED);
-			}else{
-				autoData.setProcessStatus(ProcessStatus.TOBEREVIEWED);
+				autoData.setProcess(oldData.getProcess()+1);
+				if (oldData.getProcess().equals(struct.getNum())){
+					autoData.setProcessStatus(ProcessStatus.PASSED);
+					/*if (struct.getSettingType().equals(SettingType.GRADUALLY)){
+						AutoSetting autosetting = autoSettingService.getUserSettingByBusinessId(autoData.getId());
+						autosetting.setSetting("");
+						autoSettingService.updateById(autosetting);
+					}*/
+				}else{
+					autoData.setProcessStatus(ProcessStatus.TOBEREVIEWED);
+				}
 			}
 		}
 
+
 		//審批記錄
 		User user = userService.getById(AuthUtil.getUserId());
 		if (StringUtil.isBlank(oldData.getApproveId())){
@@ -322,7 +428,7 @@ public class AutoDataController extends BladeController {
 		approveBean.setUserId(user.getId()+"");
 		approveBean.setUserName(user.getName());
 		approveBean.setUserEhr(user.getEhr());
-		approveBean.setApprove(Approve.AGREE);
+		approveBean.setApprove(end ? Approve.AGREE_END : Approve.AGREE);
 		approveBean.setRemark(autoData.getRemark());
 		approveBean.setApproveTime(DateUtil.format(DateUtil.now(), "yyyy-MM-dd HH:mm:ss"));
 
@@ -344,7 +450,7 @@ public class AutoDataController extends BladeController {
 	@PostMapping("/approveReject")
 	@ApiOperationSupport(order = 6)
 	@ApiOperation(value = "審批駁回-退回", notes = "传入autoData")
-	public R approveReject(@Valid @RequestBody AutoData autoData) {
+	public R approveReject(@Valid @RequestBody AutoDataDTO autoData) {
 		AutoData oldData = autoDataService.getById(autoData.getId());
 //		Assert.isTrue(!oldData.getProcess().equals(1), "無法駁回!因為已無路可退!");
 		Long tableId = autoData.getTableId();
@@ -404,14 +510,14 @@ public class AutoDataController extends BladeController {
 	@PostMapping("/approveNo")
 	@ApiOperationSupport(order = 6)
 	@ApiOperation(value = "審批不通过", notes = "传入autoData")
-	public R approveNo(@Valid @RequestBody AutoData autoData) {
+	public R approveNo(@Valid @RequestBody AutoDataDTO autoData) {
 		Long tableId = autoData.getTableId();
 		AutoStruct struct = autoStructService.getById(tableId);
 		User user = userService.getById(AuthUtil.getUserId());
 
 		// 並行-直接把審批人信息追加到已審批人字段
 		AutoData oldData = autoDataService.getById(autoData.getId());
-		if (struct.getApproveType().equals(ApproveType.PARALLEL)) {
+//		if (struct.getApproveType().equals(ApproveType.PARALLEL)) {
 			if (StringUtil.isBlank(oldData.getApproveId())){
 				autoData.setApproveId(user.getId()+"");
 				autoData.setApproveName(user.getName());
@@ -439,7 +545,56 @@ public class AutoDataController extends BladeController {
 			JSONArray history = JSONUtil.parseArray(approveHistory);
 			history.add(approveBean);
 			autoData.setApproveHistory(history.toJSONString(0));
+//		}
+
+		/*if (struct.getApproveType().equals(ApproveType.SERIAL)) {
+			if (struct.getSettingType().equals(SettingType.GRADUALLY)){
+				AutoSetting autosetting = autoSettingService.getUserSettingByBusinessId(autoData.getId());
+				autosetting.setSetting("");
+				autoSettingService.updateById(autosetting);
+			}
+		}*/
+
+		return R.status(autoDataService.saveOrUpdate(autoData));
+	}
+
+	/**
+	 * 直接結束流程
+	 */
+	@PostMapping("/setEnd")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "直接結束流程", notes = "传入id")
+	public R setEnd(@ApiParam(value = "主键集合", required = true) @RequestParam String id) {
+		AutoData autoData = autoDataService.getById(id);
+		//審批記錄
+		User user = userService.getById(AuthUtil.getUserId());
+		ApproveBean approveBean = new ApproveBean();
+		approveBean.setUserId(user.getId()+"");
+		approveBean.setUserName(user.getName());
+		approveBean.setUserEhr(user.getEhr());
+		approveBean.setApprove(Approve.INTERRUPT_END);
+//		approveBean.setRemark("管理員【" + user.getName() + "】"  + Approve.INTERRUPT_END);
+		approveBean.setApproveTime(DateUtil.format(DateUtil.now(), "yyyy-MM-dd HH:mm:ss"));
+
+		String approveHistory = autoData.getApproveHistory();
+		if (approveHistory == null){
+			approveHistory = "[]";
 		}
+		JSONArray history = JSONUtil.parseArray(approveHistory);
+		history.add(approveBean);
+		autoData.setApproveHistory(history.toJSONString(0));
+
+		// 逐級設置-清空節點審核人
+		/*Long tableId = autoData.getTableId();
+		AutoStruct struct = autoStructService.getById(tableId);
+		if (struct.getApproveType().equals(ApproveType.SERIAL)) {
+			if (struct.getSettingType().equals(SettingType.GRADUALLY)){
+				AutoSetting autosetting = autoSettingService.getUserSettingByBusinessId(autoData.getId());
+				autosetting.setSetting("");
+				autoSettingService.updateById(autosetting);
+			}
+		}*/
+		autoData.setProcessStatus(ProcessStatus.CLOSE);
 
 		return R.status(autoDataService.saveOrUpdate(autoData));
 	}

+ 4 - 0
src/main/java/org/springblade/bank/autodata/dto/AutoDataDTO.java

@@ -31,4 +31,8 @@ import lombok.EqualsAndHashCode;
 public class AutoDataDTO extends AutoData {
 	private static final long serialVersionUID = 1L;
 
+	private Integer createSettingType;
+
+	private String createSetting;
+
 }

+ 10 - 11
src/main/java/org/springblade/bank/autodata/mapper/AutoDataMapper.xml

@@ -64,8 +64,7 @@
             <if test="autoData!=null">
                 <if test="autoData.isManageRole != true">and td.create_dept in
                     <foreach item="deptId"
-                             collection="autoData.userDeptList" separator="," open="(" close=")" index="ind
-                         x">
+                             collection="autoData.userDeptList" separator="," open="(" close=")" index="index">
                         #{deptId}
                     </foreach>
                     and
@@ -93,21 +92,21 @@
         ) c
         where 1=1
         <if test="autoData!=null">
+            <if test="autoData.params1!=null">
+                AND c.params1 like '${autoData.params1}%'
+            </if>
+            <if test="autoData.params2!=null">
+                AND c.params2 like '${autoData.params2}%'
+            </if>
+            <if test="autoData.params3!=null">
+                AND c.params3 like '${autoData.params3}%'
+            </if>
             <if test="autoData.params4!=null">
                 AND c.params4 like '${autoData.params4}%'
             </if>
             <if test="autoData.params5!=null">
                 AND c.params5 like '${autoData.params5}%'
             </if>
-            <if test="autoData.params6!=null">
-                AND c.params6 like '${autoData.params6}%'
-            </if>
-            <if test="autoData.params7!=null">
-                AND c.params7 like '${autoData.params7}%'
-            </if>
-            <if test="autoData.params8!=null">
-                AND c.params8 like '${autoData.params8}%'
-            </if>
         </if>
         ORDER BY c.create_time DESC
     </select>

+ 4 - 0
src/main/java/org/springblade/bank/autodata/vo/AutoDataVO.java

@@ -43,5 +43,9 @@ public class AutoDataVO extends AutoData {
 	private String[] userRoleList;
 
 	private Long currentuserId;
+	//逐级设置方式
+	private Integer createSettingType;
+	//逐级设置内容
+	private String createSetting;
 
 }

+ 129 - 0
src/main/java/org/springblade/bank/autosetting/controller/AutoSettingController.java

@@ -0,0 +1,129 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.bank.autosetting.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.bank.autosetting.entity.AutoSetting;
+import org.springblade.bank.autosetting.vo.AutoSettingVO;
+import org.springblade.bank.autosetting.wrapper.AutoSettingWrapper;
+import org.springblade.bank.autosetting.service.IAutoSettingService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ *  控制器
+ *
+ * @author BladeX
+ * @since 2022-06-15
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("bank/autosetting")
+@Api(value = "", tags = "接口")
+public class AutoSettingController extends BladeController {
+
+	private final IAutoSettingService autoSettingService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入autoSetting")
+	public R<AutoSettingVO> detail(AutoSetting autoSetting) {
+		AutoSetting detail = autoSettingService.getOne(Condition.getQueryWrapper(autoSetting));
+		return R.data(AutoSettingWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 分页 
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入autoSetting")
+	public R<IPage<AutoSettingVO>> list(AutoSetting autoSetting, Query query) {
+		IPage<AutoSetting> pages = autoSettingService.page(Condition.getPage(query), Condition.getQueryWrapper(autoSetting));
+		return R.data(AutoSettingWrapper.build().pageVO(pages));
+	}
+
+
+	/**
+	 * 自定义分页 
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入autoSetting")
+	public R<IPage<AutoSettingVO>> page(AutoSettingVO autoSetting, Query query) {
+		IPage<AutoSettingVO> pages = autoSettingService.selectAutoSettingPage(Condition.getPage(query), autoSetting);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入autoSetting")
+	public R save(@Valid @RequestBody AutoSetting autoSetting) {
+		return R.status(autoSettingService.save(autoSetting));
+	}
+
+	/**
+	 * 修改 
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入autoSetting")
+	public R update(@Valid @RequestBody AutoSetting autoSetting) {
+		return R.status(autoSettingService.updateById(autoSetting));
+	}
+
+	/**
+	 * 新增或修改 
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入autoSetting")
+	public R submit(@Valid @RequestBody AutoSetting autoSetting) {
+		return R.status(autoSettingService.saveOrUpdate(autoSetting));
+	}
+
+	
+	/**
+	 * 删除 
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(autoSettingService.deleteLogic(Func.toLongList(ids)));
+	}
+
+	
+}

+ 34 - 0
src/main/java/org/springblade/bank/autosetting/dto/AutoSettingDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.bank.autosetting.dto;
+
+import org.springblade.bank.autosetting.entity.AutoSetting;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-06-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class AutoSettingDTO extends AutoSetting {
+	private static final long serialVersionUID = 1L;
+
+}

+ 61 - 0
src/main/java/org/springblade/bank/autosetting/entity/AutoSetting.java

@@ -0,0 +1,61 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.bank.autosetting.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import org.springblade.core.mp.base.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2022-06-15
+ */
+@Data
+@TableName("zh_auto_setting")
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "AutoSetting对象", description = "AutoSetting对象")
+public class AutoSetting extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 业务id
+	*/
+		@ApiModelProperty(value = "业务id")
+		private Long businessId;
+	/**
+	* 表id
+	*/
+		@ApiModelProperty(value = "表id")
+		private Long tableId;
+	/**
+	* 1:發起人統一指定;2:逐级指定
+	*/
+		@ApiModelProperty(value = "1:發起人統一指定;2:逐级指定")
+		private Integer createSettingType;
+	/**
+	* 审批设置
+	*/
+		@ApiModelProperty(value = "审批设置")
+		private String setting;
+
+}

+ 42 - 0
src/main/java/org/springblade/bank/autosetting/mapper/AutoSettingMapper.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.bank.autosetting.mapper;
+
+import org.springblade.bank.autosetting.entity.AutoSetting;
+import org.springblade.bank.autosetting.vo.AutoSettingVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-06-15
+ */
+public interface AutoSettingMapper extends BaseMapper<AutoSetting> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param autoSetting
+	 * @return
+	 */
+	List<AutoSettingVO> selectAutoSettingPage(IPage page, AutoSettingVO autoSetting);
+
+}

+ 25 - 0
src/main/java/org/springblade/bank/autosetting/mapper/AutoSettingMapper.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.bank.autosetting.mapper.AutoSettingMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="autoSettingResultMap" type="org.springblade.bank.autosetting.entity.AutoSetting">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="business_id" property="businessId"/>
+        <result column="table_id" property="tableId"/>
+        <result column="create_setting_type" property="createSettingType"/>
+        <result column="setting" property="setting"/>
+    </resultMap>
+
+    <select id="selectAutoSettingPage" resultMap="autoSettingResultMap">
+        select * from zh_auto_setting where is_deleted = 0
+    </select>
+
+</mapper>

+ 42 - 0
src/main/java/org/springblade/bank/autosetting/service/IAutoSettingService.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.bank.autosetting.service;
+
+import org.springblade.bank.autosetting.entity.AutoSetting;
+import org.springblade.bank.autosetting.vo.AutoSettingVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2022-06-15
+ */
+public interface IAutoSettingService extends BaseService<AutoSetting> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param autoSetting
+	 * @return
+	 */
+	IPage<AutoSettingVO> selectAutoSettingPage(IPage<AutoSettingVO> page, AutoSettingVO autoSetting);
+
+    AutoSetting getUserSettingByBusinessId(Long businessId);
+}

+ 49 - 0
src/main/java/org/springblade/bank/autosetting/service/impl/AutoSettingServiceImpl.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.bank.autosetting.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import org.springblade.bank.autosetting.entity.AutoSetting;
+import org.springblade.bank.autosetting.vo.AutoSettingVO;
+import org.springblade.bank.autosetting.mapper.AutoSettingMapper;
+import org.springblade.bank.autosetting.service.IAutoSettingService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务实现类
+ *
+ * @author BladeX
+ * @since 2022-06-15
+ */
+@Service
+public class AutoSettingServiceImpl extends BaseServiceImpl<AutoSettingMapper, AutoSetting> implements IAutoSettingService {
+
+	@Override
+	public IPage<AutoSettingVO> selectAutoSettingPage(IPage<AutoSettingVO> page, AutoSettingVO autoSetting) {
+		return page.setRecords(baseMapper.selectAutoSettingPage(page, autoSetting));
+	}
+
+	@Override
+	public AutoSetting getUserSettingByBusinessId(Long businessId) {
+		return baseMapper.selectOne( new QueryWrapper<>(new AutoSetting()).lambda().eq(AutoSetting::getBusinessId, businessId));
+	}
+
+}

+ 36 - 0
src/main/java/org/springblade/bank/autosetting/vo/AutoSettingVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.bank.autosetting.vo;
+
+import org.springblade.bank.autosetting.entity.AutoSetting;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2022-06-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "AutoSettingVO对象", description = "AutoSettingVO对象")
+public class AutoSettingVO extends AutoSetting {
+	private static final long serialVersionUID = 1L;
+
+}

+ 49 - 0
src/main/java/org/springblade/bank/autosetting/wrapper/AutoSettingWrapper.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.bank.autosetting.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.bank.autosetting.entity.AutoSetting;
+import org.springblade.bank.autosetting.vo.AutoSettingVO;
+import java.util.Objects;
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2022-06-15
+ */
+public class AutoSettingWrapper extends BaseEntityWrapper<AutoSetting, AutoSettingVO>  {
+
+	public static AutoSettingWrapper build() {
+		return new AutoSettingWrapper();
+ 	}
+
+	@Override
+	public AutoSettingVO entityVO(AutoSetting autoSetting) {
+		AutoSettingVO autoSettingVO = Objects.requireNonNull(BeanUtil.copy(autoSetting, AutoSettingVO.class));
+
+		//User createUser = UserCache.getUser(autoSetting.getCreateUser());
+		//User updateUser = UserCache.getUser(autoSetting.getUpdateUser());
+		//autoSettingVO.setCreateUserName(createUser.getName());
+		//autoSettingVO.setUpdateUserName(updateUser.getName());
+
+		return autoSettingVO;
+	}
+
+}

+ 3 - 1
src/main/java/org/springblade/bank/constant/Approve.java

@@ -2,6 +2,8 @@ package org.springblade.bank.constant;
 
 public interface Approve {
 	String AGREE = "通過";//通過
-	String DISAGREE = "不通過";//不通過
+	String AGREE_END = "通過並結束流程";//通過
+	String DISAGREE = "不通過並結束流程";//不通過
 	String REJECT = "退回";//退回
+	String INTERRUPT_END = "中斷結束流程";//中斷結束流程
 }

+ 6 - 0
src/main/java/org/springblade/bank/constant/ApproveSwitch.java

@@ -0,0 +1,6 @@
+package org.springblade.bank.constant;
+
+public interface ApproveSwitch {
+	Integer CLOSE = 0;//流程審批開關-關閉
+	Integer OPEN = 1;//流程審批開關-打開
+}

+ 6 - 0
src/main/java/org/springblade/bank/constant/CreateSettingType.java

@@ -0,0 +1,6 @@
+package org.springblade.bank.constant;
+
+public interface CreateSettingType {
+	Integer All = 1;//指定所有人
+	Integer ONE = 2;//逐級設置,指定一個
+}

+ 6 - 3
src/main/java/org/springblade/bank/constant/ProcessStatus.java

@@ -1,11 +1,14 @@
 package org.springblade.bank.constant;
 
 public interface ProcessStatus {
-	String FAIL = "不通過";
+	String FAIL = "不同意";
 
-	String PASSED = "已通過";
+	String PASSED = "已完成";
 
-	String TOBEREVIEWED = "待審";
+	String TOBEREVIEWED = "待審";
 
 	String REJECTED = "已退回";
+
+	String CLOSE = "已關閉";
+
 }

+ 6 - 3
src/main/java/org/springblade/bank/returns/controller/ReturnsController.java

@@ -119,7 +119,7 @@ public class ReturnsController extends BladeController {
 //		deptChildIds.add(deptId);
 		Dept dept = deptService.getById(deptId);
 		Dept parentDept = deptService.getById(dept.getParentId());
-		if (parentDept.getOrgNo().startsWith("999")){
+		if (parentDept != null && parentDept.getOrgNo().startsWith("999")){
 			deptChildIds.add(parentDept.getId());
 		}
 		returns.setDeptIdList(deptChildIds);
@@ -277,6 +277,9 @@ public class ReturnsController extends BladeController {
 	@ApiOperation(value = "", notes = "")
 	public R returnsSubmit(@Valid @RequestBody Returns returns) {
 
+		Dept subDept = deptService.getOne(new QueryWrapper<>(new Dept()).lambda().eq(Dept::getOrgNo, returns.getSubOrgNo()));
+		Assert.notNull(subDept, "找不到該機構號【" + returns.getSubOrgNo() + "】對應的機構!");
+
 		String roleId = AuthUtil.getUser().getRoleId();
 		List<User> usersByDeptIdsRoleIds = userService.getUsersByDeptIdsRoleIds(null, Func.toStrList(roleId));
 		List<User> userList = new ArrayList<>();
@@ -398,7 +401,7 @@ public class ReturnsController extends BladeController {
 		Assert.notNull(dept, "找不到該機構號【" + returns.getSubOrgNo() + "】對應的機構!");
 		returns.setCreateDept(dept.getId());
 
-		returns.setProcess(4);
+		/*returns.setProcess(4);
 		returns.setIsCompleted(1);
 		returns.setBankConfirmName(user.getName());
 		returns.setBankConfirmNo(user.getEhr());
@@ -420,7 +423,7 @@ public class ReturnsController extends BladeController {
 			userLog.setPersonName(user.getName());
 			userLog.setOperationType("approve");
 			userLogService.save(userLog);
-		}
+		}*/
 		return R.status(true);
 	}
 

+ 3 - 0
src/main/java/org/springblade/bank/userlog/mapper/UserLogMapper.xml

@@ -27,6 +27,9 @@
     <select id="selectUserLogPage" resultMap="userLogResultMap">
         select * from zh_user_log where is_deleted = 0
         <if test="userLog!=null">
+            <if test="userLog.orgName!=null">
+                AND org_name = '${userLog.orgName}'
+            </if>
             <if test="userLog.orgNo!=null">
                 AND org_no = '${userLog.orgNo}'
             </if>

+ 10 - 0
src/main/java/org/springblade/modules/systemexpand/controller/ExpandController.java

@@ -100,6 +100,16 @@ public class ExpandController extends BladeController {
 		list.addAll(deptChild);
 		return R.data(list);
 	}
+	/**
+	 * 详情
+	 */
+	@GetMapping("/dept/getAllDept")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "详情", notes = "传入dept")
+	public R getAllDept() {
+		List<Dept> list = deptService.getDeptChild(0L);
+		return R.data(list);
+	}
 
 	/**
 	 * 获取当前用户的部门信息