提交 f6919036 authored 作者: 133's avatar 133

Merge branch 'master' of git.yfzx.zjtys.com.cn:matrix/device-back into bug

...@@ -214,13 +214,15 @@ public class AllotBillController { ...@@ -214,13 +214,15 @@ public class AllotBillController {
//直接发起 //直接发起
if (allotBillSaveVo.getTaskId() == null) { if (allotBillSaveVo.getTaskId() == null) {
// TaskBto taskBto = new TaskBto(StatusEnum.ALLOTING.id, allotBillSaveVo.getSendUnit() + "配发型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件至" + allotBillSaveVo.getReceiveUnit(), null, ".", billId, 3, userPublicService.findUnitIdByName(allotBillSaveVo.getReceiveUnit()), 1, null, userIds); // TaskBto taskBto = new TaskBto(StatusEnum.ALLOTING.id, allotBillSaveVo.getSendUnit() + "配发型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件至" + allotBillSaveVo.getReceiveUnit(), null, ".", billId, 3, userPublicService.findUnitIdByName(allotBillSaveVo.getReceiveUnit()), 1, null, userIds);
TaskBto taskBto = new TaskBto(StatusEnum.ALLOTING.id, "["+allotBillSaveVo.getReceiveUnit().substring(0,3)+"]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件" , null, ".", billId, 3, userPublicService.findUnitIdByName(allotBillSaveVo.getReceiveUnit()), 1, null, userIds); // TaskBto taskBto = new TaskBto(StatusEnum.ALLOTING.id, "["+allotBillSaveVo.getReceiveUnit().substring(0,3)+"]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件" , null, ".", billId, 3, userPublicService.findUnitIdByName(allotBillSaveVo.getReceiveUnit()), 1, null, userIds);
TaskBto taskBto = new TaskBto(StatusEnum.ALLOTING.id, "["+DeviceModelSort.unitNameToDisName(allotBillSaveVo.getReceiveUnit())+"]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件" , null, ".", billId, 3, userPublicService.findUnitIdByName(allotBillSaveVo.getReceiveUnit()), 1, null, userIds);
saveEntity = taskService.start(taskBto); saveEntity = taskService.start(taskBto);
} }
//从草稿发起 //从草稿发起
else { else {
TaskBto taskBto = taskService.get(allotBillSaveVo.getTaskId()); TaskBto taskBto = taskService.get(allotBillSaveVo.getTaskId());
taskBto.setTitle("["+allotBillSaveVo.getReceiveUnit().substring(0,3) + "]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件"); // taskBto.setTitle("["+allotBillSaveVo.getReceiveUnit().substring(0,3) + "]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件");
taskBto.setTitle("["+DeviceModelSort.unitNameToDisName(allotBillSaveVo.getReceiveUnit()) + "]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件");
//添加当前操作人为涉及人员 //添加当前操作人为涉及人员
TaskBto taskBto1 = taskService.addInvolveUser(taskBto, userId); TaskBto taskBto1 = taskService.addInvolveUser(taskBto, userId);
//任务所属单位改为收件单位 //任务所属单位改为收件单位
...@@ -229,20 +231,23 @@ public class AllotBillController { ...@@ -229,20 +231,23 @@ public class AllotBillController {
saveEntity = taskService.moveToSpecial(taskBto1, StatusEnum.ALLOTING, 0); saveEntity = taskService.moveToSpecial(taskBto1, StatusEnum.ALLOTING, 0);
} }
//生成发件方上传配发单的子任务 //生成发件方上传配发单的子任务
TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_ALLOT_FILE.id, "["+allotBillSaveVo.getReceiveUnit().substring(0,3) + "]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件", saveEntity.getId(), saveEntity.getNodeIdDetail() + saveEntity.getId() + ".", saveEntity.getBillId(), 3, userPublicService.findUnitIdByName(allotBillEntity.getSendUnit()), 0, null, Collections.singletonList(0)); // TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_ALLOT_FILE.id, "["+allotBillSaveVo.getReceiveUnit().substring(0,3) + "]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件", saveEntity.getId(), saveEntity.getNodeIdDetail() + saveEntity.getId() + ".", saveEntity.getBillId(), 3, userPublicService.findUnitIdByName(allotBillEntity.getSendUnit()), 0, null, Collections.singletonList(0));
TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_ALLOT_FILE.id, "["+DeviceModelSort.unitNameToDisName(allotBillSaveVo.getReceiveUnit()) + "]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件", saveEntity.getId(), saveEntity.getNodeIdDetail() + saveEntity.getId() + ".", saveEntity.getBillId(), 3, userPublicService.findUnitIdByName(allotBillEntity.getSendUnit()), 0, null, Collections.singletonList(0));
taskService.start(taskBto2); taskService.start(taskBto2);
} }
//横向配发 //横向配发
else { else {
//直接发起 //直接发起
if (allotBillSaveVo.getTaskId() == null) { if (allotBillSaveVo.getTaskId() == null) {
TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_CROSS_FILE.id, "["+allotBillSaveVo.getReceiveUnit().substring(0,3) + "]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件", null, ".", billId, 3, userPublicService.findUnitIdByName(allotBillEntity.getSendUnit()), 1, "country", userIds); // TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_CROSS_FILE.id, "["+allotBillSaveVo.getReceiveUnit().substring(0,3) + "]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件", null, ".", billId, 3, userPublicService.findUnitIdByName(allotBillEntity.getSendUnit()), 1, "country", userIds);
TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_CROSS_FILE.id, "["+DeviceModelSort.unitNameToDisName(allotBillSaveVo.getReceiveUnit())+ "]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件", null, ".", billId, 3, userPublicService.findUnitIdByName(allotBillEntity.getSendUnit()), 1, "country", userIds);
saveEntity = taskService.start(taskBto2); saveEntity = taskService.start(taskBto2);
} }
//从草稿发起 //从草稿发起
else { else {
TaskBto taskBto = taskService.get(allotBillSaveVo.getTaskId()); TaskBto taskBto = taskService.get(allotBillSaveVo.getTaskId());
taskBto.setTitle("["+allotBillSaveVo.getReceiveUnit().substring(0,3) + "]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件"); // taskBto.setTitle("["+allotBillSaveVo.getReceiveUnit().substring(0,3) + "]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件");
taskBto.setTitle("["+DeviceModelSort.unitNameToDisName(allotBillSaveVo.getReceiveUnit()) + "]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件");
taskBto.setCustomInfo("country"); taskBto.setCustomInfo("country");
//添加当前操作人为涉及人员 //添加当前操作人为涉及人员
TaskBto taskBto1 = taskService.addInvolveUser(taskBto, userId); TaskBto taskBto1 = taskService.addInvolveUser(taskBto, userId);
...@@ -495,7 +500,8 @@ public class AllotBillController { ...@@ -495,7 +500,8 @@ public class AllotBillController {
allotBill1.setSendUseraId(userId); allotBill1.setSendUseraId(userId);
AllotBill allotBill = allotBillService.addEntity(allotBill1); AllotBill allotBill = allotBillService.addEntity(allotBill1);
//发起草稿任务 //发起草稿任务
TaskBto taskBto = new TaskBto(StatusEnum.ALLOT_DRAFT.id, "["+allotBillSaveVo.getReceiveUnit().substring(0,3)+ "]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件", null, ".", allotBill.getId(), 3, userUtils.getCurrentUnitId(), 0, null, userIds); // TaskBto taskBto = new TaskBto(StatusEnum.ALLOT_DRAFT.id, "["+allotBillSaveVo.getReceiveUnit().substring(0,3)+ "]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件", null, ".", allotBill.getId(), 3, userUtils.getCurrentUnitId(), 0, null, userIds);
TaskBto taskBto = new TaskBto(StatusEnum.ALLOT_DRAFT.id, "["+DeviceModelSort.unitNameToDisName(allotBillSaveVo.getReceiveUnit())+ "]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件", null, ".", allotBill.getId(), 3, userUtils.getCurrentUnitId(), 0, null, userIds);
TaskBto taskBto1 = taskService.start(taskBto); TaskBto taskBto1 = taskService.start(taskBto);
//返回保存成功的id //返回保存成功的id
Integer id = taskBto1.getId(); Integer id = taskBto1.getId();
......
...@@ -51,14 +51,20 @@ public class AllotBillSaveVo { ...@@ -51,14 +51,20 @@ public class AllotBillSaveVo {
@ApiModelProperty(value = "发件方(B岗位)") @ApiModelProperty(value = "发件方(B岗位)")
private Integer sendUserbId; private Integer sendUserbId;
@ApiModelProperty(value = "发件经办人id(A岗位)")
private Integer sendUseraId;
// @ApiModelProperty(value = "签章审核方") // @ApiModelProperty(value = "签章审核方")
// private Integer confirmUserId; // private Integer confirmUserId;
// @NotNull(message = "receiveUseraId不能为空") // @NotNull(message = "receiveUseraId不能为空")
@Min(value = 1,message = "receiveUseraId不能小于1") // @Min(value = 1,message = "receiveUseraId不能小于1")
@ApiModelProperty(value = "收件方(A岗位)") @ApiModelProperty(value = "收件方(A岗位)")
private Integer receiveUseraId; private Integer receiveUseraId;
@ApiModelProperty(value = "收件方审核人id(B岗位)")
private Integer receiveUserbId;
// @NotNull(message = "fileName不能为空") // @NotNull(message = "fileName不能为空")
@ApiModelProperty(value = "账单文件名") @ApiModelProperty(value = "账单文件名")
private String fileName; private String fileName;
......
...@@ -15,10 +15,11 @@ ...@@ -15,10 +15,11 @@
</parent> </parent>
<dependencies> <dependencies>
<!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId> <artifactId>fastjson</artifactId>
<version>1.2.70</version> <version>1.2.78</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.amazonaws</groupId> <groupId>com.amazonaws</groupId>
......
...@@ -52,10 +52,11 @@ ...@@ -52,10 +52,11 @@
<!-- <version>0.0.4</version>--> <!-- <version>0.0.4</version>-->
<!-- </dependency>--> <!-- </dependency>-->
<!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId> <artifactId>fastjson</artifactId>
<version>1.2.46</version> <version>1.2.78</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.junit.jupiter</groupId> <groupId>org.junit.jupiter</groupId>
......
...@@ -328,6 +328,7 @@ public enum LogType { ...@@ -328,6 +328,7 @@ public enum LogType {
REPAIR_SEND_19(129,REPAIR.id, REPAIR_SEND_WAIT_SIGN.id, END.id, "上传相关单据,业务办结"), REPAIR_SEND_19(129,REPAIR.id, REPAIR_SEND_WAIT_SIGN.id, END.id, "上传相关单据,业务办结"),
REPAIR_SEND_20(130,REPAIR.id, REPAIR_SEND_WAIT_SIGN.id, WAIT_UPLOAD_FILE.id, "盖电子签章并入库"), REPAIR_SEND_20(130,REPAIR.id, REPAIR_SEND_WAIT_SIGN.id, WAIT_UPLOAD_FILE.id, "盖电子签章并入库"),
REPAIR_SEND_21(131,REPAIR.id, REPAIR_SEND_SIGN_WAIT_CONFIRM.id, WAIT_RECEIVE.id, "拒绝电子签章申请"), REPAIR_SEND_21(131,REPAIR.id, REPAIR_SEND_SIGN_WAIT_CONFIRM.id, WAIT_RECEIVE.id, "拒绝电子签章申请"),
// REPAIR_SEND_22(131,REPAIR.id, REPAIR_SEND_SIGN_WAIT_CONFIRM.id, WAIT_RECEIVE.id, "拒绝电子签章申请"),
REPAIR_BACK_14(132, REPAIR.id, ORIGIN_STATUS.id, REPAIR_BACK_SIGN_WAIT_CONFIRM.id, "申请电子签章"), REPAIR_BACK_14(132, REPAIR.id, ORIGIN_STATUS.id, REPAIR_BACK_SIGN_WAIT_CONFIRM.id, "申请电子签章"),
REPAIR_BACK_16(134,REPAIR.id, REPAIR_BACK_SIGN_WAIT_CONFIRM.id, REPAIR_BACK_DRAFT.id, "拒绝电子签章申请"), REPAIR_BACK_16(134,REPAIR.id, REPAIR_BACK_SIGN_WAIT_CONFIRM.id, REPAIR_BACK_DRAFT.id, "拒绝电子签章申请"),
...@@ -337,7 +338,6 @@ public enum LogType { ...@@ -337,7 +338,6 @@ public enum LogType {
REPAIR_BACK_19(137,REPAIR.id, REPAIR_BACK_WAIT_SIGN.id, END.id, "盖电子签章并出库"), REPAIR_BACK_19(137,REPAIR.id, REPAIR_BACK_WAIT_SIGN.id, END.id, "盖电子签章并出库"),
// REPAIR_BACK_20(138,REPAIR.id, REPAIR_BACK_WAIT_SIGN.id, WAIT_UPLOAD_BACK_FILE.id, "盖电子签章并入库"), // REPAIR_BACK_20(138,REPAIR.id, REPAIR_BACK_WAIT_SIGN.id, WAIT_UPLOAD_BACK_FILE.id, "盖电子签章并入库"),
REPAIR_BACK_20(138,REPAIR.id, REPAIR_BACK_WAIT_SIGN.id, WAIT_UPLOAD_BACK_FILE.id, "上传签收单"), REPAIR_BACK_20(138,REPAIR.id, REPAIR_BACK_WAIT_SIGN.id, WAIT_UPLOAD_BACK_FILE.id, "上传签收单"),
REPAIR_BACK_21(139,REPAIR.id, REPAIR_BACK_SIGN_WAIT_CONFIRM.id, WAIT_BACK_RECEIVE.id, "拒绝电子签章申请"),
APPLY_7(140,APPLY.id, WAIT_APPLY_FILE.id, END.id, "申请不同意,业务办结"), APPLY_7(140,APPLY.id, WAIT_APPLY_FILE.id, END.id, "申请不同意,业务办结"),
// ALLOT_BACK_16(141,ALLOT_BACK.id, BACK_DRAFT.id, ALLOT_BACKING.id, "从草稿发起退回"), // ALLOT_BACK_16(141,ALLOT_BACK.id, BACK_DRAFT.id, ALLOT_BACKING.id, "从草稿发起退回"),
...@@ -372,7 +372,8 @@ public enum LogType { ...@@ -372,7 +372,8 @@ public enum LogType {
SELF_CHECK_7(169, SELF_CHECK.id,ORIGIN_STATUS.id,WAIT_SELF_CHECK.id,"待自查任务"), SELF_CHECK_7(169, SELF_CHECK.id,ORIGIN_STATUS.id,WAIT_SELF_CHECK.id,"待自查任务"),
//[业务操作日志]存储失败:找不到业务类型为+4,旧状态为400,新状态为8888的日志模板 //[业务操作日志]存储失败:找不到业务类型为+4,旧状态为400,新状态为8888的日志模板
SELF_CHECK_8(170,SELF_CHECK.id,WAIT_SELF_CHECK.id,ARCHIVE.id,"核查结束,系统发起的自查自动结束"), SELF_CHECK_8(170,SELF_CHECK.id,WAIT_SELF_CHECK.id,ARCHIVE.id,"核查结束,系统发起的自查自动结束"),
; REPAIR_BACK_21(171,REPAIR.id, ORIGIN_STATUS.id, REPAIR_SEND_UNDER_DRAFT.id, "省直属等待出库"),
ALLOT_BACK_21(172,ALLOT_BACK.id,ORIGIN_STATUS.id,BACK_UNDER_DRAFT.id,"省直属等待出库");
public Integer id; public Integer id;
......
...@@ -688,9 +688,7 @@ public class DeviceCheckController { ...@@ -688,9 +688,7 @@ public class DeviceCheckController {
//根据detail userC为省且任务状态是完结状态时 变为无误 否则是等待省审核 //根据detail userC为省且任务状态是完结状态时 变为无误 否则是等待省审核
Integer detailId = task.getBillId(); Integer detailId = task.getBillId();
Integer userCId = detailRepo.findById(detailId).get().getUserCId(); Integer userCId = detailRepo.findById(detailId).get().getUserCId();
if (task.getBillStatus().equals(END.id) && userIsProv(userCId)){
if (task.getBillStatus().equals(END.id) && Objects.nonNull(userCId) && userCId !=0 && userIsProv(userCId)){
checkResult = "无误"; checkResult = "无误";
}else { }else {
checkResult = "等待省审核"; checkResult = "等待省审核";
...@@ -733,6 +731,9 @@ public class DeviceCheckController { ...@@ -733,6 +731,9 @@ public class DeviceCheckController {
* @return * @return
*/ */
private boolean userIsProv(Integer userId) { private boolean userIsProv(Integer userId) {
if (Objects.isNull(userId) || userId == 0){
return false;
}
Integer unitsId = userService.findById(userId).getUnitsId(); Integer unitsId = userService.findById(userId).getUnitsId();
Integer level = unitsRepo.findById(unitsId).get().getLevel(); Integer level = unitsRepo.findById(unitsId).get().getLevel();
return level == 1; return level == 1;
......
...@@ -174,5 +174,10 @@ public interface DeviceLibraryDao extends JpaRepository<DeviceLibrary, Integer>, ...@@ -174,5 +174,10 @@ public interface DeviceLibraryDao extends JpaRepository<DeviceLibrary, Integer>,
@Modifying @Modifying
@Query("update DeviceLibrary d set d.ownUnit = d.locationUnit ,d.lifeStatus = 2 where d.id in :deviceIds") @Query("update DeviceLibrary d set d.ownUnit = d.locationUnit ,d.lifeStatus = 2 where d.id in :deviceIds")
int updateDevicesOwnUnit(@Param("deviceIds") List<Integer> deviceIds); int updateDevicesOwnUnit(@Param("deviceIds") List<Integer> deviceIds);
@Transactional
@Modifying
@Query("update DeviceLibrary d set d.ownUnit = :ownUnit,d.locationUnit = :ownUnit,d.lifeStatus = 2 where d.id in :deviceIds")
int updateDevicesOwnUnit(@Param("ownUnit") String ownUnit,@Param("deviceIds") List<Integer> deviceIds);
} }
...@@ -241,4 +241,9 @@ public interface DeviceLibraryService { ...@@ -241,4 +241,9 @@ public interface DeviceLibraryService {
* @param deviceIds 装备id * @param deviceIds 装备id
*/ */
void updateDevicesOwnUnit(List<Integer> deviceIds); void updateDevicesOwnUnit(List<Integer> deviceIds);
/**
* @param
*/
void updateLocalAndOwn(String localUnit,List<Integer> deviceIds);
} }
...@@ -735,6 +735,11 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService { ...@@ -735,6 +735,11 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
deviceLibraryDao.updateDevicesOwnUnit(deviceIds); deviceLibraryDao.updateDevicesOwnUnit(deviceIds);
} }
@Override
public void updateLocalAndOwn(String localUnit,List<Integer> deviceIds) {
deviceLibraryDao.updateDevicesOwnUnit(localUnit,deviceIds);
}
@Override @Override
public DeviceLibrary update(DeviceLibrary deviceLibraryEntity) { public DeviceLibrary update(DeviceLibrary deviceLibraryEntity) {
......
...@@ -17,10 +17,11 @@ ...@@ -17,10 +17,11 @@
</parent> </parent>
<dependencies> <dependencies>
<!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId> <artifactId>fastjson</artifactId>
<version>1.2.46</version> <version>1.2.78</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
......
...@@ -272,6 +272,7 @@ public enum StatusEnum { ...@@ -272,6 +272,7 @@ public enum StatusEnum {
REPAIR_SEND_DRAFT(788,"等待出库"), REPAIR_SEND_DRAFT(788,"等待出库"),
REPAIR_SEND_SIGN_WAIT_CONFIRM(790,"申请签章待审核"), REPAIR_SEND_SIGN_WAIT_CONFIRM(790,"申请签章待审核"),
REPAIR_SEND_WAIT_SIGN(791,"等待盖章"), REPAIR_SEND_WAIT_SIGN(791,"等待盖章"),
REPAIR_SEND_UNDER_DRAFT(799,"省直属等待出库"),
/** /**
* 维修完成退回状态 * 维修完成退回状态
*/ */
...@@ -283,6 +284,7 @@ public enum StatusEnum { ...@@ -283,6 +284,7 @@ public enum StatusEnum {
REPAIR_BACK_SIGN_WAIT_CONFIRM(820,"申请签章待审核"), REPAIR_BACK_SIGN_WAIT_CONFIRM(820,"申请签章待审核"),
REPAIR_BACK_WAIT_SIGN(821,"等待盖章"), REPAIR_BACK_WAIT_SIGN(821,"等待盖章"),
REPAIR_BACK_DRAFT(888,"等待出库"), REPAIR_BACK_DRAFT(888,"等待出库"),
REPAIR_BACK_UNDER_DRAFT(889,"省直属等待出库"),
/** /**
* 配发退回状态 * 配发退回状态
...@@ -294,7 +296,7 @@ public enum StatusEnum { ...@@ -294,7 +296,7 @@ public enum StatusEnum {
BACK_DRAFT(922,"草稿"), BACK_DRAFT(922,"草稿"),
BACK_SIGN_WAIT_CONFIRM(930,"申请签章待审核"), BACK_SIGN_WAIT_CONFIRM(930,"申请签章待审核"),
BACK_WAIT_SIGN(931,"等待盖章"), BACK_WAIT_SIGN(931,"等待盖章"),
BACK_UNDER_DRAFT(932,"等待省直属退回"),
/** /**
* 报废状态 * 报废状态
*/ */
......
package com.tykj.dev.misc.utils; package com.tykj.dev.misc.utils;
import com.tykj.dev.misc.exception.ApiException;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -26,6 +27,19 @@ public class DeviceModelSort { ...@@ -26,6 +27,19 @@ public class DeviceModelSort {
public static Map<String, Integer> mapUnitSort; public static Map<String, Integer> mapUnitSort;
public static Map<String,String> mapUnitNameToDisName;
/**
* 根据单位名称换单位的简称
*/
public static String unitNameToDisName(String unitName){
if (mapUnitNameToDisName.containsKey(unitName)){
return mapUnitNameToDisName.get(unitName);
}else {
throw new ApiException("没有找到对应的单位名称替换简称:"+unitName);
}
}
/** /**
* 列装型号排序方法 * 列装型号排序方法
......
...@@ -3,6 +3,7 @@ package com.tykj.dev.device.repair.service; ...@@ -3,6 +3,7 @@ package com.tykj.dev.device.repair.service;
import com.tykj.dev.device.repair.subject.domin.RepairDetail; import com.tykj.dev.device.repair.subject.domin.RepairDetail;
import com.tykj.dev.device.repair.subject.vo.BillVo; import com.tykj.dev.device.repair.subject.vo.BillVo;
import com.tykj.dev.device.repair.subject.vo.ClearRepairVo;
import com.tykj.dev.device.repair.subject.vo.ClearTaskVo; import com.tykj.dev.device.repair.subject.vo.ClearTaskVo;
import com.tykj.dev.device.repair.subject.vo.SetDevicesOwnUnit; import com.tykj.dev.device.repair.subject.vo.SetDevicesOwnUnit;
...@@ -57,4 +58,9 @@ public interface RepairDetailService extends RepairPublicService<RepairDetail> { ...@@ -57,4 +58,9 @@ public interface RepairDetailService extends RepairPublicService<RepairDetail> {
*/ */
void setDevicesOwnUnit(List<BillVo> billVos); void setDevicesOwnUnit(List<BillVo> billVos);
/**
* @param deviceIds 装备id
*/
ClearRepairVo underRepair(List<Integer> deviceIds);
} }
...@@ -37,4 +37,6 @@ public class BillVo { ...@@ -37,4 +37,6 @@ public class BillVo {
@ApiModelProperty(value = "可见范围") @ApiModelProperty(value = "可见范围")
private String invisibleRangeName; private String invisibleRangeName;
@ApiModelProperty(value = "设备状态描述")
private String deviceStatusDescription;
} }
package com.tykj.dev.device.repair.subject.vo;
import com.tykj.dev.device.repair.subject.domin.RepairDetail;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@ApiModel("返回清退任务")
@AllArgsConstructor
@NoArgsConstructor
public class ClearRepairVo {
@ApiModelProperty(value = "正在维修中维修详情列表")
private List<RepairDetail> repairingList;
@ApiModelProperty(value = "已入库的维修详情列表")
private List<RepairDetail> endRepairList;
@ApiModelProperty(value = "在中办的装备")
private List<RepairDetail> exceptionList;
}
package com.tykj.dev.device.repair.subject.vo; package com.tykj.dev.device.repair.subject.vo;
import com.tykj.dev.device.repair.subject.domin.RepairBill;
import com.tykj.dev.device.repair.subject.domin.RepairSendBill;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -22,6 +24,12 @@ public class ClearTaskVo { ...@@ -22,6 +24,12 @@ public class ClearTaskVo {
@ApiModelProperty(value = "维修单详情id", example = "1") @ApiModelProperty(value = "维修单详情id", example = "1")
private Integer repairDetailId; private Integer repairDetailId;
@ApiModelProperty(value = "送修单", example = "1")
private RepairSendBill repairSendBill;
@ApiModelProperty(value = "维修单", example = "1")
private RepairBill repairBill;
@ApiModelProperty(value = "账单id类", example = "1") @ApiModelProperty(value = "账单id类", example = "1")
private List<BillVo> billVos; private List<BillVo> billVos;
} }
...@@ -72,11 +72,11 @@ public class RepairBillSaveVo { ...@@ -72,11 +72,11 @@ public class RepairBillSaveVo {
@ApiModelProperty(value = "已出库装备数量") @ApiModelProperty(value = "已出库装备数量")
private Integer sendedCount; private Integer sendedCount;
@NotNull(message = "repairDeviceCheckDetail不能为空") // @NotNull(message = "repairDeviceCheckDetail不能为空")
@ApiModelProperty(value = "送修装备出库详情(装备主键id+核对结果(0缺失1无误3新增,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的新增") @ApiModelProperty(value = "送修装备出库详情(装备主键id+核对结果(0缺失1无误3新增,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的新增")
private String repairDeviceCheckDetail; private String repairDeviceCheckDetail;
@NotNull(message = "repairDeviceCheckResult不能为空") // @NotNull(message = "repairDeviceCheckResult不能为空")
@ApiModelProperty(value = "送修装备出库检查结果") @ApiModelProperty(value = "送修装备出库检查结果")
private String repairDeviceCheckResult; private String repairDeviceCheckResult;
...@@ -95,6 +95,9 @@ public class RepairBillSaveVo { ...@@ -95,6 +95,9 @@ public class RepairBillSaveVo {
@ApiModelProperty(value = "发送方附件") @ApiModelProperty(value = "发送方附件")
private List<FileRet> sendFileList; private List<FileRet> sendFileList;
@ApiModelProperty(value = "收件方附件")
private List<FileRet> receiveFileList;
@ApiModelProperty(value = "单据保存vo") @ApiModelProperty(value = "单据保存vo")
private List<ScriptSaveVo> scriptSaveVos; private List<ScriptSaveVo> scriptSaveVos;
} }
package com.tykj.dev.device.repair.subject.vo;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.repair.subject.domin.RepairDetail;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@ApiModel("省直属任务撤回")
@AllArgsConstructor
@NoArgsConstructor
public class RevokeUnderTask {
@ApiModelProperty(value = "维修的装备")
private List<DeviceDetailVo> deviceDetailVos;
@ApiModelProperty(value = "任务id")
private Integer taskId;
}
...@@ -25,10 +25,11 @@ ...@@ -25,10 +25,11 @@
<version>3.5</version> <version>3.5</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId> <artifactId>fastjson</artifactId>
<version>1.2.46</version> <version>1.2.78</version>
</dependency> </dependency>
</dependencies> </dependencies>
......
...@@ -257,4 +257,11 @@ public interface TaskService { ...@@ -257,4 +257,11 @@ public interface TaskService {
* 根据billId和businessType获得Task * 根据billId和businessType获得Task
*/ */
List<Task> findByBillIdAndBusinessType(Integer billId, Integer businessType); List<Task> findByBillIdAndBusinessType(Integer billId, Integer businessType);
/**
* 根据taskId删除task
* @param taskId 任务id
*/
void deleteById(Integer taskId);
} }
...@@ -1181,6 +1181,11 @@ public class TaskServiceImpl implements TaskService { ...@@ -1181,6 +1181,11 @@ public class TaskServiceImpl implements TaskService {
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
@Override
public void deleteById(Integer taskId) {
taskDao.deleteById(taskId);
}
@Override @Override
public void moveAllSonNodeToEnd(Integer taaskId) { public void moveAllSonNodeToEnd(Integer taaskId) {
List<Task> tasks = taskDao.findAllByParentTaskId(taaskId); List<Task> tasks = taskDao.findAllByParentTaskId(taaskId);
......
...@@ -113,6 +113,14 @@ public interface UnitsService extends PublicService<Units> { ...@@ -113,6 +113,14 @@ public interface UnitsService extends PublicService<Units> {
*/ */
List<String> findBySubordinateUnitName(Integer unitsId); List<String> findBySubordinateUnitName(Integer unitsId);
/**
* 根据单位id查询下级单位名称集合
*
* @param unitsId 单位id
* @return 单位对象
*/
List<Units> findBySubordinateUnit(Integer unitsId);
UnitsPage selectPage(Integer page, Integer size); UnitsPage selectPage(Integer page, Integer size);
...@@ -151,6 +159,7 @@ public interface UnitsService extends PublicService<Units> { ...@@ -151,6 +159,7 @@ public interface UnitsService extends PublicService<Units> {
/** /**
* 省入库上级单位对象查询接口 * 省入库上级单位对象查询接口
* 国家单位
*/ */
List<Units> findSuperiorUnitsList(); List<Units> findSuperiorUnitsList();
......
...@@ -185,7 +185,7 @@ public class UnitsServiceImpl implements UnitsService { ...@@ -185,7 +185,7 @@ public class UnitsServiceImpl implements UnitsService {
units1.add(units); units1.add(units);
units1.addAll(unitsDao.findAllByType(2)); units1.addAll(unitsDao.findAllByType(2));
} }
return units1.stream().sorted(Comparator.comparing(Units::getShowOrder)).collect(Collectors.toList()); return units1.stream().sorted(Comparator.comparing(Units::getShowOrder)).distinct().collect(Collectors.toList());
} }
@Override @Override
...@@ -197,7 +197,7 @@ public class UnitsServiceImpl implements UnitsService { ...@@ -197,7 +197,7 @@ public class UnitsServiceImpl implements UnitsService {
// units1.add(units); // units1.add(units);
units1.addAll(unitsDao.findAllByType(2)); units1.addAll(unitsDao.findAllByType(2));
} }
return units1.stream().sorted(Comparator.comparing(Units::getShowOrder)).collect(Collectors.toList()); return units1.stream().sorted(Comparator.comparing(Units::getShowOrder)).distinct().collect(Collectors.toList());
} }
@Override @Override
...@@ -212,6 +212,15 @@ public class UnitsServiceImpl implements UnitsService { ...@@ -212,6 +212,15 @@ public class UnitsServiceImpl implements UnitsService {
return list; return list;
} }
@Override
public List<Units> findBySubordinateUnit(Integer unitsId) {
Units units = unitsDao.findById(unitsId).get();
List<Integer> areaIds = areaDao.findAllByFatherId(units.getAreaId()).stream().map(Area::getId).collect(Collectors.toList());
List<Units> list= unitsDao.findAllByAreaIdIn(areaIds);
list.add(units);
return list;
}
@Override @Override
public UnitsPage selectPage(Integer page, Integer size) { public UnitsPage selectPage(Integer page, Integer size) {
Pageable pageable = PageRequest.of(page, size, Sort.Direction.ASC, "level"); Pageable pageable = PageRequest.of(page, size, Sort.Direction.ASC, "level");
...@@ -332,7 +341,7 @@ public class UnitsServiceImpl implements UnitsService { ...@@ -332,7 +341,7 @@ public class UnitsServiceImpl implements UnitsService {
@Override @Override
public LeftNavigation findLeftNavigation2(SecurityUser securityUser) { public LeftNavigation findLeftNavigation2(SecurityUser securityUser) {
List<LeftNavigation> leftNavigationList2=unitsDao.findAllByType(2).stream().filter(units1 -> !units1.getName().equals("省应急小组")&& !units1.getName().equals("省机科技管理处")&& !units1.getName().equals("省机通信报务处")).map(Units::toLeftNavigation).collect(Collectors.toList()); List<LeftNavigation> leftNavigationList2=unitsDao.findAllByType(2).stream().filter(units1 -> !units1.getName().equals("省机科技管理处")&& !units1.getName().equals("省机通信报务处")).map(Units::toLeftNavigation).collect(Collectors.toList());
LeftNavigation leftNavigation2=new LeftNavigation(0,"省直属",leftNavigationList2, UUID.randomUUID().toString(),1,22,null); LeftNavigation leftNavigation2=new LeftNavigation(0,"省直属",leftNavigationList2, UUID.randomUUID().toString(),1,22,null);
return leftNavigation2; return leftNavigation2;
} }
...@@ -408,6 +417,7 @@ public class UnitsServiceImpl implements UnitsService { ...@@ -408,6 +417,7 @@ public class UnitsServiceImpl implements UnitsService {
@Override @Override
public void addUnitSortMap() { public void addUnitSortMap() {
DeviceModelSort.mapUnitSort=unitsDao.findAll().stream().collect(Collectors.toMap(Units::getName,Units::getShowOrder)); DeviceModelSort.mapUnitSort=unitsDao.findAll().stream().collect(Collectors.toMap(Units::getName,Units::getShowOrder));
DeviceModelSort.mapUnitNameToDisName=unitsDao.findAll().stream().collect(Collectors.toMap(Units::getName,Units::getUnitDesc));
} }
......
...@@ -370,7 +370,9 @@ public class UserServiceImpl implements UserService { ...@@ -370,7 +370,9 @@ public class UserServiceImpl implements UserService {
@Override @Override
public MemberThat findById(Integer userId) { public MemberThat findById(Integer userId) {
MemberThat memberThat = userDao.findById(userId).get().toVo(); MemberThat memberThat = userDao.findById(userId)
.orElseThrow(() -> new ApiException("没有找到指定userId = {}的用户",userId))
.toVo();
Mgrcert mgrcert = mgrcertDao.findByUserId(userId); Mgrcert mgrcert = mgrcertDao.findByUserId(userId);
memberThat.setUnitsName(unitsService.findById(memberThat.getUnitsId()).getName()); memberThat.setUnitsName(unitsService.findById(memberThat.getUnitsId()).getName());
if (mgrcert != null) { if (mgrcert != null) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论