提交 87cfc741 authored 作者: 邓砥奕's avatar 邓砥奕

修改配发

上级 0fb29fc5
......@@ -38,10 +38,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.Calendar;
......@@ -376,4 +373,38 @@ public class AllotBillController {
return ResponseEntity.ok("status只能为0或1");
}
}
@ApiOperation(value = "保存配发操作", notes = "可以通过这个接口保存配发操作")
@PostMapping(value = "/saveAllotBill")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity saveAllotBill(@RequestBody AllotBillSaveVo allotBillSaveVo) {
//第一次保存
if (allotBillSaveVo.getTaskId()==null){
//保存入库单
//发起任务
return null;
}
else {
//更新账单
return null;
}
}
@ApiOperation(value = "删除配发单草稿", notes = "可以通过这个接口删除配发单草稿")
@PostMapping(value = "/deleteAllotBill/{taskId}")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity deleteAllotBill(@PathVariable("taskId") int taskId) {
//任务封存
TaskBto taskBto = taskService.get(taskId);
taskService.moveToArchive(taskBto);
return ResponseEntity.ok("删除成功");
}
@ApiOperation(value = "查询配发草稿详情", notes = "可以通过这个接口查询配发草稿详情")
@PostMapping(value = "/selectAllotDetail/{taskId}")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity selectAllotDetail(@PathVariable("taskId") int taskId) {
return null;
}
}
......@@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
/**
......@@ -16,14 +17,18 @@ import javax.validation.constraints.NotNull;
@ApiModel("配发单类")
public class AllotBillSaveVo {
@Min(value = 1,message = "taskId不能小于1")
@ApiModelProperty(value = "任务Id")
private Integer taskId;
@ApiModelProperty(value = "配发标题")
private String title;
@NotNull(message = "applyNumber不能为空")
// @NotNull(message = "applyNumber不能为空")
@ApiModelProperty(value = "申请文号")
private String applyNumber;
@NotNull(message = "replayNumber不能为空")
// @NotNull(message = "replayNumber不能为空")
@ApiModelProperty(value = "批复文号")
private String replayNumber;
......@@ -40,8 +45,8 @@ public class AllotBillSaveVo {
@ApiModelProperty(value = "发件方(B岗位)")
private Integer sendUserbId;
// @NotNull(message = "receiveUseraId不能为空")
// @Min(value = 1,message = "receiveUseraId不能小于1")
@NotNull(message = "receiveUseraId不能为空")
@Min(value = 1,message = "receiveUseraId不能小于1")
@ApiModelProperty(value = "收件方(A岗位)")
private Integer receiveUseraId;
......
......@@ -30,11 +30,11 @@ public enum LogType {
STORAGE_3(6,STORAGE.id, ORIGIN_STATUS.id, WAIT_STORAGE.id, "保存入库草稿"),
ALLOT_1(7,ALLOT.id, ORIGIN_STATUS.id, ALLOT_SEND_CONFIRM.id, "对(%receiveUnit)发起配发"),
ALLOT_1(7,ALLOT.id, ALLOT_DRAFT.id, ALLOTING.id, "对(%receiveUnit)发起配发"),
ALLOT_2(8,ALLOT.id, WAIT_ALLOT.id, ALLOT_SEND_CONFIRM.id, "对(%receiveUnit)发起配发"),
ALLOT_2(8,ALLOT.id, ORIGIN_STATUS.id, ALLOT_DRAFT.id, "保存配发草稿"),
ALLOT_3(9,ALLOT.id, ALLOT_SEND_CONFIRM.id, ARCHIVE.id, "配发出库审核失败"),
ALLOT_3(9,ALLOT.id, ALLOT_DRAFT.id, ARCHIVE.id, "删除配发草稿"),
ALLOT_4(10,ALLOT.id, ALLOT_SEND_CONFIRM.id, ALLOTING.id, "审核成功并出库"),
......@@ -172,6 +172,7 @@ public enum LogType {
ALLOT_BACK_5(86,ALLOT_BACK.id, ALLOT_BACKING.id, END.id, "接收配发退回装备"),
REPAIR_SEND_10(87,REPAIR.id, ORIGIN_STATUS.id, COUNTRY_REPAIRING.id, "向(%receiveUnit)发起装备维修"),
REPAIR_BACK_7(88,REPAIR_BACK.id, ORIGIN_STATUS.id, END.id, "维修退回装备接收并发起入库"),
STORAGE_4(89,STORAGE.id, WAIT_STORAGE.id, ARCHIVE.id, "删除入库草稿"),
;
public Integer id;
......
......@@ -116,7 +116,7 @@ public enum StatusEnum {
* 入库待审核
*/
STORAGE_CONFIRM(200, "入库待审核"),
WAIT_STORAGE(201, "待入库"),
WAIT_STORAGE(201, "草稿"),
/**
* 待配发
*/
......@@ -137,6 +137,11 @@ public enum StatusEnum {
*/
ALLOT_RECEIVE_CONFIRM(303, "配发入库待审核"),
/**
* 草稿
*/
ALLOT_DRAFT(333,"草稿"),
/**
* 待自查
*/
......
......@@ -314,7 +314,7 @@ public class StorageBillController {
@ApiOperation(value = "保存入库单", notes = "可以通过这个接口保存入库单")
@PostMapping(value = "/saveStorageBill")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity saveStorageBill(@RequestBody @Validated StorageBillSaveVo storageBillSaveVo) {
public ResponseEntity saveStorageBill(@RequestBody StorageBillSaveVo storageBillSaveVo) {
//第一次保存
if (storageBillSaveVo.getTaskId()==null){
//保存入库单
......
......@@ -9,6 +9,7 @@ import lombok.Data;
import org.springframework.beans.BeanUtils;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
......@@ -32,37 +33,37 @@ public class StorageBillSaveVo {
@ApiModelProperty(value = "批复文号")
private String replayNumber;
// @NotNull(message = "sendUnit不能为空")
@NotNull(message = "sendUnit不能为空")
@ApiModelProperty(value = "配送单位")
private String sendUnit;
// @NotNull(message = "sendUserId不能为空")
@NotNull(message = "sendUserId不能为空")
@ApiModelProperty(value = "发件方")
private String sendUserId;
// @NotNull(message = "approver不能为空")
@NotNull(message = "approver不能为空")
@ApiModelProperty(value = "核发人")
private String approver;
// @NotNull(message = "sendTime不能为空")
@NotNull(message = "sendTime不能为空")
@ApiModelProperty(value = "配发时间")
private Date sendTime;
// @NotNull(message = "receiveUseraId不能为空")
// @Min(value = 1,message = "receiveUseraId不能小于1")
@NotNull(message = "receiveUseraId不能为空")
@Min(value = 1,message = "receiveUseraId不能小于1")
@ApiModelProperty(value = "接收单位A岗")
private Integer receiveUseraId;
// @NotNull(message = "receiveUserbId不能为空")
// @Min(value = 1,message = "receiveUserbId不能小于1")
@NotNull(message = "receiveUserbId不能为空")
@Min(value = 1,message = "receiveUserbId不能小于1")
@ApiModelProperty(value = "接收单位B岗")
private Integer receiveUserbId;
// @NotNull(message = "fileName不能为空")
@NotNull(message = "fileName不能为空")
@ApiModelProperty(value = "配发单附件名")
private String fileName;
// @NotNull(message = "fileUrl不能为空")
@NotNull(message = "fileUrl不能为空")
@ApiModelProperty(value = "配发单附件url")
private String fileUrl;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论