Merge remote-tracking branch 'origin/dev_fifo_z' into dev_fifo_z
commit
c93e9c68a2
@ -0,0 +1,72 @@
|
|||||||
|
package com.glxp.api.controller.collect;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.glxp.api.annotation.CusRedissonAnnotation;
|
||||||
|
import com.glxp.api.annotation.RepeatSubmit;
|
||||||
|
import com.glxp.api.common.enums.ResultEnum;
|
||||||
|
import com.glxp.api.common.res.BaseResponse;
|
||||||
|
import com.glxp.api.common.util.ResultVOUtils;
|
||||||
|
import com.glxp.api.constant.RedissonCacheKey;
|
||||||
|
import com.glxp.api.controller.BaseController;
|
||||||
|
import com.glxp.api.entity.collect.IoCollectOrder;
|
||||||
|
import com.glxp.api.entity.collect.RelCodeBatch;
|
||||||
|
import com.glxp.api.req.collect.IoCollectCodeRequest;
|
||||||
|
import com.glxp.api.req.collect.RelCodeBatchRequest;
|
||||||
|
import com.glxp.api.res.PageSimpleResponse;
|
||||||
|
import com.glxp.api.res.collect.IoCollectCodeResponse;
|
||||||
|
import com.glxp.api.res.collect.RelCodeBatchResponse;
|
||||||
|
import com.glxp.api.service.collect.RelCodeBatchService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.BindingResult;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
public class RelCodeBatchController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private RelCodeBatchService relCodeBatchService;
|
||||||
|
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping("/udiwms/relCode/batch/xmlUpload")
|
||||||
|
public BaseResponse xmlUpload(@RequestBody RelCodeBatchRequest relCodeBatchRequest, @RequestParam("file") MultipartFile file) {
|
||||||
|
relCodeBatchService.xmlUpload(file);
|
||||||
|
return ResultVOUtils.success("保存成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/udiwms/relCode/batch/filter")
|
||||||
|
public BaseResponse list(RelCodeBatchRequest relCodeBatchRequest, BindingResult bindingResult) {
|
||||||
|
List<RelCodeBatchResponse> relCodeBatchResponses = relCodeBatchService.filterList(relCodeBatchRequest);
|
||||||
|
PageInfo<RelCodeBatchResponse> pageInfo = new PageInfo<>(relCodeBatchResponses);
|
||||||
|
PageSimpleResponse<RelCodeBatchResponse> pageSimpleResponse = new PageSimpleResponse<>();
|
||||||
|
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
||||||
|
pageSimpleResponse.setList(relCodeBatchResponses);
|
||||||
|
return ResultVOUtils.success(pageSimpleResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/udiwms/relCode/batch/get")
|
||||||
|
public BaseResponse get(@RequestParam("id") Long id) {
|
||||||
|
RelCodeBatch relCodeBatch = relCodeBatchService.getById(id);
|
||||||
|
return ResultVOUtils.success(relCodeBatch);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/udiwms/relCode/batch/delete")
|
||||||
|
public BaseResponse delete(@RequestParam("id") Long id) {
|
||||||
|
relCodeBatchService.delete(id);
|
||||||
|
return ResultVOUtils.success("删除成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/udiwms/relCode/batch/update")
|
||||||
|
public BaseResponse update(@RequestBody @Valid RelCodeBatch relCodeBatch) {
|
||||||
|
relCodeBatchService.updateById(relCodeBatch);
|
||||||
|
return ResultVOUtils.success("修改成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
package com.glxp.api.controller.collect;
|
||||||
|
|
||||||
|
|
||||||
|
import com.glxp.api.common.res.BaseResponse;
|
||||||
|
import com.glxp.api.common.util.ResultVOUtils;
|
||||||
|
import com.glxp.api.controller.BaseController;
|
||||||
|
import com.glxp.api.entity.collect.IoCollectSet;
|
||||||
|
import com.glxp.api.entity.collect.RelCodeDetail;
|
||||||
|
import com.glxp.api.service.collect.RelCodeDetailService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
public class RelCodeDetailController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private RelCodeDetailService relCodeDetailService;
|
||||||
|
|
||||||
|
@GetMapping("/udiwms/relCode/detail/get")
|
||||||
|
public BaseResponse get(Long id) {
|
||||||
|
RelCodeDetail relCodeDetail = relCodeDetailService.getById(id);
|
||||||
|
return ResultVOUtils.success(relCodeDetail);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/udiwms/relCode/detail/update")
|
||||||
|
public BaseResponse update(@RequestBody @Valid RelCodeDetail relCodeDetail) {
|
||||||
|
relCodeDetailService.updateById(relCodeDetail);
|
||||||
|
return ResultVOUtils.success("修改成功!");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
package com.glxp.api.req.collect;
|
||||||
|
|
||||||
|
import com.glxp.api.util.page.ListPageRequest;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class RelCodeBatchRequest extends ListPageRequest {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品编码
|
||||||
|
*/
|
||||||
|
private String productCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型编码
|
||||||
|
*/
|
||||||
|
private String subTypeNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 包装比例
|
||||||
|
*/
|
||||||
|
private String cascadeRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 包装规格
|
||||||
|
*/
|
||||||
|
private String packageSpec;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String comment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批次号
|
||||||
|
*/
|
||||||
|
private String batchNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产日期
|
||||||
|
*/
|
||||||
|
private Date madeDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 有效期至
|
||||||
|
*/
|
||||||
|
private Date validateDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产车间
|
||||||
|
*/
|
||||||
|
private String workShop;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产线
|
||||||
|
*/
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人
|
||||||
|
*/
|
||||||
|
private String lineManager;
|
||||||
|
|
||||||
|
String keyWords;
|
||||||
|
}
|
@ -0,0 +1,66 @@
|
|||||||
|
package com.glxp.api.res.collect;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class RelCodeBatchResponse {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品编码
|
||||||
|
*/
|
||||||
|
private String productCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型编码
|
||||||
|
*/
|
||||||
|
private String subTypeNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 包装比例
|
||||||
|
*/
|
||||||
|
private String cascadeRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 包装规格
|
||||||
|
*/
|
||||||
|
private String packageSpec;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String comment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批次号
|
||||||
|
*/
|
||||||
|
private String batchNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产日期
|
||||||
|
*/
|
||||||
|
private Date madeDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 有效期至
|
||||||
|
*/
|
||||||
|
private Date validateDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产车间
|
||||||
|
*/
|
||||||
|
private String workShop;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产线
|
||||||
|
*/
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人
|
||||||
|
*/
|
||||||
|
private String lineManager;
|
||||||
|
}
|
Loading…
Reference in New Issue