提交 4d7b4d18 authored 作者: 黄夏豪's avatar 黄夏豪

项目重构代码补充

上级 92d7f9ea
package com.tykj.dev.device.destroy;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
...@@ -8,7 +10,10 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; ...@@ -8,7 +10,10 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
* @Description TODO * @Description TODO
* @createTime 2020年09月01日 14:32:00 * @createTime 2020年09月01日 14:32:00
*/ */
@SpringBootApplication @SpringBootApplication(scanBasePackages={
"com.tykj.dev.*",
}
)
public class DestroyApp { public class DestroyApp {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(DestroyApp.class, args); SpringApplication.run(DestroyApp.class, args);
......
package controller; package com.tykj.dev.device.destroy.controller;
import com.tykj.dev.config.swagger.AutoDocument; import com.tykj.dev.config.swagger.AutoDocument;
import com.tykj.dev.device.destroy.entity.vo.*;
import com.tykj.dev.device.library.service.DeviceLibraryService; import com.tykj.dev.device.library.service.DeviceLibraryService;
import com.tykj.dev.device.library.service.DeviceLogService; import com.tykj.dev.device.library.service.DeviceLogService;
import com.tykj.dev.device.library.subject.Dto.DeviceLogDto; import com.tykj.dev.device.library.subject.Dto.DeviceLogDto;
...@@ -20,19 +21,17 @@ import com.tykj.dev.device.user.util.AuthenticationUtils; ...@@ -20,19 +21,17 @@ import com.tykj.dev.device.user.util.AuthenticationUtils;
import com.tykj.dev.misc.utils.ListUtil; import com.tykj.dev.misc.utils.ListUtil;
import com.tykj.dev.misc.utils.ResultUtil; import com.tykj.dev.misc.utils.ResultUtil;
import com.tykj.dev.misc.utils.StringSplitUtil; import com.tykj.dev.misc.utils.StringSplitUtil;
import entity.domain.DeviceDestroyBill; import com.tykj.dev.device.destroy.entity.domain.DeviceDestroyBill;
import entity.enums.DestroyStatus; import com.tykj.dev.device.destroy.entity.enums.DestroyStatus;
import entity.vo.*;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import service.DeviceDestroyBillService; import com.tykj.dev.device.destroy.service.DeviceDestroyBillService;
import javax.transaction.Transactional; import javax.transaction.Transactional;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
...@@ -43,7 +42,7 @@ import java.util.*; ...@@ -43,7 +42,7 @@ import java.util.*;
* @author huangxiahao * @author huangxiahao
*/ */
@RestController @RestController
@RequestMapping(value = "/destory") @RequestMapping(value = "/destroy")
@AutoDocument @AutoDocument
@Api(tags = "销毁业务模块", value = "销毁业务模块") @Api(tags = "销毁业务模块", value = "销毁业务模块")
public class DeviceDestroyController { public class DeviceDestroyController {
...@@ -123,8 +122,8 @@ public class DeviceDestroyController { ...@@ -123,8 +122,8 @@ public class DeviceDestroyController {
} }
@ApiOperation(value = "查询销毁单详情", notes = "可以通过这个接口查询销毁单") @ApiOperation(value = "查询销毁单详情", notes = "可以通过这个接口查询销毁单")
@GetMapping(value = "/detail/{destroyId}") @GetMapping(value = "/detail")
public ResponseEntity<DeviceDestroyDetailResultVo> selectDestoryDetail(@Validated @NotNull @PathVariable("destroyId") Integer destroyId) { public ResponseEntity<DeviceDestroyDetailResultVo> selectDestroyDetail(@Validated @NotNull Integer destroyId) {
//装备文号 //装备文号
String docNumber; String docNumber;
DeviceDestroyDetailResultVo destroyDetailResultVo; DeviceDestroyDetailResultVo destroyDetailResultVo;
...@@ -204,7 +203,7 @@ public class DeviceDestroyController { ...@@ -204,7 +203,7 @@ public class DeviceDestroyController {
taskLogService.addLog(new TaskLogBto(task.getId(),deviceDestoryConfirmVo.getResult() == 0?"销毁成功":"销毁审核失败",billList)); taskLogService.addLog(new TaskLogBto(task.getId(),deviceDestoryConfirmVo.getResult() == 0?"销毁成功":"销毁审核失败",billList));
taskLogService.addLog(new TaskLogBto(task.getId(),"业务完结",billList)); taskLogService.addLog(new TaskLogBto(task.getId(),"业务完结",billList));
// myWebSocket.sendMessage1(); // myWebSocket.sendMessage1();
return selectDestoryDetail(deviceDestroyBill.getId()); return selectDestroyDetail(deviceDestroyBill.getId());
} }
private void handleDeviceDetail(DeviceDestroyBill deviceDestroyBill,ArrayList<FileVo> billList,Integer flag) { private void handleDeviceDetail(DeviceDestroyBill deviceDestroyBill,ArrayList<FileVo> billList,Integer flag) {
......
package entity.domain; package com.tykj.dev.device.destroy.entity.domain;
import com.tykj.dev.device.user.subject.entity.User; import com.tykj.dev.device.user.subject.entity.User;
import entity.enums.DestroyStatus; import com.tykj.dev.device.destroy.entity.enums.DestroyStatus;
import entity.vo.DeviceDestroyFormVo; import com.tykj.dev.device.destroy.entity.vo.DeviceDestroyFormVo;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.SQLDelete; import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where; import org.hibernate.annotations.Where;
import org.springframework.data.annotation.CreatedBy; import org.springframework.data.annotation.CreatedBy;
...@@ -26,6 +28,8 @@ import java.util.List; ...@@ -26,6 +28,8 @@ import java.util.List;
*/ */
@Data @Data
@Entity @Entity
@AllArgsConstructor
@NoArgsConstructor
@EntityListeners(AuditingEntityListener.class) @EntityListeners(AuditingEntityListener.class)
@SQLDelete(sql = "update device_destroy_bill set delete_tag = 1 where id = ?") @SQLDelete(sql = "update device_destroy_bill set delete_tag = 1 where id = ?")
@Where(clause = "delete_tag = 0") @Where(clause = "delete_tag = 0")
...@@ -147,6 +151,7 @@ public class DeviceDestroyBill { ...@@ -147,6 +151,7 @@ public class DeviceDestroyBill {
this.leader = leader; this.leader = leader;
this.undertaker = undertaker; this.undertaker = undertaker;
this.userA = userA; this.userA = userA;
this.destroyDeviceDetail = destroyDeviceDetail;
} }
public static DeviceDestroyBill formVoToBill(DeviceDestroyFormVo formVo, User user){ public static DeviceDestroyBill formVoToBill(DeviceDestroyFormVo formVo, User user){
......
package entity.domain; package com.tykj.dev.device.destroy.entity.domain;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.SQLDelete; import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where; import org.hibernate.annotations.Where;
import org.springframework.data.annotation.CreatedBy; import org.springframework.data.annotation.CreatedBy;
...@@ -20,6 +22,8 @@ import java.util.Date; ...@@ -20,6 +22,8 @@ import java.util.Date;
*/ */
@Data @Data
@Entity @Entity
@AllArgsConstructor
@NoArgsConstructor
@EntityListeners(AuditingEntityListener.class) @EntityListeners(AuditingEntityListener.class)
@SQLDelete(sql = "update device_destory_detail set delete_tag = 1 where id = ?") @SQLDelete(sql = "update device_destory_detail set delete_tag = 1 where id = ?")
@Where(clause = "delete_tag = 0") @Where(clause = "delete_tag = 0")
......
package entity.vo; package com.tykj.dev.device.destroy.entity.vo;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
......
package entity.vo; package com.tykj.dev.device.destroy.entity.vo;
import com.tykj.dev.misc.base.CustomPage; import com.tykj.dev.misc.base.CustomPage;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
......
package entity.vo; package com.tykj.dev.device.destroy.entity.vo;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -16,10 +16,6 @@ import javax.validation.constraints.NotNull; ...@@ -16,10 +16,6 @@ import javax.validation.constraints.NotNull;
@ApiModel("销毁单确认") @ApiModel("销毁单确认")
public class DeviceDestroyConfirmVo { public class DeviceDestroyConfirmVo {
@NotNull
@ApiModelProperty(value = "工作ID",example = "1")
private Integer jobId;
@NotNull @NotNull
@ApiModelProperty(value = "任务ID",example = "1") @ApiModelProperty(value = "任务ID",example = "1")
private Integer taskId; private Integer taskId;
......
package entity.vo; package com.tykj.dev.device.destroy.entity.vo;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary; import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
......
package entity.vo; package com.tykj.dev.device.destroy.entity.vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
......
package entity.vo; package com.tykj.dev.device.destroy.entity.vo;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
......
package entity.vo; package com.tykj.dev.device.destroy.entity.vo;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
......
package repository; package com.tykj.dev.device.destroy.repository;
import entity.domain.DeviceDestroyBill; import com.tykj.dev.device.destroy.entity.domain.DeviceDestroyBill;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
......
package service; package com.tykj.dev.device.destroy.service;
import entity.domain.DeviceDestroyBill; import com.tykj.dev.device.destroy.entity.domain.DeviceDestroyBill;
import entity.vo.DeviceDestroyBillSelectVo; import com.tykj.dev.device.destroy.entity.vo.DeviceDestroyBillSelectVo;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
......
package service.impl; package com.tykj.dev.device.destroy.service.Impl;
import com.github.wenhao.jpa.PredicateBuilder; import com.github.wenhao.jpa.PredicateBuilder;
import com.github.wenhao.jpa.Specifications; import com.github.wenhao.jpa.Specifications;
...@@ -8,8 +8,8 @@ import com.tykj.dev.device.library.subject.domin.DeviceLibrary; ...@@ -8,8 +8,8 @@ import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.user.subject.service.UserPublicService; import com.tykj.dev.device.user.subject.service.UserPublicService;
import com.tykj.dev.misc.utils.StringSplitUtil; import com.tykj.dev.misc.utils.StringSplitUtil;
import com.tykj.dev.misc.utils.TimestampUtil; import com.tykj.dev.misc.utils.TimestampUtil;
import entity.domain.DeviceDestroyBill; import com.tykj.dev.device.destroy.entity.domain.DeviceDestroyBill;
import entity.vo.DeviceDestroyBillSelectVo; import com.tykj.dev.device.destroy.entity.vo.DeviceDestroyBillSelectVo;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
...@@ -17,8 +17,8 @@ import org.springframework.data.domain.Pageable; ...@@ -17,8 +17,8 @@ import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification; import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import repository.DeviceDestroyBillDao; import com.tykj.dev.device.destroy.repository.DeviceDestroyBillDao;
import service.DeviceDestroyBillService; import com.tykj.dev.device.destroy.service.DeviceDestroyBillService;
import javax.persistence.Transient; import javax.persistence.Transient;
import java.lang.reflect.Field; import java.lang.reflect.Field;
......
package com.tykj.dev.device.retired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* @author zjm
* @version 1.0.0
* @ClassName userApp.java
* @Description TODO
* @createTime 2020年09月01日 14:32:00
*/
@SpringBootApplication(scanBasePackages={
"com.tykj.dev.*",
}
)
public class RetiredApp {
public static void main(String[] args) {
SpringApplication.run(RetiredApp.class, args);
}
}
package controller; package com.tykj.dev.device.retired.controller;
import com.tykj.dev.config.swagger.AutoDocument; import com.tykj.dev.config.swagger.AutoDocument;
import com.tykj.dev.device.library.service.DeviceLibraryService; import com.tykj.dev.device.library.service.DeviceLibraryService;
...@@ -9,30 +9,27 @@ import com.tykj.dev.device.library.subject.vo.DeviceLibrarySelectVo; ...@@ -9,30 +9,27 @@ 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.packing.subject.vo.PackingLibrarySelectVo; import com.tykj.dev.device.packing.subject.vo.PackingLibrarySelectVo;
import com.tykj.dev.device.retired.entity.vo.*;
import com.tykj.dev.device.task.service.TaskLogService; import com.tykj.dev.device.task.service.TaskLogService;
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.task.subject.bto.TaskLogBto; import com.tykj.dev.device.task.subject.bto.TaskLogBto;
import com.tykj.dev.device.task.subject.common.BusinessEnum; import com.tykj.dev.device.task.subject.common.BusinessEnum;
import com.tykj.dev.device.task.subject.common.StatusEnum; import com.tykj.dev.device.task.subject.common.StatusEnum;
import com.tykj.dev.device.task.subject.domin.TaskLog; import com.tykj.dev.device.task.subject.domin.Task;
import com.tykj.dev.device.task.subject.vo.FileVo;
import com.tykj.dev.device.user.subject.entity.User; import com.tykj.dev.device.user.subject.entity.User;
import com.tykj.dev.device.user.util.AuthenticationUtils; import com.tykj.dev.device.user.util.AuthenticationUtils;
import com.tykj.dev.misc.utils.ListUtil; import com.tykj.dev.misc.utils.ListUtil;
import com.tykj.dev.misc.utils.ResultUtil; import com.tykj.dev.misc.utils.ResultUtil;
import entity.domain.DeviceRetiredBill; import com.tykj.dev.device.retired.entity.domain.DeviceRetiredBill;
import entity.enums.RetiredStatus; import com.tykj.dev.device.retired.entity.enums.RetiredStatus;
import entity.vo.*;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.scheduling.support.TaskUtils;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import service.DeviceRetiredBillService; import com.tykj.dev.device.retired.service.DeviceRetiredBillService;
import javax.transaction.Transactional; import javax.transaction.Transactional;
import java.sql.Timestamp; import java.sql.Timestamp;
...@@ -63,15 +60,11 @@ public class DeviceRetiredController { ...@@ -63,15 +60,11 @@ public class DeviceRetiredController {
private final TaskLogService taskLogService; private final TaskLogService taskLogService;
final public DeviceRetiredController(DeviceRetiredBillService deviceRetiredBillService, TaskService taskService, PackingLibraryService packingLibraryService, DeviceLibraryService deviceLibraryService, DeviceLogService deviceLogService, TaskLogService taskLogService) {
TaskUtils taskUtils;
public DeviceRetiredController(DeviceRetiredBillService deviceRetiredBillService, TaskService taskService, PackingLibraryService packingLibraryService, DeviceLibraryService deviceLibraryService, TaskUtils taskUtils, DeviceLogService deviceLogService, TaskLogService taskLogService) {
this.deviceRetiredBillService = deviceRetiredBillService; this.deviceRetiredBillService = deviceRetiredBillService;
this.taskService = taskService; this.taskService = taskService;
this.packingLibraryService = packingLibraryService; this.packingLibraryService = packingLibraryService;
this.deviceLibraryService = deviceLibraryService; this.deviceLibraryService = deviceLibraryService;
this.taskUtils = taskUtils;
this.deviceLogService = deviceLogService; this.deviceLogService = deviceLogService;
this.taskLogService = taskLogService; this.taskLogService = taskLogService;
} }
...@@ -105,8 +98,7 @@ public class DeviceRetiredController { ...@@ -105,8 +98,7 @@ public class DeviceRetiredController {
DeviceRetiredBill retiredBill = DeviceRetiredBill.formVoToBill(formVo,currentUserInfo); DeviceRetiredBill retiredBill = DeviceRetiredBill.formVoToBill(formVo,currentUserInfo);
retiredBill= deviceRetiredBillService.addEntity(retiredBill); retiredBill= deviceRetiredBillService.addEntity(retiredBill);
//生成Task //生成Task
TaskBto task = initTaskBto(retiredBill); Task task = taskService.start(initTaskBto(retiredBill));
taskService.start(task);
//生成任务日志 //生成任务日志
taskLogService.addLog(new TaskLogBto(task.getId(),"发起退装",null)); taskLogService.addLog(new TaskLogBto(task.getId(),"发起退装",null));
taskLogService.addLog(new TaskLogBto(task.getId(),"退装待审核",null)); taskLogService.addLog(new TaskLogBto(task.getId(),"退装待审核",null));
...@@ -135,7 +127,7 @@ public class DeviceRetiredController { ...@@ -135,7 +127,7 @@ public class DeviceRetiredController {
@ApiOperation(value = "退装出库单审核",notes = "可以通过这个审核退装单") @ApiOperation(value = "退装出库单审核",notes = "可以通过这个审核退装单")
@PutMapping(value = "/confirmation") @PutMapping(value = "/confirmation")
@Transactional @Transactional
public ResponseEntity<DeviceRetiredDetailResultVo> confirmDestory( @RequestBody @Validated DeviceRetiredConfirmVo deviceRetiredConfirmVo){ public ResponseEntity<DeviceRetiredDetailResultVo> confirmDestroy( @RequestBody @Validated DeviceRetiredConfirmVo deviceRetiredConfirmVo){
//初始化需要的数据 //初始化需要的数据
TaskBto task = taskService.get(deviceRetiredConfirmVo.getTaskId()); TaskBto task = taskService.get(deviceRetiredConfirmVo.getTaskId());
DeviceRetiredBill deviceRetiredBillEntity = deviceRetiredBillService.getOne(task.getBillId()); DeviceRetiredBill deviceRetiredBillEntity = deviceRetiredBillService.getOne(task.getBillId());
......
package entity.domain; package com.tykj.dev.device.retired.entity.domain;
import com.tykj.dev.device.user.subject.entity.User; import com.tykj.dev.device.user.subject.entity.User;
import entity.enums.RetiredStatus; import com.tykj.dev.device.retired.entity.enums.RetiredStatus;
import entity.vo.DeviceRetiredFormVo; import com.tykj.dev.device.retired.entity.vo.DeviceRetiredFormVo;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.SQLDelete; import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where; import org.hibernate.annotations.Where;
import org.springframework.data.annotation.CreatedBy; import org.springframework.data.annotation.CreatedBy;
...@@ -25,6 +27,8 @@ import java.util.List; ...@@ -25,6 +27,8 @@ import java.util.List;
*/ */
@Data @Data
@Entity @Entity
@AllArgsConstructor
@NoArgsConstructor
@EntityListeners(AuditingEntityListener.class) @EntityListeners(AuditingEntityListener.class)
@SQLDelete(sql = "update device_retired_bill set delete_tag = 1 where id = ?") @SQLDelete(sql = "update device_retired_bill set delete_tag = 1 where id = ?")
@Where(clause = "delete_tag = 0") @Where(clause = "delete_tag = 0")
......
package entity.vo; package com.tykj.dev.device.retired.entity.vo;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
......
package entity.vo; package com.tykj.dev.device.retired.entity.vo;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -16,10 +16,6 @@ import javax.validation.constraints.NotNull; ...@@ -16,10 +16,6 @@ import javax.validation.constraints.NotNull;
@ApiModel("退装单确认") @ApiModel("退装单确认")
public class DeviceRetiredConfirmVo { public class DeviceRetiredConfirmVo {
@NotNull
@ApiModelProperty(value = "工作ID",example = "1")
private Integer jobId;
@NotNull @NotNull
@ApiModelProperty(value = "任务ID",example = "1") @ApiModelProperty(value = "任务ID",example = "1")
private Integer taskId; private Integer taskId;
......
package entity.vo; package com.tykj.dev.device.retired.entity.vo;
import com.tykj.dev.device.packing.subject.domin.PackingLibrary; import com.tykj.dev.device.packing.subject.domin.PackingLibrary;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
......
package entity.vo; package com.tykj.dev.device.retired.entity.vo;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import lombok.Data; import lombok.Data;
......
package entity.vo; package com.tykj.dev.device.retired.entity.vo;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
......
package entity.vo; package com.tykj.dev.device.retired.entity.vo;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
......
package repository; package com.tykj.dev.device.retired.repository;
import entity.domain.DeviceRetiredBill; import com.tykj.dev.device.retired.entity.domain.DeviceRetiredBill;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
......
package service; package com.tykj.dev.device.retired.service;
import entity.domain.DeviceRetiredBill; import com.tykj.dev.device.retired.entity.domain.DeviceRetiredBill;
/** /**
* @author HuangXiahao * @author HuangXiahao
......
package service.Impl; package com.tykj.dev.device.retired.service.Impl;
import com.github.wenhao.jpa.PredicateBuilder; import com.github.wenhao.jpa.PredicateBuilder;
import com.github.wenhao.jpa.Specifications; import com.github.wenhao.jpa.Specifications;
import com.tykj.dev.device.library.repository.DeviceLibraryDao; import com.tykj.dev.device.library.repository.DeviceLibraryDao;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary; import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import entity.domain.DeviceRetiredBill; import com.tykj.dev.device.retired.entity.domain.DeviceRetiredBill;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import repository.DeviceRetiredBillDao; import com.tykj.dev.device.retired.repository.DeviceRetiredBillDao;
import service.DeviceRetiredBillService; import com.tykj.dev.device.retired.service.DeviceRetiredBillService;
import java.util.Optional; import java.util.Optional;
......
...@@ -14,8 +14,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; ...@@ -14,8 +14,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
"com.tykj.dev.*", "com.tykj.dev.*",
} }
) )
public class userApp { public class UserApp {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(userApp.class, args); SpringApplication.run(UserApp.class, args);
} }
} }
...@@ -154,7 +154,7 @@ public class RfidController { ...@@ -154,7 +154,7 @@ public class RfidController {
}); });
BeanUtils.copyProperties(rfidChangeBill,rfidChangeBillResultVo); BeanUtils.copyProperties(rfidChangeBill,rfidChangeBillResultVo);
rfidChangeBillResultVo.setUserAName(userPublicService.getOne(rfidChangeBill.getUserAId()).getName()); rfidChangeBillResultVo.setUserAName(userPublicService.getOne(rfidChangeBill.getUserAId()).getName());
rfidChangeBillResultVo.setUserBName(userPublicService.getOne(rfidChangeBill.getUserAId()).getName()); rfidChangeBillResultVo.setUserBName(userPublicService.getOne(rfidChangeBill.getUserBId()).getName());
return ResultUtil.success(rfidChangeBillResultVo); return ResultUtil.success(rfidChangeBillResultVo);
} }
......
...@@ -2,7 +2,9 @@ package com.tykj.dev.rfid.entity.domin; ...@@ -2,7 +2,9 @@ package com.tykj.dev.rfid.entity.domin;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.SQLDelete; import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where; import org.hibernate.annotations.Where;
import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.CreatedDate;
...@@ -19,6 +21,8 @@ import java.util.Date; ...@@ -19,6 +21,8 @@ import java.util.Date;
*/ */
@Data @Data
@Entity @Entity
@AllArgsConstructor
@NoArgsConstructor
@EntityListeners(AuditingEntityListener.class) @EntityListeners(AuditingEntityListener.class)
@SQLDelete(sql = "update library_warning_log_detail set delete_tag = 1 where id = ?") @SQLDelete(sql = "update library_warning_log_detail set delete_tag = 1 where id = ?")
@Where(clause = "delete_tag = 0") @Where(clause = "delete_tag = 0")
......
...@@ -16,10 +16,6 @@ import javax.validation.constraints.NotNull; ...@@ -16,10 +16,6 @@ import javax.validation.constraints.NotNull;
@ApiModel("rfid修改确认") @ApiModel("rfid修改确认")
public class RfidChangeConfirmVo { public class RfidChangeConfirmVo {
@NotNull
@ApiModelProperty(value = "工作ID",example = "1")
private Integer jobId;
@NotNull @NotNull
@ApiModelProperty(value = "任务ID",example = "1") @ApiModelProperty(value = "任务ID",example = "1")
private Integer taskId; private Integer taskId;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论