Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.api.controller; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.R; | 
|---|
|  |  |  | import com.vincent.rsf.framework.exception.CoolException; | 
|---|
|  |  |  | import com.vincent.rsf.server.api.controller.params.OtherReceiptParams; | 
|---|
|  |  |  | import com.vincent.rsf.server.api.controller.params.ReceiptParams; | 
|---|
|  |  |  | import com.vincent.rsf.server.api.service.MobileService; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.controller.params.WaitPakinParam; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.AsnOrderItem; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.controller.BaseController; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.controller.param.LoginParam; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:asnOrderItem:list')") | 
|---|
|  |  |  | @ApiOperation("获取订单物料明细") | 
|---|
|  |  |  | @GetMapping("/asnOrderItem/trackCode/{code}") | 
|---|
|  |  |  | public R getItemByTrackCode(@PathVariable String code) { | 
|---|
|  |  |  | if (StringUtils.isBlank(code)) { | 
|---|
|  |  |  | return R.error("编码不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok(mobileService.getDeltByCode(code)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakin:update')") | 
|---|
|  |  |  | @ApiOperation("组拖") | 
|---|
|  |  |  | @PostMapping("/waitPakin/merge") | 
|---|
|  |  |  | public R pikinOrder(@RequestBody WaitPakinParam waitPakin) { | 
|---|
|  |  |  | if (Objects.isNull(waitPakin)) { | 
|---|
|  |  |  | return R.error("参数不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (org.apache.commons.lang3.StringUtils.isBlank(waitPakin.getBarcode())) { | 
|---|
|  |  |  | return R.error("托盘码不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Objects.isNull(waitPakin.getItems()) || waitPakin.getItems().isEmpty()) { | 
|---|
|  |  |  | return R.error("跟踪码不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok(mobileService.mergeItems(waitPakin)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakin:update')") | 
|---|
|  |  |  | @ApiOperation("组拖解绑") | 
|---|
|  |  |  | @PostMapping("/waitPakin/unbind") | 
|---|
|  |  |  | public R pakinUnBind(@RequestBody WaitPakinParam param) { | 
|---|
|  |  |  | if (Objects.isNull(param)) { | 
|---|
|  |  |  | return R.error("参数不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (org.apache.commons.lang3.StringUtils.isBlank(param.getBarcode())) { | 
|---|
|  |  |  | return R.error("托盘码不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Objects.isNull(param.getItems()) || param.getItems().isEmpty()) { | 
|---|
|  |  |  | return R.error("跟踪码不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok(mobileService.unBind(param)); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | private String poCode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiModelProperty("条形码") | 
|---|
|  |  |  | private String barcode; | 
|---|
|  |  |  | private String trackCode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.api.entity.dto; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson.JSONObject; | 
|---|
|  |  |  | import com.fasterxml.jackson.annotation.JsonFormat; | 
|---|
|  |  |  | import com.vincent.rsf.server.api.controller.params.ReceiptParams; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.utils.CommonUtil; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.utils.FieldsUtils; | 
|---|
|  |  |  | 
|---|
|  |  |  | import io.swagger.annotations.ApiModelProperty; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  | import lombok.experimental.Accessors; | 
|---|
|  |  |  | import org.springframework.format.annotation.DateTimeFormat; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.io.Serializable; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiModelProperty("质检结果") | 
|---|
|  |  |  | private String inspect; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiModelProperty("重量") | 
|---|
|  |  |  | private Double weigth; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiModelProperty("采购单位") | 
|---|
|  |  |  | private String purUnit; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiModelProperty("库存单位") | 
|---|
|  |  |  | private String stockUnit; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiModelProperty("收货日期") | 
|---|
|  |  |  | private String prodTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiModelProperty("采购数量") | 
|---|
|  |  |  | private Double purQty; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.R; | 
|---|
|  |  |  | import com.vincent.rsf.server.api.controller.params.OtherReceiptParams; | 
|---|
|  |  |  | import com.vincent.rsf.server.api.controller.params.ReceiptParams; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.controller.params.WaitPakinParam; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.AsnOrder; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.WaitPakin; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.controller.param.LoginParam; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.entity.Fields; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | R getReceiptAreas(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<Fields> getDynamicFields(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | R getDeltByCode(String code); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | WaitPakin mergeItems(WaitPakinParam waitPakin); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | WaitPakin unBind(WaitPakinParam param); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.vincent.rsf.server.common.security.JwtSubject; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.utils.CommonUtil; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.utils.JwtUtil; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.controller.params.WaitPakinParam; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.*; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.mapper.*; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.AsnOrderItemLogService; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.AsnOrderLogService; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.WarehouseAreasItemService; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.WarehouseAreasService; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.*; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.constant.CodeRes; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.constant.SerialRuleCode; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.controller.param.LoginParam; | 
|---|
|  |  |  | 
|---|
|  |  |  | import javax.annotation.Resource; | 
|---|
|  |  |  | import javax.servlet.http.HttpServletRequest; | 
|---|
|  |  |  | import java.math.BigDecimal; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private AsnOrderLogService asnOrderLogService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private WaitPakinService waitPakinService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private WaitPakinItemService waitPakinItemService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private AsnOrderItemLogService asnOrderItemLogService; | 
|---|
|  |  |  | 
|---|
|  |  |  | throw new CoolException("库区标识不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | WarehouseAreas areasItem = warehouseAreasService.getOne(new LambdaQueryWrapper<WarehouseAreas>().eq(WarehouseAreas::getId, params.getWhAreaId())); | 
|---|
|  |  |  | WarehouseAreas areasItem = warehouseAreasService.getOne(new LambdaQueryWrapper<WarehouseAreas>() | 
|---|
|  |  |  | .eq(WarehouseAreas::getId, params.getWhAreaId())); | 
|---|
|  |  |  | if (Objects.isNull(areasItem)) { | 
|---|
|  |  |  | throw new CoolException("数据错误:当前库区不存在!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //获取已启用的动态扩展字 | 
|---|
|  |  |  | List<Fields> fields = fieldsMapper.selectList(new LambdaQueryWrapper<Fields>().eq(Fields::getFlagEnable, 1).eq(Fields::getStatus, 1)); | 
|---|
|  |  |  | List<Fields> fields = fieldsMapper.selectList(new LambdaQueryWrapper<Fields>() | 
|---|
|  |  |  | .eq(Fields::getFlagEnable, 1) | 
|---|
|  |  |  | .eq(Fields::getStatus, 1)); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<ReceiptDetlsDto> receipts = params.getReceipts(); | 
|---|
|  |  |  | List<WarehouseAreasItem> allOrders = new ArrayList<>(); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String asnCode = receipts.stream().findFirst().get().getAsnCode(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | AsnOrder asnOrder = asnOrderMapper.selectOne(new LambdaQueryWrapper<AsnOrder>().eq(AsnOrder::getCode, asnCode)); | 
|---|
|  |  |  | AsnOrder asnOrder = asnOrderMapper.selectOne(new LambdaQueryWrapper<AsnOrder>() | 
|---|
|  |  |  | .eq(AsnOrder::getCode, asnCode)); | 
|---|
|  |  |  | if (Objects.isNull(asnOrder)) { | 
|---|
|  |  |  | throw new CoolException("数据错误:主单不存在!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | if (Objects.isNull(orderItem)) { | 
|---|
|  |  |  | throw new CoolException("通知单明细不存在!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | orderItem.setQty(dto.getReceiptQty()); | 
|---|
|  |  |  | orderItem.setQty(dto.getReceiptQty()) | 
|---|
|  |  |  | .setProdTime(dto.getProdTime()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (asnOrderItemMapper.updateById(orderItem) < 1) { | 
|---|
|  |  |  | throw new CoolException("通知单明细数量修改失败!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | WarehouseAreasItem item = new WarehouseAreasItem(); | 
|---|
|  |  |  | //            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | 
|---|
|  |  |  | //            String format = null; | 
|---|
|  |  |  | //            if (Objects.isNull(dto.getProdTime())) { | 
|---|
|  |  |  | //                 format = dateFormat.format(dto.getProdTime()); | 
|---|
|  |  |  | //            } | 
|---|
|  |  |  | item.setBarcode(dto.getBarcode()) | 
|---|
|  |  |  | .setAreaName(areasItem.getName()) | 
|---|
|  |  |  | .setAreaId(areasItem.getId()) | 
|---|
|  |  |  | .setProdTime(dto.getProdTime()) | 
|---|
|  |  |  | .setWeight(dto.getWeigth()) | 
|---|
|  |  |  | .setStockUnit(dto.getStockUnit()) | 
|---|
|  |  |  | .setBatch(SerialRuleUtils.generateRuleCode(SerialRuleCode.SYS_RECEIPT_BATCH, dto)) | 
|---|
|  |  |  | .setAnfme(dto.getReceiptQty()) | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | List<AsnOrderItem> asnOrderItem = asnOrderItemMapper.selectList(new LambdaQueryWrapper<AsnOrderItem>() | 
|---|
|  |  |  | .eq(AsnOrderItem::getAsnCode, params.getAsnCode()) | 
|---|
|  |  |  | .eq(!Objects.isNull(params.getBarcode()) ,AsnOrderItem::getBarcode, params.getBarcode())); | 
|---|
|  |  |  | .eq(!Objects.isNull(params.getTrackCode()) ,AsnOrderItem::getTrackCode, params.getTrackCode())); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (Objects.isNull(asnOrderItem)) { | 
|---|
|  |  |  | throw new CoolException("单据明细不存在!!"); | 
|---|
|  |  |  | 
|---|
|  |  |  | return fieldsMapper.selectList(new LambdaQueryWrapper<Fields>().eq(Fields::getFlagEnable, 1).eq(Fields::getStatus, 1)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public R getDeltByCode(String code) { | 
|---|
|  |  |  | return R.ok(asnOrderItemMapper.selectOne(new LambdaQueryWrapper<AsnOrderItem>().eq(AsnOrderItem::getTrackCode, code))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @author Ryan | 
|---|
|  |  |  | * @description PDA组拖 | 
|---|
|  |  |  | * @param | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | * @time 2025/3/29 14:26 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public WaitPakin mergeItems(WaitPakinParam waitPakin) { | 
|---|
|  |  |  | return waitPakinService.mergeItems(waitPakin); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public WaitPakin unBind(WaitPakinParam param) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return waitPakinService.unBind(param); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 获取ReceiptDetlsDtos | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | 
|---|
|  |  |  | //        generator.username="sa"; | 
|---|
|  |  |  | //        generator.password="Zoneyung@zy56$"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | generator.table="man_asn_order_log"; | 
|---|
|  |  |  | generator.tableDesc="组拖档明细"; | 
|---|
|  |  |  | generator.table="man_task_log"; | 
|---|
|  |  |  | generator.tableDesc="任务工作历史档"; | 
|---|
|  |  |  | generator.packagePath="com.vincent.rsf.server.manager"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | generator.build(); | 
|---|
|  |  |  | 
|---|
|  |  |  | return asnOrderItemService.generateBarcode(orders); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:asnOrderItem:list')") | 
|---|
|  |  |  | @ApiOperation("获取订单物料明细") | 
|---|
|  |  |  | @GetMapping("/asnOrderItem/trackCode/{code}") | 
|---|
|  |  |  | public R getItemByTrackCode(@PathVariable String code) { | 
|---|
|  |  |  | return R.ok(asnOrderItemService.getOne(new LambdaQueryWrapper<AsnOrderItem>().eq(AsnOrderItem::getTrackCode, code))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ASN单据明细导入 | 
|---|
|  |  |  | * @param file | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.controller; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.Cools; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.R; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.utils.ExcelUtil; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.annotation.OperationLog; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.domain.BaseParam; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.domain.KeyValVo; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.domain.PageParam; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.Task; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.TaskService; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.controller.BaseController; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.security.access.prepost.PreAuthorize; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.servlet.http.HttpServletResponse; | 
|---|
|  |  |  | import java.util.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | public class TaskController extends BaseController { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private TaskService taskService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:task:list')") | 
|---|
|  |  |  | @PostMapping("/task/page") | 
|---|
|  |  |  | public R page(@RequestBody Map<String, Object> map) { | 
|---|
|  |  |  | BaseParam baseParam = buildParam(map, BaseParam.class); | 
|---|
|  |  |  | PageParam<Task, BaseParam> pageParam = new PageParam<>(baseParam, Task.class); | 
|---|
|  |  |  | return R.ok().add(taskService.page(pageParam, pageParam.buildWrapper(true))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:task:list')") | 
|---|
|  |  |  | @PostMapping("/task/list") | 
|---|
|  |  |  | public R list(@RequestBody Map<String, Object> map) { | 
|---|
|  |  |  | return R.ok().add(taskService.list()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:task:list')") | 
|---|
|  |  |  | @PostMapping({"/task/many/{ids}", "/tasks/many/{ids}"}) | 
|---|
|  |  |  | public R many(@PathVariable Long[] ids) { | 
|---|
|  |  |  | return R.ok().add(taskService.listByIds(Arrays.asList(ids))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:task:list')") | 
|---|
|  |  |  | @GetMapping("/task/{id}") | 
|---|
|  |  |  | public R get(@PathVariable("id") Long id) { | 
|---|
|  |  |  | return R.ok().add(taskService.getById(id)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:task:save')") | 
|---|
|  |  |  | @OperationLog("Create 任务工作档") | 
|---|
|  |  |  | @PostMapping("/task/save") | 
|---|
|  |  |  | public R save(@RequestBody Task task) { | 
|---|
|  |  |  | task.setCreateBy(getLoginUserId()); | 
|---|
|  |  |  | task.setCreateTime(new Date()); | 
|---|
|  |  |  | task.setUpdateBy(getLoginUserId()); | 
|---|
|  |  |  | task.setUpdateTime(new Date()); | 
|---|
|  |  |  | if (!taskService.save(task)) { | 
|---|
|  |  |  | return R.error("Save Fail"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok("Save Success").add(task); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:task:update')") | 
|---|
|  |  |  | @OperationLog("Update 任务工作档") | 
|---|
|  |  |  | @PostMapping("/task/update") | 
|---|
|  |  |  | public R update(@RequestBody Task task) { | 
|---|
|  |  |  | task.setUpdateBy(getLoginUserId()); | 
|---|
|  |  |  | task.setUpdateTime(new Date()); | 
|---|
|  |  |  | if (!taskService.updateById(task)) { | 
|---|
|  |  |  | return R.error("Update Fail"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok("Update Success").add(task); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:task:remove')") | 
|---|
|  |  |  | @OperationLog("Delete 任务工作档") | 
|---|
|  |  |  | @PostMapping("/task/remove/{ids}") | 
|---|
|  |  |  | public R remove(@PathVariable Long[] ids) { | 
|---|
|  |  |  | if (!taskService.removeByIds(Arrays.asList(ids))) { | 
|---|
|  |  |  | return R.error("Delete Fail"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok("Delete Success").add(ids); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:task:list')") | 
|---|
|  |  |  | @PostMapping("/task/query") | 
|---|
|  |  |  | public R query(@RequestParam(required = false) String condition) { | 
|---|
|  |  |  | List<KeyValVo> vos = new ArrayList<>(); | 
|---|
|  |  |  | LambdaQueryWrapper<Task> wrapper = new LambdaQueryWrapper<>(); | 
|---|
|  |  |  | if (!Cools.isEmpty(condition)) { | 
|---|
|  |  |  | wrapper.like(Task::getId, condition); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | taskService.page(new Page<>(1, 30), wrapper).getRecords().forEach( | 
|---|
|  |  |  | item -> vos.add(new KeyValVo(item.getId(), item.getId())) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | return R.ok().add(vos); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:task:list')") | 
|---|
|  |  |  | @PostMapping("/task/export") | 
|---|
|  |  |  | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { | 
|---|
|  |  |  | ExcelUtil.build(ExcelUtil.create(taskService.list(), Task.class), response); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.controller; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.Cools; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.R; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.utils.ExcelUtil; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.annotation.OperationLog; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.domain.BaseParam; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.domain.KeyValVo; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.domain.PageParam; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.TaskItem; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.TaskItemService; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.controller.BaseController; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.security.access.prepost.PreAuthorize; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.servlet.http.HttpServletResponse; | 
|---|
|  |  |  | import java.util.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | public class TaskItemController extends BaseController { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private TaskItemService taskItemService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskItem:list')") | 
|---|
|  |  |  | @PostMapping("/taskItem/page") | 
|---|
|  |  |  | public R page(@RequestBody Map<String, Object> map) { | 
|---|
|  |  |  | BaseParam baseParam = buildParam(map, BaseParam.class); | 
|---|
|  |  |  | PageParam<TaskItem, BaseParam> pageParam = new PageParam<>(baseParam, TaskItem.class); | 
|---|
|  |  |  | return R.ok().add(taskItemService.page(pageParam, pageParam.buildWrapper(true))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskItem:list')") | 
|---|
|  |  |  | @PostMapping("/taskItem/list") | 
|---|
|  |  |  | public R list(@RequestBody Map<String, Object> map) { | 
|---|
|  |  |  | return R.ok().add(taskItemService.list()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskItem:list')") | 
|---|
|  |  |  | @PostMapping({"/taskItem/many/{ids}", "/taskItems/many/{ids}"}) | 
|---|
|  |  |  | public R many(@PathVariable Long[] ids) { | 
|---|
|  |  |  | return R.ok().add(taskItemService.listByIds(Arrays.asList(ids))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskItem:list')") | 
|---|
|  |  |  | @GetMapping("/taskItem/{id}") | 
|---|
|  |  |  | public R get(@PathVariable("id") Long id) { | 
|---|
|  |  |  | return R.ok().add(taskItemService.getById(id)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskItem:save')") | 
|---|
|  |  |  | @OperationLog("Create 任务工作档") | 
|---|
|  |  |  | @PostMapping("/taskItem/save") | 
|---|
|  |  |  | public R save(@RequestBody TaskItem taskItem) { | 
|---|
|  |  |  | taskItem.setCreateBy(getLoginUserId()); | 
|---|
|  |  |  | taskItem.setCreateTime(new Date()); | 
|---|
|  |  |  | taskItem.setUpdateBy(getLoginUserId()); | 
|---|
|  |  |  | taskItem.setUpdateTime(new Date()); | 
|---|
|  |  |  | if (!taskItemService.save(taskItem)) { | 
|---|
|  |  |  | return R.error("Save Fail"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok("Save Success").add(taskItem); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskItem:update')") | 
|---|
|  |  |  | @OperationLog("Update 任务工作档") | 
|---|
|  |  |  | @PostMapping("/taskItem/update") | 
|---|
|  |  |  | public R update(@RequestBody TaskItem taskItem) { | 
|---|
|  |  |  | taskItem.setUpdateBy(getLoginUserId()); | 
|---|
|  |  |  | taskItem.setUpdateTime(new Date()); | 
|---|
|  |  |  | if (!taskItemService.updateById(taskItem)) { | 
|---|
|  |  |  | return R.error("Update Fail"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok("Update Success").add(taskItem); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskItem:remove')") | 
|---|
|  |  |  | @OperationLog("Delete 任务工作档") | 
|---|
|  |  |  | @PostMapping("/taskItem/remove/{ids}") | 
|---|
|  |  |  | public R remove(@PathVariable Long[] ids) { | 
|---|
|  |  |  | if (!taskItemService.removeByIds(Arrays.asList(ids))) { | 
|---|
|  |  |  | return R.error("Delete Fail"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok("Delete Success").add(ids); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskItem:list')") | 
|---|
|  |  |  | @PostMapping("/taskItem/query") | 
|---|
|  |  |  | public R query(@RequestParam(required = false) String condition) { | 
|---|
|  |  |  | List<KeyValVo> vos = new ArrayList<>(); | 
|---|
|  |  |  | LambdaQueryWrapper<TaskItem> wrapper = new LambdaQueryWrapper<>(); | 
|---|
|  |  |  | if (!Cools.isEmpty(condition)) { | 
|---|
|  |  |  | wrapper.like(TaskItem::getId, condition); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | taskItemService.page(new Page<>(1, 30), wrapper).getRecords().forEach( | 
|---|
|  |  |  | item -> vos.add(new KeyValVo(item.getId(), item.getId())) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | return R.ok().add(vos); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskItem:list')") | 
|---|
|  |  |  | @PostMapping("/taskItem/export") | 
|---|
|  |  |  | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { | 
|---|
|  |  |  | ExcelUtil.build(ExcelUtil.create(taskItemService.list(), TaskItem.class), response); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.controller; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.Cools; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.R; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.utils.ExcelUtil; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.annotation.OperationLog; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.domain.BaseParam; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.domain.KeyValVo; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.domain.PageParam; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.TaskItemLog; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.TaskItemLogService; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.controller.BaseController; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.security.access.prepost.PreAuthorize; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.servlet.http.HttpServletResponse; | 
|---|
|  |  |  | import java.util.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | public class TaskItemLogController extends BaseController { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private TaskItemLogService taskItemLogService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskItemLog:list')") | 
|---|
|  |  |  | @PostMapping("/taskItemLog/page") | 
|---|
|  |  |  | public R page(@RequestBody Map<String, Object> map) { | 
|---|
|  |  |  | BaseParam baseParam = buildParam(map, BaseParam.class); | 
|---|
|  |  |  | PageParam<TaskItemLog, BaseParam> pageParam = new PageParam<>(baseParam, TaskItemLog.class); | 
|---|
|  |  |  | return R.ok().add(taskItemLogService.page(pageParam, pageParam.buildWrapper(true))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskItemLog:list')") | 
|---|
|  |  |  | @PostMapping("/taskItemLog/list") | 
|---|
|  |  |  | public R list(@RequestBody Map<String, Object> map) { | 
|---|
|  |  |  | return R.ok().add(taskItemLogService.list()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskItemLog:list')") | 
|---|
|  |  |  | @PostMapping({"/taskItemLog/many/{ids}", "/taskItemLogs/many/{ids}"}) | 
|---|
|  |  |  | public R many(@PathVariable Long[] ids) { | 
|---|
|  |  |  | return R.ok().add(taskItemLogService.listByIds(Arrays.asList(ids))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskItemLog:list')") | 
|---|
|  |  |  | @GetMapping("/taskItemLog/{id}") | 
|---|
|  |  |  | public R get(@PathVariable("id") Long id) { | 
|---|
|  |  |  | return R.ok().add(taskItemLogService.getById(id)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskItemLog:save')") | 
|---|
|  |  |  | @OperationLog("Create 任务工作历史档") | 
|---|
|  |  |  | @PostMapping("/taskItemLog/save") | 
|---|
|  |  |  | public R save(@RequestBody TaskItemLog taskItemLog) { | 
|---|
|  |  |  | taskItemLog.setCreateBy(getLoginUserId()); | 
|---|
|  |  |  | taskItemLog.setCreateTime(new Date()); | 
|---|
|  |  |  | taskItemLog.setUpdateBy(getLoginUserId()); | 
|---|
|  |  |  | taskItemLog.setUpdateTime(new Date()); | 
|---|
|  |  |  | if (!taskItemLogService.save(taskItemLog)) { | 
|---|
|  |  |  | return R.error("Save Fail"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok("Save Success").add(taskItemLog); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskItemLog:update')") | 
|---|
|  |  |  | @OperationLog("Update 任务工作历史档") | 
|---|
|  |  |  | @PostMapping("/taskItemLog/update") | 
|---|
|  |  |  | public R update(@RequestBody TaskItemLog taskItemLog) { | 
|---|
|  |  |  | taskItemLog.setUpdateBy(getLoginUserId()); | 
|---|
|  |  |  | taskItemLog.setUpdateTime(new Date()); | 
|---|
|  |  |  | if (!taskItemLogService.updateById(taskItemLog)) { | 
|---|
|  |  |  | return R.error("Update Fail"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok("Update Success").add(taskItemLog); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskItemLog:remove')") | 
|---|
|  |  |  | @OperationLog("Delete 任务工作历史档") | 
|---|
|  |  |  | @PostMapping("/taskItemLog/remove/{ids}") | 
|---|
|  |  |  | public R remove(@PathVariable Long[] ids) { | 
|---|
|  |  |  | if (!taskItemLogService.removeByIds(Arrays.asList(ids))) { | 
|---|
|  |  |  | return R.error("Delete Fail"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok("Delete Success").add(ids); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskItemLog:list')") | 
|---|
|  |  |  | @PostMapping("/taskItemLog/query") | 
|---|
|  |  |  | public R query(@RequestParam(required = false) String condition) { | 
|---|
|  |  |  | List<KeyValVo> vos = new ArrayList<>(); | 
|---|
|  |  |  | LambdaQueryWrapper<TaskItemLog> wrapper = new LambdaQueryWrapper<>(); | 
|---|
|  |  |  | if (!Cools.isEmpty(condition)) { | 
|---|
|  |  |  | wrapper.like(TaskItemLog::getId, condition); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | taskItemLogService.page(new Page<>(1, 30), wrapper).getRecords().forEach( | 
|---|
|  |  |  | item -> vos.add(new KeyValVo(item.getId(), item.getId())) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | return R.ok().add(vos); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskItemLog:list')") | 
|---|
|  |  |  | @PostMapping("/taskItemLog/export") | 
|---|
|  |  |  | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { | 
|---|
|  |  |  | ExcelUtil.build(ExcelUtil.create(taskItemLogService.list(), TaskItemLog.class), response); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.controller; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.Cools; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.R; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.utils.ExcelUtil; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.annotation.OperationLog; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.domain.BaseParam; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.domain.KeyValVo; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.domain.PageParam; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.TaskLog; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.TaskLogService; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.controller.BaseController; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.security.access.prepost.PreAuthorize; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.servlet.http.HttpServletResponse; | 
|---|
|  |  |  | import java.util.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | public class TaskLogController extends BaseController { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private TaskLogService taskLogService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskLog:list')") | 
|---|
|  |  |  | @PostMapping("/taskLog/page") | 
|---|
|  |  |  | public R page(@RequestBody Map<String, Object> map) { | 
|---|
|  |  |  | BaseParam baseParam = buildParam(map, BaseParam.class); | 
|---|
|  |  |  | PageParam<TaskLog, BaseParam> pageParam = new PageParam<>(baseParam, TaskLog.class); | 
|---|
|  |  |  | return R.ok().add(taskLogService.page(pageParam, pageParam.buildWrapper(true))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskLog:list')") | 
|---|
|  |  |  | @PostMapping("/taskLog/list") | 
|---|
|  |  |  | public R list(@RequestBody Map<String, Object> map) { | 
|---|
|  |  |  | return R.ok().add(taskLogService.list()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskLog:list')") | 
|---|
|  |  |  | @PostMapping({"/taskLog/many/{ids}", "/taskLogs/many/{ids}"}) | 
|---|
|  |  |  | public R many(@PathVariable Long[] ids) { | 
|---|
|  |  |  | return R.ok().add(taskLogService.listByIds(Arrays.asList(ids))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskLog:list')") | 
|---|
|  |  |  | @GetMapping("/taskLog/{id}") | 
|---|
|  |  |  | public R get(@PathVariable("id") Long id) { | 
|---|
|  |  |  | return R.ok().add(taskLogService.getById(id)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskLog:save')") | 
|---|
|  |  |  | @OperationLog("Create 任务工作历史档") | 
|---|
|  |  |  | @PostMapping("/taskLog/save") | 
|---|
|  |  |  | public R save(@RequestBody TaskLog taskLog) { | 
|---|
|  |  |  | taskLog.setCreateBy(getLoginUserId()); | 
|---|
|  |  |  | taskLog.setCreateTime(new Date()); | 
|---|
|  |  |  | taskLog.setUpdateBy(getLoginUserId()); | 
|---|
|  |  |  | taskLog.setUpdateTime(new Date()); | 
|---|
|  |  |  | if (!taskLogService.save(taskLog)) { | 
|---|
|  |  |  | return R.error("Save Fail"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok("Save Success").add(taskLog); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskLog:update')") | 
|---|
|  |  |  | @OperationLog("Update 任务工作历史档") | 
|---|
|  |  |  | @PostMapping("/taskLog/update") | 
|---|
|  |  |  | public R update(@RequestBody TaskLog taskLog) { | 
|---|
|  |  |  | taskLog.setUpdateBy(getLoginUserId()); | 
|---|
|  |  |  | taskLog.setUpdateTime(new Date()); | 
|---|
|  |  |  | if (!taskLogService.updateById(taskLog)) { | 
|---|
|  |  |  | return R.error("Update Fail"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok("Update Success").add(taskLog); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskLog:remove')") | 
|---|
|  |  |  | @OperationLog("Delete 任务工作历史档") | 
|---|
|  |  |  | @PostMapping("/taskLog/remove/{ids}") | 
|---|
|  |  |  | public R remove(@PathVariable Long[] ids) { | 
|---|
|  |  |  | if (!taskLogService.removeByIds(Arrays.asList(ids))) { | 
|---|
|  |  |  | return R.error("Delete Fail"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok("Delete Success").add(ids); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskLog:list')") | 
|---|
|  |  |  | @PostMapping("/taskLog/query") | 
|---|
|  |  |  | public R query(@RequestParam(required = false) String condition) { | 
|---|
|  |  |  | List<KeyValVo> vos = new ArrayList<>(); | 
|---|
|  |  |  | LambdaQueryWrapper<TaskLog> wrapper = new LambdaQueryWrapper<>(); | 
|---|
|  |  |  | if (!Cools.isEmpty(condition)) { | 
|---|
|  |  |  | wrapper.like(TaskLog::getId, condition); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | taskLogService.page(new Page<>(1, 30), wrapper).getRecords().forEach( | 
|---|
|  |  |  | item -> vos.add(new KeyValVo(item.getId(), item.getId())) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | return R.ok().add(vos); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:taskLog:list')") | 
|---|
|  |  |  | @PostMapping("/taskLog/export") | 
|---|
|  |  |  | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { | 
|---|
|  |  |  | ExcelUtil.build(ExcelUtil.create(taskLogService.list(), TaskLog.class), response); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakin:update')") | 
|---|
|  |  |  | @ApiOperation("组拖") | 
|---|
|  |  |  | @PostMapping("/waitPakin/merge") | 
|---|
|  |  |  | public R pikinOrder(@RequestBody WaitPakinParam waitPakin) { | 
|---|
|  |  |  | if (Objects.isNull(waitPakin)) { | 
|---|
|  |  |  | return R.error("参数不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (StringUtils.isBlank(waitPakin.getBarcode())) { | 
|---|
|  |  |  | return R.error("托盘码不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Objects.isNull(waitPakin.getItems()) || waitPakin.getItems().isEmpty()) { | 
|---|
|  |  |  | return R.error("跟踪码不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok(waitPakinService.mergeItems(waitPakin)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakin:update')") | 
|---|
|  |  |  | @ApiOperation("组拖解绑") | 
|---|
|  |  |  | @PostMapping("/waitPakin/unbind") | 
|---|
|  |  |  | public R pakinUnBind(@RequestBody WaitPakinParam param) { | 
|---|
|  |  |  | if (Objects.isNull(param)) { | 
|---|
|  |  |  | return R.error("参数不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (StringUtils.isBlank(param.getBarcode())) { | 
|---|
|  |  |  | return R.error("托盘码不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Objects.isNull(param.getItems()) || param.getItems().isEmpty()) { | 
|---|
|  |  |  | return R.error("跟踪码不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok(waitPakinService); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.WaitPakinItem; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.WaitPakinItemService; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.controller.BaseController; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.security.access.prepost.PreAuthorize; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  | 
|---|
|  |  |  | import javax.servlet.http.HttpServletResponse; | 
|---|
|  |  |  | import java.util.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Api(tags = "组拖档明细") | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | public class WaitPakinItemController extends BaseController { | 
|---|
|  |  |  |  | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.controller; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.Cools; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.R; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.utils.ExcelUtil; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.annotation.OperationLog; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.domain.BaseParam; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.domain.KeyValVo; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.domain.PageParam; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.WaitPakinItemLog; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.WaitPakinItemLogService; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.controller.BaseController; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.security.access.prepost.PreAuthorize; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.servlet.http.HttpServletResponse; | 
|---|
|  |  |  | import java.util.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | public class WaitPakinItemLogController extends BaseController { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private WaitPakinItemLogService waitPakinItemLogService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakinItemLog:list')") | 
|---|
|  |  |  | @PostMapping("/waitPakinItemLog/page") | 
|---|
|  |  |  | public R page(@RequestBody Map<String, Object> map) { | 
|---|
|  |  |  | BaseParam baseParam = buildParam(map, BaseParam.class); | 
|---|
|  |  |  | PageParam<WaitPakinItemLog, BaseParam> pageParam = new PageParam<>(baseParam, WaitPakinItemLog.class); | 
|---|
|  |  |  | return R.ok().add(waitPakinItemLogService.page(pageParam, pageParam.buildWrapper(true))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakinItemLog:list')") | 
|---|
|  |  |  | @PostMapping("/waitPakinItemLog/list") | 
|---|
|  |  |  | public R list(@RequestBody Map<String, Object> map) { | 
|---|
|  |  |  | return R.ok().add(waitPakinItemLogService.list()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakinItemLog:list')") | 
|---|
|  |  |  | @PostMapping({"/waitPakinItemLog/many/{ids}", "/waitPakinItemLogs/many/{ids}"}) | 
|---|
|  |  |  | public R many(@PathVariable Long[] ids) { | 
|---|
|  |  |  | return R.ok().add(waitPakinItemLogService.listByIds(Arrays.asList(ids))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakinItemLog:list')") | 
|---|
|  |  |  | @GetMapping("/waitPakinItemLog/{id}") | 
|---|
|  |  |  | public R get(@PathVariable("id") Long id) { | 
|---|
|  |  |  | return R.ok().add(waitPakinItemLogService.getById(id)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakinItemLog:save')") | 
|---|
|  |  |  | @OperationLog("Create 组拖明细历史档") | 
|---|
|  |  |  | @PostMapping("/waitPakinItemLog/save") | 
|---|
|  |  |  | public R save(@RequestBody WaitPakinItemLog waitPakinItemLog) { | 
|---|
|  |  |  | waitPakinItemLog.setCreateBy(getLoginUserId()); | 
|---|
|  |  |  | waitPakinItemLog.setCreateTime(new Date()); | 
|---|
|  |  |  | waitPakinItemLog.setUpdateBy(getLoginUserId()); | 
|---|
|  |  |  | waitPakinItemLog.setUpdateTime(new Date()); | 
|---|
|  |  |  | if (!waitPakinItemLogService.save(waitPakinItemLog)) { | 
|---|
|  |  |  | return R.error("Save Fail"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok("Save Success").add(waitPakinItemLog); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakinItemLog:update')") | 
|---|
|  |  |  | @OperationLog("Update 组拖明细历史档") | 
|---|
|  |  |  | @PostMapping("/waitPakinItemLog/update") | 
|---|
|  |  |  | public R update(@RequestBody WaitPakinItemLog waitPakinItemLog) { | 
|---|
|  |  |  | waitPakinItemLog.setUpdateBy(getLoginUserId()); | 
|---|
|  |  |  | waitPakinItemLog.setUpdateTime(new Date()); | 
|---|
|  |  |  | if (!waitPakinItemLogService.updateById(waitPakinItemLog)) { | 
|---|
|  |  |  | return R.error("Update Fail"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok("Update Success").add(waitPakinItemLog); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakinItemLog:remove')") | 
|---|
|  |  |  | @OperationLog("Delete 组拖明细历史档") | 
|---|
|  |  |  | @PostMapping("/waitPakinItemLog/remove/{ids}") | 
|---|
|  |  |  | public R remove(@PathVariable Long[] ids) { | 
|---|
|  |  |  | if (!waitPakinItemLogService.removeByIds(Arrays.asList(ids))) { | 
|---|
|  |  |  | return R.error("Delete Fail"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok("Delete Success").add(ids); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakinItemLog:list')") | 
|---|
|  |  |  | @PostMapping("/waitPakinItemLog/query") | 
|---|
|  |  |  | public R query(@RequestParam(required = false) String condition) { | 
|---|
|  |  |  | List<KeyValVo> vos = new ArrayList<>(); | 
|---|
|  |  |  | LambdaQueryWrapper<WaitPakinItemLog> wrapper = new LambdaQueryWrapper<>(); | 
|---|
|  |  |  | if (!Cools.isEmpty(condition)) { | 
|---|
|  |  |  | wrapper.like(WaitPakinItemLog::getId, condition); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | waitPakinItemLogService.page(new Page<>(1, 30), wrapper).getRecords().forEach( | 
|---|
|  |  |  | item -> vos.add(new KeyValVo(item.getId(), item.getId())) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | return R.ok().add(vos); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakinItemLog:list')") | 
|---|
|  |  |  | @PostMapping("/waitPakinItemLog/export") | 
|---|
|  |  |  | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { | 
|---|
|  |  |  | ExcelUtil.build(ExcelUtil.create(waitPakinItemLogService.list(), WaitPakinItemLog.class), response); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.controller; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.Cools; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.R; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.utils.ExcelUtil; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.annotation.OperationLog; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.domain.BaseParam; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.domain.KeyValVo; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.domain.PageParam; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.WaitPakinLog; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.WaitPakinLogService; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.controller.BaseController; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.security.access.prepost.PreAuthorize; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.servlet.http.HttpServletResponse; | 
|---|
|  |  |  | import java.util.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | public class WaitPakinLogController extends BaseController { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private WaitPakinLogService waitPakinLogService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakinLog:list')") | 
|---|
|  |  |  | @PostMapping("/waitPakinLog/page") | 
|---|
|  |  |  | public R page(@RequestBody Map<String, Object> map) { | 
|---|
|  |  |  | BaseParam baseParam = buildParam(map, BaseParam.class); | 
|---|
|  |  |  | PageParam<WaitPakinLog, BaseParam> pageParam = new PageParam<>(baseParam, WaitPakinLog.class); | 
|---|
|  |  |  | return R.ok().add(waitPakinLogService.page(pageParam, pageParam.buildWrapper(true))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakinLog:list')") | 
|---|
|  |  |  | @PostMapping("/waitPakinLog/list") | 
|---|
|  |  |  | public R list(@RequestBody Map<String, Object> map) { | 
|---|
|  |  |  | return R.ok().add(waitPakinLogService.list()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakinLog:list')") | 
|---|
|  |  |  | @PostMapping({"/waitPakinLog/many/{ids}", "/waitPakinLogs/many/{ids}"}) | 
|---|
|  |  |  | public R many(@PathVariable Long[] ids) { | 
|---|
|  |  |  | return R.ok().add(waitPakinLogService.listByIds(Arrays.asList(ids))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakinLog:list')") | 
|---|
|  |  |  | @GetMapping("/waitPakinLog/{id}") | 
|---|
|  |  |  | public R get(@PathVariable("id") Long id) { | 
|---|
|  |  |  | return R.ok().add(waitPakinLogService.getById(id)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakinLog:save')") | 
|---|
|  |  |  | @OperationLog("Create 组拖历史档") | 
|---|
|  |  |  | @PostMapping("/waitPakinLog/save") | 
|---|
|  |  |  | public R save(@RequestBody WaitPakinLog waitPakinLog) { | 
|---|
|  |  |  | waitPakinLog.setCreateBy(getLoginUserId()); | 
|---|
|  |  |  | waitPakinLog.setCreateTime(new Date()); | 
|---|
|  |  |  | waitPakinLog.setUpdateBy(getLoginUserId()); | 
|---|
|  |  |  | waitPakinLog.setUpdateTime(new Date()); | 
|---|
|  |  |  | if (!waitPakinLogService.save(waitPakinLog)) { | 
|---|
|  |  |  | return R.error("Save Fail"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok("Save Success").add(waitPakinLog); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakinLog:update')") | 
|---|
|  |  |  | @OperationLog("Update 组拖历史档") | 
|---|
|  |  |  | @PostMapping("/waitPakinLog/update") | 
|---|
|  |  |  | public R update(@RequestBody WaitPakinLog waitPakinLog) { | 
|---|
|  |  |  | waitPakinLog.setUpdateBy(getLoginUserId()); | 
|---|
|  |  |  | waitPakinLog.setUpdateTime(new Date()); | 
|---|
|  |  |  | if (!waitPakinLogService.updateById(waitPakinLog)) { | 
|---|
|  |  |  | return R.error("Update Fail"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok("Update Success").add(waitPakinLog); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakinLog:remove')") | 
|---|
|  |  |  | @OperationLog("Delete 组拖历史档") | 
|---|
|  |  |  | @PostMapping("/waitPakinLog/remove/{ids}") | 
|---|
|  |  |  | public R remove(@PathVariable Long[] ids) { | 
|---|
|  |  |  | if (!waitPakinLogService.removeByIds(Arrays.asList(ids))) { | 
|---|
|  |  |  | return R.error("Delete Fail"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok("Delete Success").add(ids); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakinLog:list')") | 
|---|
|  |  |  | @PostMapping("/waitPakinLog/query") | 
|---|
|  |  |  | public R query(@RequestParam(required = false) String condition) { | 
|---|
|  |  |  | List<KeyValVo> vos = new ArrayList<>(); | 
|---|
|  |  |  | LambdaQueryWrapper<WaitPakinLog> wrapper = new LambdaQueryWrapper<>(); | 
|---|
|  |  |  | if (!Cools.isEmpty(condition)) { | 
|---|
|  |  |  | wrapper.like(WaitPakinLog::getId, condition); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | waitPakinLogService.page(new Page<>(1, 30), wrapper).getRecords().forEach( | 
|---|
|  |  |  | item -> vos.add(new KeyValVo(item.getId(), item.getId())) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | return R.ok().add(vos); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('manager:waitPakinLog:list')") | 
|---|
|  |  |  | @PostMapping("/waitPakinLog/export") | 
|---|
|  |  |  | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { | 
|---|
|  |  |  | ExcelUtil.build(ExcelUtil.create(waitPakinLogService.list(), WaitPakinLog.class), response); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | private Double qty; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 生产日期 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty("生产日期") | 
|---|
|  |  |  | private String prodTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 供应商编码 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "供应商编码") | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.entity; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  | import org.springframework.format.annotation.DateTimeFormat; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableLogic; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.IdType; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableId; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableLogic; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableName; | 
|---|
|  |  |  | import io.swagger.annotations.ApiModel; | 
|---|
|  |  |  | import io.swagger.annotations.ApiModelProperty; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.Cools; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.SpringUtils; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.service.UserService; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.entity.User; | 
|---|
|  |  |  | import java.io.Serializable; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | @TableName("man_task") | 
|---|
|  |  |  | public class Task implements Serializable { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private static final long serialVersionUID = 1L; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "ID") | 
|---|
|  |  |  | @TableId(value = "id", type = IdType.AUTO) | 
|---|
|  |  |  | private Long id; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 任务号 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "任务号") | 
|---|
|  |  |  | private String taskCode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 任务状态 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "任务状态") | 
|---|
|  |  |  | private Short taskStatus; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 任务类型 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "任务类型") | 
|---|
|  |  |  | private Short taskType; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 源库位 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "源库位") | 
|---|
|  |  |  | private String orgLoc; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 目标库位 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "目标库位") | 
|---|
|  |  |  | private String targLoc; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 托盘码 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "托盘码") | 
|---|
|  |  |  | private String barcode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 机器人编码 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "机器人编码") | 
|---|
|  |  |  | private String robotCode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 执行状态 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "执行状态") | 
|---|
|  |  |  | private Short exceStatus; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 异常描述 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "异常描述") | 
|---|
|  |  |  | private String expDesc; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 优先级 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "优先级") | 
|---|
|  |  |  | private Short sort; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 异常编码 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "异常编码") | 
|---|
|  |  |  | private String expCode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 开始时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "开始时间") | 
|---|
|  |  |  | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date startTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 结束时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "结束时间") | 
|---|
|  |  |  | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date endTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 状态 1: 正常  0: 冻结 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "状态 1: 正常  0: 冻结  ") | 
|---|
|  |  |  | private Integer status; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 是否删除 1: 是  0: 否 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "是否删除 1: 是  0: 否  ") | 
|---|
|  |  |  | @TableLogic | 
|---|
|  |  |  | private Integer deleted; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 租户 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "租户") | 
|---|
|  |  |  | private Integer tenantId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 添加人员 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "添加人员") | 
|---|
|  |  |  | private Long createBy; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 添加时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "添加时间") | 
|---|
|  |  |  | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date createTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 修改人员 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "修改人员") | 
|---|
|  |  |  | private Long updateBy; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 修改时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "修改时间") | 
|---|
|  |  |  | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date updateTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 备注 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "备注") | 
|---|
|  |  |  | private String memo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public Task() {} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public Task(String taskCode,Short taskStatus,Short taskType,String orgLoc,String targLoc,String barcode,String robotCode,Short exceStatus,String expDesc,Short sort,String expCode,Date startTime,Date endTime,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { | 
|---|
|  |  |  | this.taskCode = taskCode; | 
|---|
|  |  |  | this.taskStatus = taskStatus; | 
|---|
|  |  |  | this.taskType = taskType; | 
|---|
|  |  |  | this.orgLoc = orgLoc; | 
|---|
|  |  |  | this.targLoc = targLoc; | 
|---|
|  |  |  | this.barcode = barcode; | 
|---|
|  |  |  | this.robotCode = robotCode; | 
|---|
|  |  |  | this.exceStatus = exceStatus; | 
|---|
|  |  |  | this.expDesc = expDesc; | 
|---|
|  |  |  | this.sort = sort; | 
|---|
|  |  |  | this.expCode = expCode; | 
|---|
|  |  |  | this.startTime = startTime; | 
|---|
|  |  |  | this.endTime = endTime; | 
|---|
|  |  |  | this.status = status; | 
|---|
|  |  |  | this.deleted = deleted; | 
|---|
|  |  |  | this.tenantId = tenantId; | 
|---|
|  |  |  | this.createBy = createBy; | 
|---|
|  |  |  | this.createTime = createTime; | 
|---|
|  |  |  | this.updateBy = updateBy; | 
|---|
|  |  |  | this.updateTime = updateTime; | 
|---|
|  |  |  | this.memo = memo; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //    Task task = new Task( | 
|---|
|  |  |  | //            null,    // 任务号 | 
|---|
|  |  |  | //            null,    // 任务状态 | 
|---|
|  |  |  | //            null,    // 任务类型 | 
|---|
|  |  |  | //            null,    // 源库位 | 
|---|
|  |  |  | //            null,    // 目标库位 | 
|---|
|  |  |  | //            null,    // 托盘码 | 
|---|
|  |  |  | //            null,    // 机器人编码 | 
|---|
|  |  |  | //            null,    // 执行状态 | 
|---|
|  |  |  | //            null,    // 异常描述 | 
|---|
|  |  |  | //            null,    // 优先级 | 
|---|
|  |  |  | //            null,    // 异常编码 | 
|---|
|  |  |  | //            null,    // 开始时间 | 
|---|
|  |  |  | //            null,    // 结束时间 | 
|---|
|  |  |  | //            null,    // 状态[非空] | 
|---|
|  |  |  | //            null,    // 是否删除[非空] | 
|---|
|  |  |  | //            null,    // 租户 | 
|---|
|  |  |  | //            null,    // 添加人员 | 
|---|
|  |  |  | //            null,    // 添加时间[非空] | 
|---|
|  |  |  | //            null,    // 修改人员 | 
|---|
|  |  |  | //            null,    // 修改时间[非空] | 
|---|
|  |  |  | //            null    // 备注 | 
|---|
|  |  |  | //    ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getStartTime$(){ | 
|---|
|  |  |  | if (Cools.isEmpty(this.startTime)){ | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.startTime); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getEndTime$(){ | 
|---|
|  |  |  | if (Cools.isEmpty(this.endTime)){ | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.endTime); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getStatus$(){ | 
|---|
|  |  |  | if (null == this.status){ return null; } | 
|---|
|  |  |  | switch (this.status){ | 
|---|
|  |  |  | case 1: | 
|---|
|  |  |  | return "正常"; | 
|---|
|  |  |  | case 0: | 
|---|
|  |  |  | return "冻结"; | 
|---|
|  |  |  | default: | 
|---|
|  |  |  | return String.valueOf(this.status); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getCreateBy$(){ | 
|---|
|  |  |  | UserService service = SpringUtils.getBean(UserService.class); | 
|---|
|  |  |  | User user = service.getById(this.createBy); | 
|---|
|  |  |  | if (!Cools.isEmpty(user)){ | 
|---|
|  |  |  | return String.valueOf(user.getNickname()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getCreateTime$(){ | 
|---|
|  |  |  | if (Cools.isEmpty(this.createTime)){ | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getUpdateBy$(){ | 
|---|
|  |  |  | UserService service = SpringUtils.getBean(UserService.class); | 
|---|
|  |  |  | User user = service.getById(this.updateBy); | 
|---|
|  |  |  | if (!Cools.isEmpty(user)){ | 
|---|
|  |  |  | return String.valueOf(user.getNickname()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getUpdateTime$(){ | 
|---|
|  |  |  | if (Cools.isEmpty(this.updateTime)){ | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public Boolean getStatusBool(){ | 
|---|
|  |  |  | if (null == this.status){ return null; } | 
|---|
|  |  |  | switch (this.status){ | 
|---|
|  |  |  | case 1: | 
|---|
|  |  |  | return true; | 
|---|
|  |  |  | case 0: | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | default: | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.entity; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableLogic; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  | import org.springframework.format.annotation.DateTimeFormat; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.IdType; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableId; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableLogic; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableName; | 
|---|
|  |  |  | import io.swagger.annotations.ApiModel; | 
|---|
|  |  |  | import io.swagger.annotations.ApiModelProperty; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.Cools; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.SpringUtils; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.service.UserService; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.entity.User; | 
|---|
|  |  |  | import java.io.Serializable; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | @TableName("man_task_item") | 
|---|
|  |  |  | public class TaskItem implements Serializable { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private static final long serialVersionUID = 1L; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "ID") | 
|---|
|  |  |  | @TableId(value = "id", type = IdType.AUTO) | 
|---|
|  |  |  | private Long id; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 主单ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "主单ID") | 
|---|
|  |  |  | private Long taskId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 物料ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "物料ID") | 
|---|
|  |  |  | private Long matnrId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 物料名称 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "物料名称") | 
|---|
|  |  |  | private String maktx; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 物料编码 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "物料编码") | 
|---|
|  |  |  | private String matnrCode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 库存单位 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "库存单位") | 
|---|
|  |  |  | private String unit; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 数量 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "数量") | 
|---|
|  |  |  | private Double anfme; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 库存批次 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "库存批次") | 
|---|
|  |  |  | private String batch; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 规格 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "规格") | 
|---|
|  |  |  | private String spec; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 型号 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "型号") | 
|---|
|  |  |  | private String model; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 字段索引 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "字段索引") | 
|---|
|  |  |  | private String fieldsIndex; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 状态 1: 正常  0: 冻结 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "状态 1: 正常  0: 冻结  ") | 
|---|
|  |  |  | private Integer status; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 是否删除 1: 是  0: 否 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "是否删除 1: 是  0: 否  ") | 
|---|
|  |  |  | @TableLogic | 
|---|
|  |  |  | private Integer deleted; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 租户 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "租户") | 
|---|
|  |  |  | private Integer tenantId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 添加人员 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "添加人员") | 
|---|
|  |  |  | private Long createBy; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 添加时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "添加时间") | 
|---|
|  |  |  | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date createTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 修改人员 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "修改人员") | 
|---|
|  |  |  | private Long updateBy; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 修改时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "修改时间") | 
|---|
|  |  |  | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date updateTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 备注 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "备注") | 
|---|
|  |  |  | private String memo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public TaskItem() {} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public TaskItem(Long taskId,Long matnrId,String maktx,String matnrCode,String unit,Double anfme,String batch,String spec,String model,String fieldsIndex,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { | 
|---|
|  |  |  | this.taskId = taskId; | 
|---|
|  |  |  | this.matnrId = matnrId; | 
|---|
|  |  |  | this.maktx = maktx; | 
|---|
|  |  |  | this.matnrCode = matnrCode; | 
|---|
|  |  |  | this.unit = unit; | 
|---|
|  |  |  | this.anfme = anfme; | 
|---|
|  |  |  | this.batch = batch; | 
|---|
|  |  |  | this.spec = spec; | 
|---|
|  |  |  | this.model = model; | 
|---|
|  |  |  | this.fieldsIndex = fieldsIndex; | 
|---|
|  |  |  | this.status = status; | 
|---|
|  |  |  | this.deleted = deleted; | 
|---|
|  |  |  | this.tenantId = tenantId; | 
|---|
|  |  |  | this.createBy = createBy; | 
|---|
|  |  |  | this.createTime = createTime; | 
|---|
|  |  |  | this.updateBy = updateBy; | 
|---|
|  |  |  | this.updateTime = updateTime; | 
|---|
|  |  |  | this.memo = memo; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //    TaskItem taskItem = new TaskItem( | 
|---|
|  |  |  | //            null,    // 主单ID | 
|---|
|  |  |  | //            null,    // 物料ID | 
|---|
|  |  |  | //            null,    // 物料名称 | 
|---|
|  |  |  | //            null,    // 物料编码 | 
|---|
|  |  |  | //            null,    // 库存单位 | 
|---|
|  |  |  | //            null,    // 数量 | 
|---|
|  |  |  | //            null,    // 库存批次 | 
|---|
|  |  |  | //            null,    // 规格 | 
|---|
|  |  |  | //            null,    // 型号 | 
|---|
|  |  |  | //            null,    // 字段索引 | 
|---|
|  |  |  | //            null,    // 状态[非空] | 
|---|
|  |  |  | //            null,    // 是否删除[非空] | 
|---|
|  |  |  | //            null,    // 租户 | 
|---|
|  |  |  | //            null,    // 添加人员 | 
|---|
|  |  |  | //            null,    // 添加时间[非空] | 
|---|
|  |  |  | //            null,    // 修改人员 | 
|---|
|  |  |  | //            null,    // 修改时间[非空] | 
|---|
|  |  |  | //            null    // 备注 | 
|---|
|  |  |  | //    ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getStatus$(){ | 
|---|
|  |  |  | if (null == this.status){ return null; } | 
|---|
|  |  |  | switch (this.status){ | 
|---|
|  |  |  | case 1: | 
|---|
|  |  |  | return "正常"; | 
|---|
|  |  |  | case 0: | 
|---|
|  |  |  | return "冻结"; | 
|---|
|  |  |  | default: | 
|---|
|  |  |  | return String.valueOf(this.status); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getCreateBy$(){ | 
|---|
|  |  |  | UserService service = SpringUtils.getBean(UserService.class); | 
|---|
|  |  |  | User user = service.getById(this.createBy); | 
|---|
|  |  |  | if (!Cools.isEmpty(user)){ | 
|---|
|  |  |  | return String.valueOf(user.getNickname()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getCreateTime$(){ | 
|---|
|  |  |  | if (Cools.isEmpty(this.createTime)){ | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getUpdateBy$(){ | 
|---|
|  |  |  | UserService service = SpringUtils.getBean(UserService.class); | 
|---|
|  |  |  | User user = service.getById(this.updateBy); | 
|---|
|  |  |  | if (!Cools.isEmpty(user)){ | 
|---|
|  |  |  | return String.valueOf(user.getNickname()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getUpdateTime$(){ | 
|---|
|  |  |  | if (Cools.isEmpty(this.updateTime)){ | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public Boolean getStatusBool(){ | 
|---|
|  |  |  | if (null == this.status){ return null; } | 
|---|
|  |  |  | switch (this.status){ | 
|---|
|  |  |  | case 1: | 
|---|
|  |  |  | return true; | 
|---|
|  |  |  | case 0: | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | default: | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.entity; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableLogic; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  | import org.springframework.format.annotation.DateTimeFormat; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.IdType; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableId; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableLogic; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableName; | 
|---|
|  |  |  | import io.swagger.annotations.ApiModel; | 
|---|
|  |  |  | import io.swagger.annotations.ApiModelProperty; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.Cools; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.SpringUtils; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.service.UserService; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.entity.User; | 
|---|
|  |  |  | import java.io.Serializable; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | @TableName("man_task_item_log") | 
|---|
|  |  |  | public class TaskItemLog implements Serializable { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private static final long serialVersionUID = 1L; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "ID") | 
|---|
|  |  |  | @TableId(value = "id", type = IdType.AUTO) | 
|---|
|  |  |  | private Long id; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 主单ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "主单ID") | 
|---|
|  |  |  | private Long taskId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 任务明细ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "任务明细ID") | 
|---|
|  |  |  | private Long taskItemId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 物料ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "物料ID") | 
|---|
|  |  |  | private Long matnrId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 物料名称 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "物料名称") | 
|---|
|  |  |  | private String maktx; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 物料编码 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "物料编码") | 
|---|
|  |  |  | private String matnrCode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 库存单位 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "库存单位") | 
|---|
|  |  |  | private String unit; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 数量 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "数量") | 
|---|
|  |  |  | private Double anfme; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 库存批次 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "库存批次") | 
|---|
|  |  |  | private String batch; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 规格 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "规格") | 
|---|
|  |  |  | private String spec; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 型号 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "型号") | 
|---|
|  |  |  | private String model; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 字段索引 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "字段索引") | 
|---|
|  |  |  | private String fieldsIndex; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 状态 1: 正常  0: 冻结 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "状态 1: 正常  0: 冻结  ") | 
|---|
|  |  |  | private Integer status; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 是否删除 1: 是  0: 否 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "是否删除 1: 是  0: 否  ") | 
|---|
|  |  |  | @TableLogic | 
|---|
|  |  |  | private Integer deleted; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 租户 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "租户") | 
|---|
|  |  |  | private Integer tenantId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 添加人员 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "添加人员") | 
|---|
|  |  |  | private Long createBy; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 添加时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "添加时间") | 
|---|
|  |  |  | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date createTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 修改人员 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "修改人员") | 
|---|
|  |  |  | private Long updateBy; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 修改时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "修改时间") | 
|---|
|  |  |  | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date updateTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 备注 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "备注") | 
|---|
|  |  |  | private String memo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public TaskItemLog() {} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public TaskItemLog(Long taskId,Long taskItemId,Long matnrId,String maktx,String matnrCode,String unit,Double anfme,String batch,String spec,String model,String fieldsIndex,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { | 
|---|
|  |  |  | this.taskId = taskId; | 
|---|
|  |  |  | this.taskItemId = taskItemId; | 
|---|
|  |  |  | this.matnrId = matnrId; | 
|---|
|  |  |  | this.maktx = maktx; | 
|---|
|  |  |  | this.matnrCode = matnrCode; | 
|---|
|  |  |  | this.unit = unit; | 
|---|
|  |  |  | this.anfme = anfme; | 
|---|
|  |  |  | this.batch = batch; | 
|---|
|  |  |  | this.spec = spec; | 
|---|
|  |  |  | this.model = model; | 
|---|
|  |  |  | this.fieldsIndex = fieldsIndex; | 
|---|
|  |  |  | this.status = status; | 
|---|
|  |  |  | this.deleted = deleted; | 
|---|
|  |  |  | this.tenantId = tenantId; | 
|---|
|  |  |  | this.createBy = createBy; | 
|---|
|  |  |  | this.createTime = createTime; | 
|---|
|  |  |  | this.updateBy = updateBy; | 
|---|
|  |  |  | this.updateTime = updateTime; | 
|---|
|  |  |  | this.memo = memo; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //    TaskItemLog taskItemLog = new TaskItemLog( | 
|---|
|  |  |  | //            null,    // 主单ID | 
|---|
|  |  |  | //            null,    // 任务明细ID | 
|---|
|  |  |  | //            null,    // 物料ID | 
|---|
|  |  |  | //            null,    // 物料名称 | 
|---|
|  |  |  | //            null,    // 物料编码 | 
|---|
|  |  |  | //            null,    // 库存单位 | 
|---|
|  |  |  | //            null,    // 数量 | 
|---|
|  |  |  | //            null,    // 库存批次 | 
|---|
|  |  |  | //            null,    // 规格 | 
|---|
|  |  |  | //            null,    // 型号 | 
|---|
|  |  |  | //            null,    // 字段索引 | 
|---|
|  |  |  | //            null,    // 状态[非空] | 
|---|
|  |  |  | //            null,    // 是否删除[非空] | 
|---|
|  |  |  | //            null,    // 租户 | 
|---|
|  |  |  | //            null,    // 添加人员 | 
|---|
|  |  |  | //            null,    // 添加时间[非空] | 
|---|
|  |  |  | //            null,    // 修改人员 | 
|---|
|  |  |  | //            null,    // 修改时间[非空] | 
|---|
|  |  |  | //            null    // 备注 | 
|---|
|  |  |  | //    ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getStatus$(){ | 
|---|
|  |  |  | if (null == this.status){ return null; } | 
|---|
|  |  |  | switch (this.status){ | 
|---|
|  |  |  | case 1: | 
|---|
|  |  |  | return "正常"; | 
|---|
|  |  |  | case 0: | 
|---|
|  |  |  | return "冻结"; | 
|---|
|  |  |  | default: | 
|---|
|  |  |  | return String.valueOf(this.status); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getCreateBy$(){ | 
|---|
|  |  |  | UserService service = SpringUtils.getBean(UserService.class); | 
|---|
|  |  |  | User user = service.getById(this.createBy); | 
|---|
|  |  |  | if (!Cools.isEmpty(user)){ | 
|---|
|  |  |  | return String.valueOf(user.getNickname()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getCreateTime$(){ | 
|---|
|  |  |  | if (Cools.isEmpty(this.createTime)){ | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getUpdateBy$(){ | 
|---|
|  |  |  | UserService service = SpringUtils.getBean(UserService.class); | 
|---|
|  |  |  | User user = service.getById(this.updateBy); | 
|---|
|  |  |  | if (!Cools.isEmpty(user)){ | 
|---|
|  |  |  | return String.valueOf(user.getNickname()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getUpdateTime$(){ | 
|---|
|  |  |  | if (Cools.isEmpty(this.updateTime)){ | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public Boolean getStatusBool(){ | 
|---|
|  |  |  | if (null == this.status){ return null; } | 
|---|
|  |  |  | switch (this.status){ | 
|---|
|  |  |  | case 1: | 
|---|
|  |  |  | return true; | 
|---|
|  |  |  | case 0: | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | default: | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.entity; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  | import org.springframework.format.annotation.DateTimeFormat; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableLogic; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.IdType; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableId; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableLogic; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableName; | 
|---|
|  |  |  | import io.swagger.annotations.ApiModel; | 
|---|
|  |  |  | import io.swagger.annotations.ApiModelProperty; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.Cools; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.SpringUtils; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.service.UserService; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.entity.User; | 
|---|
|  |  |  | import java.io.Serializable; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | @TableName("man_task_log") | 
|---|
|  |  |  | public class TaskLog implements Serializable { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private static final long serialVersionUID = 1L; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "ID") | 
|---|
|  |  |  | @TableId(value = "id", type = IdType.AUTO) | 
|---|
|  |  |  | private Long id; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 任务ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "任务ID") | 
|---|
|  |  |  | private Long taskId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 任务号 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "任务号") | 
|---|
|  |  |  | private String taskCode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 任务状态 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "任务状态") | 
|---|
|  |  |  | private Short taskStatus; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 任务类型 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "任务类型") | 
|---|
|  |  |  | private Short taskType; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 源库位 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "源库位") | 
|---|
|  |  |  | private String orgLoc; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 目标库位 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "目标库位") | 
|---|
|  |  |  | private String targLoc; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 托盘码 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "托盘码") | 
|---|
|  |  |  | private String barcode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 机器人编码 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "机器人编码") | 
|---|
|  |  |  | private String robotCode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 执行状态 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "执行状态") | 
|---|
|  |  |  | private Short exceStatus; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 异常描述 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "异常描述") | 
|---|
|  |  |  | private String expDesc; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 优先级 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "优先级") | 
|---|
|  |  |  | private Short sort; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 异常编码 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "异常编码") | 
|---|
|  |  |  | private String expCode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 开始时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "开始时间") | 
|---|
|  |  |  | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date startTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 结束时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "结束时间") | 
|---|
|  |  |  | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date endTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 状态 1: 正常  0: 冻结 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "状态 1: 正常  0: 冻结  ") | 
|---|
|  |  |  | private Integer status; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 是否删除 1: 是  0: 否 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "是否删除 1: 是  0: 否  ") | 
|---|
|  |  |  | @TableLogic | 
|---|
|  |  |  | private Integer deleted; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 租户 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "租户") | 
|---|
|  |  |  | private Integer tenantId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 添加人员 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "添加人员") | 
|---|
|  |  |  | private Long createBy; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 添加时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "添加时间") | 
|---|
|  |  |  | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date createTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 修改人员 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "修改人员") | 
|---|
|  |  |  | private Long updateBy; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 修改时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "修改时间") | 
|---|
|  |  |  | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date updateTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 备注 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "备注") | 
|---|
|  |  |  | private String memo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public TaskLog() {} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public TaskLog(Long taskId,String taskCode,Short taskStatus,Short taskType,String orgLoc,String targLoc,String barcode,String robotCode,Short exceStatus,String expDesc,Short sort,String expCode,Date startTime,Date endTime,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { | 
|---|
|  |  |  | this.taskId = taskId; | 
|---|
|  |  |  | this.taskCode = taskCode; | 
|---|
|  |  |  | this.taskStatus = taskStatus; | 
|---|
|  |  |  | this.taskType = taskType; | 
|---|
|  |  |  | this.orgLoc = orgLoc; | 
|---|
|  |  |  | this.targLoc = targLoc; | 
|---|
|  |  |  | this.barcode = barcode; | 
|---|
|  |  |  | this.robotCode = robotCode; | 
|---|
|  |  |  | this.exceStatus = exceStatus; | 
|---|
|  |  |  | this.expDesc = expDesc; | 
|---|
|  |  |  | this.sort = sort; | 
|---|
|  |  |  | this.expCode = expCode; | 
|---|
|  |  |  | this.startTime = startTime; | 
|---|
|  |  |  | this.endTime = endTime; | 
|---|
|  |  |  | this.status = status; | 
|---|
|  |  |  | this.deleted = deleted; | 
|---|
|  |  |  | this.tenantId = tenantId; | 
|---|
|  |  |  | this.createBy = createBy; | 
|---|
|  |  |  | this.createTime = createTime; | 
|---|
|  |  |  | this.updateBy = updateBy; | 
|---|
|  |  |  | this.updateTime = updateTime; | 
|---|
|  |  |  | this.memo = memo; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //    TaskLog taskLog = new TaskLog( | 
|---|
|  |  |  | //            null,    // 任务ID | 
|---|
|  |  |  | //            null,    // 任务号 | 
|---|
|  |  |  | //            null,    // 任务状态 | 
|---|
|  |  |  | //            null,    // 任务类型 | 
|---|
|  |  |  | //            null,    // 源库位 | 
|---|
|  |  |  | //            null,    // 目标库位 | 
|---|
|  |  |  | //            null,    // 托盘码 | 
|---|
|  |  |  | //            null,    // 机器人编码 | 
|---|
|  |  |  | //            null,    // 执行状态 | 
|---|
|  |  |  | //            null,    // 异常描述 | 
|---|
|  |  |  | //            null,    // 优先级 | 
|---|
|  |  |  | //            null,    // 异常编码 | 
|---|
|  |  |  | //            null,    // 开始时间 | 
|---|
|  |  |  | //            null,    // 结束时间 | 
|---|
|  |  |  | //            null,    // 状态[非空] | 
|---|
|  |  |  | //            null,    // 是否删除[非空] | 
|---|
|  |  |  | //            null,    // 租户 | 
|---|
|  |  |  | //            null,    // 添加人员 | 
|---|
|  |  |  | //            null,    // 添加时间[非空] | 
|---|
|  |  |  | //            null,    // 修改人员 | 
|---|
|  |  |  | //            null,    // 修改时间[非空] | 
|---|
|  |  |  | //            null    // 备注 | 
|---|
|  |  |  | //    ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getStartTime$(){ | 
|---|
|  |  |  | if (Cools.isEmpty(this.startTime)){ | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.startTime); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getEndTime$(){ | 
|---|
|  |  |  | if (Cools.isEmpty(this.endTime)){ | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.endTime); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getStatus$(){ | 
|---|
|  |  |  | if (null == this.status){ return null; } | 
|---|
|  |  |  | switch (this.status){ | 
|---|
|  |  |  | case 1: | 
|---|
|  |  |  | return "正常"; | 
|---|
|  |  |  | case 0: | 
|---|
|  |  |  | return "冻结"; | 
|---|
|  |  |  | default: | 
|---|
|  |  |  | return String.valueOf(this.status); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getCreateBy$(){ | 
|---|
|  |  |  | UserService service = SpringUtils.getBean(UserService.class); | 
|---|
|  |  |  | User user = service.getById(this.createBy); | 
|---|
|  |  |  | if (!Cools.isEmpty(user)){ | 
|---|
|  |  |  | return String.valueOf(user.getNickname()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getCreateTime$(){ | 
|---|
|  |  |  | if (Cools.isEmpty(this.createTime)){ | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getUpdateBy$(){ | 
|---|
|  |  |  | UserService service = SpringUtils.getBean(UserService.class); | 
|---|
|  |  |  | User user = service.getById(this.updateBy); | 
|---|
|  |  |  | if (!Cools.isEmpty(user)){ | 
|---|
|  |  |  | return String.valueOf(user.getNickname()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getUpdateTime$(){ | 
|---|
|  |  |  | if (Cools.isEmpty(this.updateTime)){ | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public Boolean getStatusBool(){ | 
|---|
|  |  |  | if (null == this.status){ return null; } | 
|---|
|  |  |  | switch (this.status){ | 
|---|
|  |  |  | case 1: | 
|---|
|  |  |  | return true; | 
|---|
|  |  |  | case 0: | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | default: | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | * 是否删除 1: 是  0: 否 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "是否删除 1: 是  0: 否  ") | 
|---|
|  |  |  | @TableLogic | 
|---|
|  |  |  | private Integer deleted; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.entity; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableLogic; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.MatnrService; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.WaitPakinService; | 
|---|
|  |  |  | import lombok.experimental.Accessors; | 
|---|
|  |  |  | import org.springframework.format.annotation.DateTimeFormat; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.IdType; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableId; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableLogic; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableName; | 
|---|
|  |  |  | import io.swagger.annotations.ApiModel; | 
|---|
|  |  |  | import io.swagger.annotations.ApiModelProperty; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.Cools; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.SpringUtils; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.service.UserService; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.entity.User; | 
|---|
|  |  |  | import java.io.Serializable; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | @Accessors(chain = true) | 
|---|
|  |  |  | @TableName("man_wait_pakin_item_log") | 
|---|
|  |  |  | public class WaitPakinItemLog implements Serializable { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private static final long serialVersionUID = 1L; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "ID") | 
|---|
|  |  |  | @TableId(value = "id", type = IdType.AUTO) | 
|---|
|  |  |  | private Long id; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 主单ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "主单ID") | 
|---|
|  |  |  | private Long pakinId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 明细ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "明细ID") | 
|---|
|  |  |  | private Long pakinItemId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 订单ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "订单ID") | 
|---|
|  |  |  | private Long asnId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 订单号 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "订单号") | 
|---|
|  |  |  | private String asnCode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 明细ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "明细ID") | 
|---|
|  |  |  | private Long asnItemId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 物料跟踪码 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "物料跟踪码") | 
|---|
|  |  |  | private String trackCode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 物料名称 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "物料名称") | 
|---|
|  |  |  | private String maktx; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 物料ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "物料ID") | 
|---|
|  |  |  | private Long matnrId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 物料编码 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "物料编码") | 
|---|
|  |  |  | private String matnrCode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 数量 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "数量") | 
|---|
|  |  |  | private Double anfme; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 执行中数量 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "执行中数量") | 
|---|
|  |  |  | private Double workQty; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 单位 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "单位") | 
|---|
|  |  |  | private String unit; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 扩展字段标识 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "扩展字段标识") | 
|---|
|  |  |  | private String fieldsIndex; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 已完成数量 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "已完成数量") | 
|---|
|  |  |  | private Double qty; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 批次号 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "批次号") | 
|---|
|  |  |  | private String batch; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 状态 1: 正常  0: 冻结 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "状态 1: 正常  0: 冻结  ") | 
|---|
|  |  |  | private Integer status; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 是否删除 1: 是  0: 否 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "是否删除 1: 是  0: 否  ") | 
|---|
|  |  |  | @TableLogic | 
|---|
|  |  |  | private Integer deleted; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 租户 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "租户") | 
|---|
|  |  |  | private Integer tenantId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 添加人员 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "添加人员") | 
|---|
|  |  |  | private Long createBy; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 添加时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "添加时间") | 
|---|
|  |  |  | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date createTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 修改人员 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "修改人员") | 
|---|
|  |  |  | private Long updateBy; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 修改时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "修改时间") | 
|---|
|  |  |  | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date updateTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 备注 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "备注") | 
|---|
|  |  |  | private String memo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public WaitPakinItemLog() {} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public WaitPakinItemLog(Long pakinId,Long pakinItemId,Long asnId,String asnCode,Long asnItemId,String trackCode,String maktx,Long matnrId,String matnrCode,Double anfme,Double workQty,String unit,String fieldsIndex,Double qty,String batch,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { | 
|---|
|  |  |  | this.pakinId = pakinId; | 
|---|
|  |  |  | this.pakinItemId = pakinItemId; | 
|---|
|  |  |  | this.asnId = asnId; | 
|---|
|  |  |  | this.asnCode = asnCode; | 
|---|
|  |  |  | this.asnItemId = asnItemId; | 
|---|
|  |  |  | this.trackCode = trackCode; | 
|---|
|  |  |  | this.maktx = maktx; | 
|---|
|  |  |  | this.matnrId = matnrId; | 
|---|
|  |  |  | this.matnrCode = matnrCode; | 
|---|
|  |  |  | this.anfme = anfme; | 
|---|
|  |  |  | this.workQty = workQty; | 
|---|
|  |  |  | this.unit = unit; | 
|---|
|  |  |  | this.fieldsIndex = fieldsIndex; | 
|---|
|  |  |  | this.qty = qty; | 
|---|
|  |  |  | this.batch = batch; | 
|---|
|  |  |  | this.status = status; | 
|---|
|  |  |  | this.deleted = deleted; | 
|---|
|  |  |  | this.tenantId = tenantId; | 
|---|
|  |  |  | this.createBy = createBy; | 
|---|
|  |  |  | this.createTime = createTime; | 
|---|
|  |  |  | this.updateBy = updateBy; | 
|---|
|  |  |  | this.updateTime = updateTime; | 
|---|
|  |  |  | this.memo = memo; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //    WaitPakinItemLog waitPakinItemLog = new WaitPakinItemLog( | 
|---|
|  |  |  | //            null,    // 主单ID | 
|---|
|  |  |  | //            null,    // 明细ID | 
|---|
|  |  |  | //            null,    // 订单ID | 
|---|
|  |  |  | //            null,    // 订单号 | 
|---|
|  |  |  | //            null,    // 明细ID | 
|---|
|  |  |  | //            null,    // 物料跟踪码 | 
|---|
|  |  |  | //            null,    // 物料名称 | 
|---|
|  |  |  | //            null,    // 物料ID | 
|---|
|  |  |  | //            null,    // 物料编码 | 
|---|
|  |  |  | //            null,    // 数量 | 
|---|
|  |  |  | //            null,    // 执行中数量 | 
|---|
|  |  |  | //            null,    // 单位 | 
|---|
|  |  |  | //            null,    // 扩展字段标识 | 
|---|
|  |  |  | //            null,    // 已完成数量 | 
|---|
|  |  |  | //            null,    // 批次号 | 
|---|
|  |  |  | //            null,    // 状态[非空] | 
|---|
|  |  |  | //            null,    // 是否删除[非空] | 
|---|
|  |  |  | //            null,    // 租户 | 
|---|
|  |  |  | //            null,    // 添加人员 | 
|---|
|  |  |  | //            null,    // 添加时间[非空] | 
|---|
|  |  |  | //            null,    // 修改人员 | 
|---|
|  |  |  | //            null,    // 修改时间[非空] | 
|---|
|  |  |  | //            null    // 备注 | 
|---|
|  |  |  | //    ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getPakinId$(){ | 
|---|
|  |  |  | WaitPakinService service = SpringUtils.getBean(WaitPakinService.class); | 
|---|
|  |  |  | WaitPakin waitPakin = service.getById(this.pakinId); | 
|---|
|  |  |  | if (!Cools.isEmpty(waitPakin)){ | 
|---|
|  |  |  | return String.valueOf(waitPakin.getId()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getMatnrId$(){ | 
|---|
|  |  |  | MatnrService service = SpringUtils.getBean(MatnrService.class); | 
|---|
|  |  |  | Matnr matnr = service.getById(this.matnrId); | 
|---|
|  |  |  | if (!Cools.isEmpty(matnr)){ | 
|---|
|  |  |  | return String.valueOf(matnr.getUnit()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getStatus$(){ | 
|---|
|  |  |  | if (null == this.status){ return null; } | 
|---|
|  |  |  | switch (this.status){ | 
|---|
|  |  |  | case 1: | 
|---|
|  |  |  | return "正常"; | 
|---|
|  |  |  | case 0: | 
|---|
|  |  |  | return "冻结"; | 
|---|
|  |  |  | default: | 
|---|
|  |  |  | return String.valueOf(this.status); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getCreateBy$(){ | 
|---|
|  |  |  | UserService service = SpringUtils.getBean(UserService.class); | 
|---|
|  |  |  | User user = service.getById(this.createBy); | 
|---|
|  |  |  | if (!Cools.isEmpty(user)){ | 
|---|
|  |  |  | return String.valueOf(user.getNickname()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getCreateTime$(){ | 
|---|
|  |  |  | if (Cools.isEmpty(this.createTime)){ | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getUpdateBy$(){ | 
|---|
|  |  |  | UserService service = SpringUtils.getBean(UserService.class); | 
|---|
|  |  |  | User user = service.getById(this.updateBy); | 
|---|
|  |  |  | if (!Cools.isEmpty(user)){ | 
|---|
|  |  |  | return String.valueOf(user.getNickname()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getUpdateTime$(){ | 
|---|
|  |  |  | if (Cools.isEmpty(this.updateTime)){ | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public Boolean getStatusBool(){ | 
|---|
|  |  |  | if (null == this.status){ return null; } | 
|---|
|  |  |  | switch (this.status){ | 
|---|
|  |  |  | case 1: | 
|---|
|  |  |  | return true; | 
|---|
|  |  |  | case 0: | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | default: | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.entity; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableLogic; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import lombok.experimental.Accessors; | 
|---|
|  |  |  | import org.springframework.format.annotation.DateTimeFormat; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.IdType; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableId; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableLogic; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableName; | 
|---|
|  |  |  | import io.swagger.annotations.ApiModel; | 
|---|
|  |  |  | import io.swagger.annotations.ApiModelProperty; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.Cools; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.SpringUtils; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.service.UserService; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.entity.User; | 
|---|
|  |  |  | import java.io.Serializable; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | @Accessors(chain = true) | 
|---|
|  |  |  | @TableName("man_wait_pakin_log") | 
|---|
|  |  |  | public class WaitPakinLog implements Serializable { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private static final long serialVersionUID = 1L; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "ID") | 
|---|
|  |  |  | @TableId(value = "id", type = IdType.AUTO) | 
|---|
|  |  |  | private Long id; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 主单ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "主单ID") | 
|---|
|  |  |  | private Long pakinId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 编码 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "编码") | 
|---|
|  |  |  | private String code; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 容器码 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "容器码") | 
|---|
|  |  |  | private String barcode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 组拖数量 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "组拖数量") | 
|---|
|  |  |  | private Double anfme; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 组拖状态 0: 待入库   1:  入库中 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "组拖状态 0: 待入库   1:  入库中  ") | 
|---|
|  |  |  | private Short ioStatus; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 状态 1: 正常  0: 冻结 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "状态 1: 正常  0: 冻结  ") | 
|---|
|  |  |  | private Integer status; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 是否删除 1: 是  0: 否 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "是否删除 1: 是  0: 否  ") | 
|---|
|  |  |  | @TableLogic | 
|---|
|  |  |  | private Integer deleted; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 租户 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "租户") | 
|---|
|  |  |  | private Integer tenantId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 添加人员 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "添加人员") | 
|---|
|  |  |  | private Long createBy; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 添加时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "添加时间") | 
|---|
|  |  |  | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date createTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 修改人员 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "修改人员") | 
|---|
|  |  |  | private Long updateBy; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 修改时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "修改时间") | 
|---|
|  |  |  | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date updateTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 备注 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "备注") | 
|---|
|  |  |  | private String memo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public WaitPakinLog() {} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public WaitPakinLog(Long pakinId,String code,String barcode,Double anfme,Short ioStatus,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { | 
|---|
|  |  |  | this.pakinId = pakinId; | 
|---|
|  |  |  | this.code = code; | 
|---|
|  |  |  | this.barcode = barcode; | 
|---|
|  |  |  | this.anfme = anfme; | 
|---|
|  |  |  | this.ioStatus = ioStatus; | 
|---|
|  |  |  | this.status = status; | 
|---|
|  |  |  | this.deleted = deleted; | 
|---|
|  |  |  | this.tenantId = tenantId; | 
|---|
|  |  |  | this.createBy = createBy; | 
|---|
|  |  |  | this.createTime = createTime; | 
|---|
|  |  |  | this.updateBy = updateBy; | 
|---|
|  |  |  | this.updateTime = updateTime; | 
|---|
|  |  |  | this.memo = memo; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //    WaitPakinLog waitPakinLog = new WaitPakinLog( | 
|---|
|  |  |  | //            null,    // 主单ID | 
|---|
|  |  |  | //            null,    // 编码 | 
|---|
|  |  |  | //            null,    // 容器码 | 
|---|
|  |  |  | //            null,    // 组拖数量 | 
|---|
|  |  |  | //            null,    // 组拖状态[非空] | 
|---|
|  |  |  | //            null,    // 状态[非空] | 
|---|
|  |  |  | //            null,    // 是否删除[非空] | 
|---|
|  |  |  | //            null,    // 租户 | 
|---|
|  |  |  | //            null,    // 添加人员 | 
|---|
|  |  |  | //            null,    // 添加时间[非空] | 
|---|
|  |  |  | //            null,    // 修改人员 | 
|---|
|  |  |  | //            null,    // 修改时间[非空] | 
|---|
|  |  |  | //            null    // 备注 | 
|---|
|  |  |  | //    ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getIoStatus$(){ | 
|---|
|  |  |  | if (null == this.ioStatus){ return null; } | 
|---|
|  |  |  | switch (this.ioStatus){ | 
|---|
|  |  |  | case 0: | 
|---|
|  |  |  | return "待入库"; | 
|---|
|  |  |  | case  1: | 
|---|
|  |  |  | return " 入库中"; | 
|---|
|  |  |  | default: | 
|---|
|  |  |  | return String.valueOf(this.ioStatus); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getStatus$(){ | 
|---|
|  |  |  | if (null == this.status){ return null; } | 
|---|
|  |  |  | switch (this.status){ | 
|---|
|  |  |  | case 1: | 
|---|
|  |  |  | return "正常"; | 
|---|
|  |  |  | case 0: | 
|---|
|  |  |  | return "冻结"; | 
|---|
|  |  |  | default: | 
|---|
|  |  |  | return String.valueOf(this.status); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getCreateBy$(){ | 
|---|
|  |  |  | UserService service = SpringUtils.getBean(UserService.class); | 
|---|
|  |  |  | User user = service.getById(this.createBy); | 
|---|
|  |  |  | if (!Cools.isEmpty(user)){ | 
|---|
|  |  |  | return String.valueOf(user.getNickname()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getCreateTime$(){ | 
|---|
|  |  |  | if (Cools.isEmpty(this.createTime)){ | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getUpdateBy$(){ | 
|---|
|  |  |  | UserService service = SpringUtils.getBean(UserService.class); | 
|---|
|  |  |  | User user = service.getById(this.updateBy); | 
|---|
|  |  |  | if (!Cools.isEmpty(user)){ | 
|---|
|  |  |  | return String.valueOf(user.getNickname()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getUpdateTime$(){ | 
|---|
|  |  |  | if (Cools.isEmpty(this.updateTime)){ | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public Boolean getStatusBool(){ | 
|---|
|  |  |  | if (null == this.status){ return null; } | 
|---|
|  |  |  | switch (this.status){ | 
|---|
|  |  |  | case 1: | 
|---|
|  |  |  | return true; | 
|---|
|  |  |  | case 0: | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | default: | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.mapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.TaskItemLog; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Mapper; | 
|---|
|  |  |  | import org.springframework.stereotype.Repository; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Mapper | 
|---|
|  |  |  | @Repository | 
|---|
|  |  |  | public interface TaskItemLogMapper extends BaseMapper<TaskItemLog> { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.mapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.TaskItem; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Mapper; | 
|---|
|  |  |  | import org.springframework.stereotype.Repository; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Mapper | 
|---|
|  |  |  | @Repository | 
|---|
|  |  |  | public interface TaskItemMapper extends BaseMapper<TaskItem> { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.mapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.TaskLog; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Mapper; | 
|---|
|  |  |  | import org.springframework.stereotype.Repository; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Mapper | 
|---|
|  |  |  | @Repository | 
|---|
|  |  |  | public interface TaskLogMapper extends BaseMapper<TaskLog> { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.mapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.Task; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Mapper; | 
|---|
|  |  |  | import org.springframework.stereotype.Repository; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Mapper | 
|---|
|  |  |  | @Repository | 
|---|
|  |  |  | public interface TaskMapper extends BaseMapper<Task> { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.mapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.WaitPakinItemLog; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Mapper; | 
|---|
|  |  |  | import org.springframework.stereotype.Repository; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Mapper | 
|---|
|  |  |  | @Repository | 
|---|
|  |  |  | public interface WaitPakinItemLogMapper extends BaseMapper<WaitPakinItemLog> { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.mapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.WaitPakinLog; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Mapper; | 
|---|
|  |  |  | import org.springframework.stereotype.Repository; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Mapper | 
|---|
|  |  |  | @Repository | 
|---|
|  |  |  | public interface WaitPakinLogMapper extends BaseMapper<WaitPakinLog> { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.vincent.rsf.server.system.constant.SerialRuleCode; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.utils.SerialRuleUtils; | 
|---|
|  |  |  | import org.apache.commons.lang3.StringUtils; | 
|---|
|  |  |  | import org.springframework.beans.BeanUtils; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.scheduling.annotation.Scheduled; | 
|---|
|  |  |  | import org.springframework.stereotype.Component; | 
|---|
|  |  |  | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Objects; | 
|---|
|  |  |  | import java.util.stream.Collectors; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @author Ryan | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Resource | 
|---|
|  |  |  | private SysStockProperties flowProperties; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private WaitPakinService waitPakinService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private WaitPakinItemService waitPakinItemService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private WaitPakinLogService waitPakinLogService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private WaitPakinItemLogService waitPakinItemLogService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @author Ryan | 
|---|
|  |  |  | * @description  根据PO单据生成ASN单,自动生成ASN单为全量生成 | 
|---|
|  |  |  | 
|---|
|  |  |  | * @time 2025/3/3 15:44 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Scheduled(cron = "0 0/05 * * * ?  ") | 
|---|
|  |  |  | //    @Scheduled(cron = "0/5 * * * * ?") | 
|---|
|  |  |  | @Transactional(rollbackFor = Exception.class) | 
|---|
|  |  |  | public void genAsnOrder() { | 
|---|
|  |  |  | //判断是否开启自动生成ASN单据 | 
|---|
|  |  |  | 
|---|
|  |  |  | if (!purchaseService.saveOrUpdate(purchase)) { | 
|---|
|  |  |  | throw new CoolException("PO单执行完成后,保存失败!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 生成物料标签 | 
|---|
|  |  |  | * @author Ryan | 
|---|
|  |  |  | * @description 生成物料标签 | 
|---|
|  |  |  | * @param | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | * @time 2025/3/29 12:35 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Scheduled(cron = "0 0/05 * * * ?  ") | 
|---|
|  |  |  | @Transactional(rollbackFor = Exception.class) | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @author Ryan | 
|---|
|  |  |  | * @description 组拖历史档 | 
|---|
|  |  |  | * @param | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | * @time 2025/3/29 12:36 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Scheduled(cron = "0/5 * * * * ?") | 
|---|
|  |  |  | @Transactional(rollbackFor = Exception.class) | 
|---|
|  |  |  | public void pakinLog() { | 
|---|
|  |  |  | List<WaitPakin>  pakinIds = waitPakinService.list(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getIoStatus, 2).select(WaitPakin::getId)); | 
|---|
|  |  |  | if (pakinIds.isEmpty()) { | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | List<Long> list = pakinIds.stream().map(WaitPakin::getId).collect(Collectors.toList()); | 
|---|
|  |  |  | List<WaitPakin> pakins = waitPakinService.list(new LambdaQueryWrapper<WaitPakin>().in(WaitPakin::getId, list)); | 
|---|
|  |  |  | if (pakins.isEmpty()) { | 
|---|
|  |  |  | throw new CoolException("组拖单为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | List<WaitPakinLog> pakinLogs = new ArrayList<>(); | 
|---|
|  |  |  | pakins.forEach(pakin ->{ | 
|---|
|  |  |  | WaitPakinLog log = new WaitPakinLog(); | 
|---|
|  |  |  | BeanUtils.copyProperties(pakin, log); | 
|---|
|  |  |  | log.setPakinId(pakin.getId()).setIoStatus(Short.parseShort("2")); | 
|---|
|  |  |  | pakinLogs.add(log); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | if (!waitPakinLogService.saveBatch(pakinLogs)) { | 
|---|
|  |  |  | throw new CoolException("历史档保存失败!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | List<WaitPakinItemLog> itemLogs = new ArrayList<>(); | 
|---|
|  |  |  | List<WaitPakinItem> pakinItems = waitPakinItemService.list(new LambdaQueryWrapper<WaitPakinItem>().in(WaitPakinItem::getPakinId, list)); | 
|---|
|  |  |  | if (pakinItems.isEmpty()) { | 
|---|
|  |  |  | throw new CoolException("组拖明细为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | pakinItems.forEach(item -> { | 
|---|
|  |  |  | WaitPakinItemLog itemLog = new WaitPakinItemLog(); | 
|---|
|  |  |  | BeanUtils.copyProperties(item, itemLog); | 
|---|
|  |  |  | itemLog.setPakinItemId(item.getId()) | 
|---|
|  |  |  | .setPakinId(item.getPakinId()); | 
|---|
|  |  |  | itemLogs.add(itemLog); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (!waitPakinItemLogService.saveBatch(itemLogs)) { | 
|---|
|  |  |  | throw new CoolException("历史明细档保存失败!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (!waitPakinService.removeByIds(pakins)) { | 
|---|
|  |  |  | throw new CoolException("原单据删除失败!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (!waitPakinItemService.removeByIds(pakinItems)) { | 
|---|
|  |  |  | throw new CoolException("原单据明细删除失败!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.service; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.service.IService; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.TaskItemLog; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public interface TaskItemLogService extends IService<TaskItemLog> { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.service; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.service.IService; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.TaskItem; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public interface TaskItemService extends IService<TaskItem> { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.service; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.service.IService; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.TaskLog; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public interface TaskLogService extends IService<TaskLog> { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.service; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.service.IService; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.Task; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public interface TaskService extends IService<Task> { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.service; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.service.IService; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.WaitPakinItemLog; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public interface WaitPakinItemLogService extends IService<WaitPakinItemLog> { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.service; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.service.IService; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.WaitPakinLog; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public interface WaitPakinLogService extends IService<WaitPakinLog> { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | public interface WaitPakinService extends IService<WaitPakin> { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | WaitPakin mergeItems(WaitPakinParam waitPakin); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | WaitPakin unBind(WaitPakinParam param); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | String ruleCode = SerialRuleUtils.generateRuleCode(SerialRuleCode.SYS_LABEL_CODE, asnOrderItem); | 
|---|
|  |  |  | asnOrderItem.setTrackCode(ruleCode); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (StringUtils.isBlank(asnOrderItem.getBatch())) { | 
|---|
|  |  |  | String ruleCode = SerialRuleUtils.generateRuleCode(SerialRuleCode.SYS_STOCK_BATCH_CODE, asnOrderItem); | 
|---|
|  |  |  | asnOrderItem.setBatch(ruleCode); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (!this.saveOrUpdate(asnOrderItem)) { | 
|---|
|  |  |  | throw new CoolException("收货通知单明细保存失败!!"); | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.service.impl; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.mapper.TaskItemLogMapper; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.TaskItemLog; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.TaskItemLogService; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Service("taskItemLogService") | 
|---|
|  |  |  | public class TaskItemLogServiceImpl extends ServiceImpl<TaskItemLogMapper, TaskItemLog> implements TaskItemLogService { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.service.impl; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.mapper.TaskItemMapper; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.TaskItem; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.TaskItemService; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Service("taskItemService") | 
|---|
|  |  |  | public class TaskItemServiceImpl extends ServiceImpl<TaskItemMapper, TaskItem> implements TaskItemService { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.service.impl; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.mapper.TaskLogMapper; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.TaskLog; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.TaskLogService; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Service("taskLogService") | 
|---|
|  |  |  | public class TaskLogServiceImpl extends ServiceImpl<TaskLogMapper, TaskLog> implements TaskLogService { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.service.impl; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.mapper.TaskMapper; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.Task; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.TaskService; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Service("taskService") | 
|---|
|  |  |  | public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements TaskService { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.service.impl; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.mapper.WaitPakinItemLogMapper; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.WaitPakinItemLog; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.WaitPakinItemLogService; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Service("waitPakinItemLogService") | 
|---|
|  |  |  | public class WaitPakinItemLogServiceImpl extends ServiceImpl<WaitPakinItemLogMapper, WaitPakinItemLog> implements WaitPakinItemLogService { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.service.impl; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.mapper.WaitPakinLogMapper; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.WaitPakinLog; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.WaitPakinLogService; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Service("waitPakinLogService") | 
|---|
|  |  |  | public class WaitPakinLogServiceImpl extends ServiceImpl<WaitPakinLogMapper, WaitPakinLog> implements WaitPakinLogService { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | private AsnOrderItemService asnOrderItemService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private AsnOrderService asnOrderService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private WaitPakinService waitPakinService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private WaitPakinItemService waitPakinItemService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | if (StringUtils.isBlank(ruleCode)) { | 
|---|
|  |  |  | throw new CoolException("编码规则错误: 编码规则「SYS_WAIT_PAKIN_CODE」规则是不存在"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | pakin.setCode(ruleCode) | 
|---|
|  |  |  | //状态修改为入库中 | 
|---|
|  |  |  | .setIoStatus(Short.parseShort("1")) | 
|---|
|  |  |  | .setAnfme(sum) | 
|---|
|  |  |  | .setBarcode(waitPakin.getBarcode()); | 
|---|
|  |  |  | if (!this.save(pakin)) { | 
|---|
|  |  |  | 
|---|
|  |  |  | .setMatnrCode(item.getMatnrCode()) | 
|---|
|  |  |  | .setBatch(item.getSplrBatch()) | 
|---|
|  |  |  | .setUnit(item.getStockUnit()) | 
|---|
|  |  |  | .setBatch(item.getSplrBatch()) | 
|---|
|  |  |  | .setFieldsIndex(item.getFieldsIndex()) | 
|---|
|  |  |  | .setUnit(item.getStockUnit()) | 
|---|
|  |  |  | .setMatnrId(StringUtils.isNotBlank(item.getMatnrId()) ? Long.parseLong(item.getMatnrId()) : null) | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return pakin; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public WaitPakin unBind(WaitPakinParam param) { | 
|---|
|  |  |  | String barcode = param.getBarcode(); | 
|---|
|  |  |  | if (StringUtils.isNotBlank(barcode)) { | 
|---|
|  |  |  | WaitPakin waitPakins = waitPakinService.getOne(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, barcode), false); | 
|---|
|  |  |  | if (Objects.isNull(waitPakins)) { | 
|---|
|  |  |  | throw new CoolException("组拖不存在!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | List<PakinItem> paramItems = param.getItems(); | 
|---|
|  |  |  | if (Objects.isNull(paramItems) || paramItems.isEmpty()) { | 
|---|
|  |  |  | throw new CoolException("解绑物料不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | List<Long> list = paramItems.stream().map(PakinItem::getMatnrId).collect(Collectors.toList()); | 
|---|
|  |  |  | List<WaitPakinItem> pakinItems = waitPakinItemService.list(new LambdaQueryWrapper<WaitPakinItem>() | 
|---|
|  |  |  | .eq(WaitPakinItem::getPakinId, waitPakins.getId()) | 
|---|
|  |  |  | .eq(WaitPakinItem::getMatnrId, list)); | 
|---|
|  |  |  | if (pakinItems.isEmpty()) { | 
|---|
|  |  |  | throw new CoolException("数据错误:组拖明细不存在!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (!waitPakinItemService.removeByIds(pakinItems)) { | 
|---|
|  |  |  | throw new CoolException("组拖明细解绑失败!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return waitPakins; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new WaitPakin(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | * 组拖编码生成规则 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public final static String SYS_WAIT_PAKIN_CODE = "sys_wait_pakin_code"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 库存批次编码规则 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public final static String SYS_STOCK_BATCH_CODE = "sys_stock_batch_code"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | <?xml version="1.0" encoding="UTF-8"?> | 
|---|
|  |  |  | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 
|---|
|  |  |  | <mapper namespace="com.vincent.rsf.server.manager.mapper.TaskItemLogMapper"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </mapper> | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | <?xml version="1.0" encoding="UTF-8"?> | 
|---|
|  |  |  | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 
|---|
|  |  |  | <mapper namespace="com.vincent.rsf.server.manager.mapper.TaskItemMapper"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </mapper> | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | <?xml version="1.0" encoding="UTF-8"?> | 
|---|
|  |  |  | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 
|---|
|  |  |  | <mapper namespace="com.vincent.rsf.server.manager.mapper.TaskLogMapper"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </mapper> | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | <?xml version="1.0" encoding="UTF-8"?> | 
|---|
|  |  |  | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 
|---|
|  |  |  | <mapper namespace="com.vincent.rsf.server.manager.mapper.TaskMapper"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </mapper> | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | <?xml version="1.0" encoding="UTF-8"?> | 
|---|
|  |  |  | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 
|---|
|  |  |  | <mapper namespace="com.vincent.rsf.server.manager.mapper.WaitPakinItemLogMapper"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </mapper> | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | <?xml version="1.0" encoding="UTF-8"?> | 
|---|
|  |  |  | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 
|---|
|  |  |  | <mapper namespace="com.vincent.rsf.server.manager.mapper.WaitPakinLogMapper"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </mapper> | 
|---|