提交 5beb80d5 authored 作者: 邓砥奕's avatar 邓砥奕

[业务模块]添加了存储电子签章id的统一接口

上级 38c8be57
...@@ -132,4 +132,10 @@ public class AllotBackBill { ...@@ -132,4 +132,10 @@ public class AllotBackBill {
@ApiModelProperty(value = "退回单号") @ApiModelProperty(value = "退回单号")
private String num; private String num;
@ApiModelProperty(value = "发件单位签章id")
private String leftSignatureId;
@ApiModelProperty(value = "收件单位签章id")
private String rightSignatureId;
} }
...@@ -220,4 +220,10 @@ public class AllotBill { ...@@ -220,4 +220,10 @@ public class AllotBill {
@ApiModelProperty(value = "配发单号") @ApiModelProperty(value = "配发单号")
private String num; private String num;
@ApiModelProperty(value = "发件单位签章id")
private String leftSignatureId;
@ApiModelProperty(value = "收件单位签章id")
private String rightSignatureId;
} }
...@@ -6,7 +6,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; ...@@ -6,7 +6,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@Component @Component
public class BeanConfig { public class TaskBeanConfig {
@Bean @Bean
public TaskScheduler taskScheduler() { public TaskScheduler taskScheduler() {
......
...@@ -218,4 +218,10 @@ public class RepairBackBill { ...@@ -218,4 +218,10 @@ public class RepairBackBill {
@ApiModelProperty(value = "接收确认人") @ApiModelProperty(value = "接收确认人")
@Transient @Transient
private String receiveUserB; private String receiveUserB;
@ApiModelProperty(value = "发件单位签章id")
private String leftSignatureId;
@ApiModelProperty(value = "收件单位签章id")
private String rightSignatureId;
} }
...@@ -118,4 +118,9 @@ public class RepairBill { ...@@ -118,4 +118,9 @@ public class RepairBill {
@ApiModelProperty(value = "维修单档案号") @ApiModelProperty(value = "维修单档案号")
private String docNum; private String docNum;
@ApiModelProperty(value = "发件单位签章id")
private String leftSignatureId;
@ApiModelProperty(value = "收件单位签章id")
private String rightSignatureId;
} }
...@@ -242,4 +242,9 @@ public class SendBackBillDetail { ...@@ -242,4 +242,9 @@ public class SendBackBillDetail {
@ApiModelProperty(value = "截至日期") @ApiModelProperty(value = "截至日期")
private Date time; private Date time;
@ApiModelProperty(value = "发件单位签章id")
private String leftSignatureId;
@ApiModelProperty(value = "收件单位签章id")
private String rightSignatureId;
} }
...@@ -55,6 +55,14 @@ ...@@ -55,6 +55,14 @@
<groupId>com.tykj.dev</groupId> <groupId>com.tykj.dev</groupId>
<artifactId>config</artifactId> <artifactId>config</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.tykj</groupId>
<artifactId>dev-repair</artifactId>
</dependency>
<dependency>
<groupId>com.tykj</groupId>
<artifactId>dev-sendback</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file
...@@ -12,23 +12,31 @@ import com.tykj.dev.device.library.subject.domin.DeviceLibrary; ...@@ -12,23 +12,31 @@ import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.library.subject.vo.DeviceLibrarySelectVo; import com.tykj.dev.device.library.subject.vo.DeviceLibrarySelectVo;
import com.tykj.dev.device.packing.service.PackingLibraryService; import com.tykj.dev.device.packing.service.PackingLibraryService;
import com.tykj.dev.device.packing.subject.domin.PackingLibrary; import com.tykj.dev.device.packing.subject.domin.PackingLibrary;
import com.tykj.dev.device.repair.service.RepairBackBillService;
import com.tykj.dev.device.repair.service.RepairBillService;
import com.tykj.dev.device.repair.subject.domin.RepairBackBill;
import com.tykj.dev.device.repair.subject.domin.RepairBill;
import com.tykj.dev.device.selfcheck.service.SelfCheckBillService; import com.tykj.dev.device.selfcheck.service.SelfCheckBillService;
import com.tykj.dev.device.selfcheck.subject.domin.SelfCheckBill; import com.tykj.dev.device.selfcheck.subject.domin.SelfCheckBill;
import com.tykj.dev.device.sendback.entity.domain.SendBackBill;
import com.tykj.dev.device.sendback.entity.domain.SendBackBillDetail;
import com.tykj.dev.device.sendback.repository.SendBackBillDao;
import com.tykj.dev.device.sendback.repository.SendBackBillDetailDao;
import com.tykj.dev.device.storage.service.StorageBillService; import com.tykj.dev.device.storage.service.StorageBillService;
import com.tykj.dev.device.storage.subject.domin.StorageBill; import com.tykj.dev.device.storage.subject.domin.StorageBill;
import com.tykj.dev.device.task.service.TaskService; import com.tykj.dev.device.task.service.TaskService;
import com.tykj.dev.device.task.subject.bto.TaskBto; import com.tykj.dev.device.task.subject.bto.TaskBto;
import com.tykj.dev.device.taskselect.vo.SignatureSaveVo;
import com.tykj.dev.device.user.subject.service.UserPublicService; import com.tykj.dev.device.user.subject.service.UserPublicService;
import com.tykj.dev.misc.base.ResultObj; import com.tykj.dev.misc.base.ResultObj;
import com.tykj.dev.misc.exception.ApiException;
import com.tykj.dev.misc.utils.ResultUtil;
import com.tykj.dev.misc.utils.StringSplitUtil; import com.tykj.dev.misc.utils.StringSplitUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.tykj.dev.device.matching.service.MatchingDeviceBillService; import com.tykj.dev.device.matching.service.MatchingDeviceBillService;
import com.tykj.dev.device.matching.service.MatchingDeviceLibraryService; import com.tykj.dev.device.matching.service.MatchingDeviceLibraryService;
...@@ -81,6 +89,18 @@ public class TaskSelectController { ...@@ -81,6 +89,18 @@ public class TaskSelectController {
@Autowired @Autowired
private AllotBackBillService allotBackBillService; private AllotBackBillService allotBackBillService;
@Autowired
private RepairBillService repairBillService;
@Autowired
private RepairBackBillService repairBackBillService;
@Autowired
private SendBackBillDao sendBackBillDao;
@Autowired
private SendBackBillDetailDao sendBackBillDetailDao;
@ApiOperation(value = "查询业务对应页面的数据", notes = "可以通过这个接口查询业务对应页面的数据") @ApiOperation(value = "查询业务对应页面的数据", notes = "可以通过这个接口查询业务对应页面的数据")
@GetMapping("/manage/detail/{id}") @GetMapping("/manage/detail/{id}")
public ResponseEntity selectData(@PathVariable("id") int taskId) { public ResponseEntity selectData(@PathVariable("id") int taskId) {
...@@ -310,7 +330,95 @@ public class TaskSelectController { ...@@ -310,7 +330,95 @@ public class TaskSelectController {
list.add(packingLibraryEntityList); list.add(packingLibraryEntityList);
list.add(deviceLibraryService.getAllotList(new DeviceLibrarySelectVo()).stream().filter(deviceLibraryEntity -> packingIdList.contains(deviceLibraryEntity.getPackingId())).sorted(Comparator.comparing(DeviceLibrary::getPackingId)).collect(Collectors.toList())); list.add(deviceLibraryService.getAllotList(new DeviceLibrarySelectVo()).stream().filter(deviceLibraryEntity -> packingIdList.contains(deviceLibraryEntity.getPackingId())).sorted(Comparator.comparing(DeviceLibrary::getPackingId)).collect(Collectors.toList()));
return ResponseEntity.ok(new ResultObj(list,"查询成功")); return ResponseEntity.ok(new ResultObj(list,"查询成功"));
default: return null; default:throw new ApiException(ResultUtil.failed("该接口不支持当前task业务类型"));
}
}
@ApiOperation(value = "业务账单添加电子签章", notes = "可以通过这个接口业务账单添加电子签章")
@GetMapping("/signature/form")
public ResponseEntity addSignature(@RequestBody SignatureSaveVo signatureSaveVo) {
//找到对应task
TaskBto taskBto = taskService.get(signatureSaveVo.getTaskId());
//判断task类型
Integer businessType = taskBto.getBusinessType();
switch (businessType){
case 3:
if (taskBto.getBillId()>0){
AllotBill allotBill = allotBillService.getOne(taskBto.getBillId());
if (signatureSaveVo.getType()==1){
allotBill.setLeftSignatureId(signatureSaveVo.getSignatureId());
}
if (signatureSaveVo.getType()==2){
allotBill.setRightSignatureId(signatureSaveVo.getSignatureId());
}
allotBillService.update(allotBill);
return ResponseEntity.ok("添加成功");
}
else {
throw new ApiException(ResultUtil.failed("当前task不存在账单id"));
}
case 22:
if (taskBto.getBillId()>0){
AllotBackBill allotBackBill = allotBackBillService.getOne(taskBto.getBillId());
if (signatureSaveVo.getType()==1){
allotBackBill.setLeftSignatureId(signatureSaveVo.getSignatureId());
}
if (signatureSaveVo.getType()==2){
allotBackBill.setRightSignatureId(signatureSaveVo.getSignatureId());
}
allotBackBillService.update(allotBackBill);
return ResponseEntity.ok("添加成功");
}
else {
throw new ApiException(ResultUtil.failed("当前task不存在账单id"));
}
case 5:
if (taskBto.getBillId()>0){
RepairBill repairBill = repairBillService.getOne(taskBto.getBillId());
if (signatureSaveVo.getType()==1){
repairBill.setLeftSignatureId(signatureSaveVo.getSignatureId());
}
if (signatureSaveVo.getType()==2){
repairBill.setRightSignatureId(signatureSaveVo.getSignatureId());
}
repairBillService.update(repairBill);
return ResponseEntity.ok("添加成功");
}
else {
throw new ApiException(ResultUtil.failed("当前task不存在账单id"));
}
case 10:
if (taskBto.getBillId()>0){
RepairBackBill repairBackBill = repairBackBillService.getOne(taskBto.getBillId());
if (signatureSaveVo.getType()==1){
repairBackBill.setLeftSignatureId(signatureSaveVo.getSignatureId());
}
if (signatureSaveVo.getType()==2){
repairBackBill.setRightSignatureId(signatureSaveVo.getSignatureId());
}
repairBackBillService.update(repairBackBill);
return ResponseEntity.ok("添加成功");
}
else {
throw new ApiException(ResultUtil.failed("当前task不存在账单id"));
}
case 16:
if (taskBto.getBillId()>0){
SendBackBill sendBackBill = sendBackBillDao.getOne(taskBto.getBillId());
SendBackBillDetail sendBackBillDetail = sendBackBillDetailDao.findSendBackBillDetailById(sendBackBill.getFormId());
if (signatureSaveVo.getType()==1){
sendBackBillDetail.setLeftSignatureId(signatureSaveVo.getSignatureId());
}
if (signatureSaveVo.getType()==2){
sendBackBillDetail.setRightSignatureId(signatureSaveVo.getSignatureId());
}
sendBackBillDetailDao.save(sendBackBillDetail);
return ResponseEntity.ok("添加成功");
}
else {
throw new ApiException(ResultUtil.failed("当前task不存在账单id"));
}
default:throw new ApiException(ResultUtil.failed("该接口不支持当前task业务类型"));
} }
} }
} }
package com.tykj.dev.device.taskselect.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author dengdiyi
*/
@Data
@ApiModel("电子签章存储类")
public class SignatureSaveVo {
@ApiModelProperty(value = "业务主键id")
private Integer taskId;
@ApiModelProperty(value = "存储类型(1:发件单位签章,2:收件单位签章)")
private Integer type;
@ApiModelProperty(value = "电子签章id")
private String signatureId;
}
...@@ -26,7 +26,9 @@ import com.tykj.dev.device.repair.subject.domin.RepairSendBill; ...@@ -26,7 +26,9 @@ import com.tykj.dev.device.repair.subject.domin.RepairSendBill;
import com.tykj.dev.device.retired.service.DeviceRetiredBillService; import com.tykj.dev.device.retired.service.DeviceRetiredBillService;
import com.tykj.dev.device.selfcheck.service.SelfCheckBillService; import com.tykj.dev.device.selfcheck.service.SelfCheckBillService;
import com.tykj.dev.device.sendback.entity.domain.SendBackBill; import com.tykj.dev.device.sendback.entity.domain.SendBackBill;
import com.tykj.dev.device.sendback.entity.domain.SendBackBillDetail;
import com.tykj.dev.device.sendback.repository.SendBackBillDao; import com.tykj.dev.device.sendback.repository.SendBackBillDao;
import com.tykj.dev.device.sendback.repository.SendBackBillDetailDao;
import com.tykj.dev.device.storage.service.StorageBillService; import com.tykj.dev.device.storage.service.StorageBillService;
import com.tykj.dev.device.storage.subject.domin.StorageBill; import com.tykj.dev.device.storage.subject.domin.StorageBill;
import com.tykj.dev.device.task.service.TaskLogService; import com.tykj.dev.device.task.service.TaskLogService;
...@@ -382,12 +384,17 @@ public class LogAspect { ...@@ -382,12 +384,17 @@ public class LogAspect {
break; break;
case 16: case 16:
SendBackBillDao sendBackBillDao = SpringUtils.getBean("sendBackBillDao"); SendBackBillDao sendBackBillDao = SpringUtils.getBean("sendBackBillDao");
if (sendBackBillDao != null) { SendBackBillDetailDao sendBackBillDetailDao = SpringUtils.getBean("sendBackBillDetailDao");
if (sendBackBillDao != null&&sendBackBillDetailDao!=null) {
SendBackBill sendBackBill = sendBackBillDao.getOne(outPutTask.getBillId()); SendBackBill sendBackBill = sendBackBillDao.getOne(outPutTask.getBillId());
SendBackBillDetail sendBackBillDetail = sendBackBillDetailDao.findSendBackBillDetailById(sendBackBill.getFormId());
getFieldsParam(sendBackBill); getFieldsParam(sendBackBill);
// if (){ if ((this.oldStatus.equals(StatusEnum.SEND_BACK_1203.id)&&this.newStatus.equals(StatusEnum.SEND_BACK_1202.id))){
// this.fileVos.add(new FileVo("出库确认单",sendBackBillDetail.getFileName(),sendBackBillDetail.getFileUrl()));
// } }
if ((this.oldStatus.equals(StatusEnum.SEND_BACK_1206.id)&&this.newStatus.equals(StatusEnum.SEND_BACK_1204.id))){
this.fileVos.add(new FileVo("清退单",sendBackBillDetail.getBillFileName(),sendBackBillDetail.getBillFileUrl()));
}
} }
break; break;
case 19: case 19:
......
spring.datasource.url=jdbc:mysql://localhost:3306/device?serverTimezone=Asia/Shanghai&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false spring.datasource.url=jdbc:mysql://192.168.100.249:3306/device?serverTimezone=Asia/Shanghai&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=root spring.datasource.password=root
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论