Commit 3ecca9bc00adeec0d75987707e18217780dfeba1

Authored by xqs
2 parents a0b75364 7f2fa6c6

Merge branch 'develop' of http://172.16.29.40:8010/wms/wms2 into develop

Showing 31 changed files with 2447 additions and 91 deletions
src/main/java/com/huaheng/pc/config/materialType/domain/MaterialType.java 0 → 100644
  1 +package com.huaheng.pc.config.materialType.domain;
  2 +
  3 +import com.baomidou.mybatisplus.annotation.IdType;
  4 +import com.baomidou.mybatisplus.annotation.TableField;
  5 +import com.baomidou.mybatisplus.annotation.TableId;
  6 +import com.baomidou.mybatisplus.annotation.TableName;
  7 +import io.swagger.annotations.ApiModel;
  8 +import io.swagger.annotations.ApiModelProperty;
  9 +import java.io.Serializable;
  10 +import java.util.Date;
  11 +import lombok.Data;
  12 +
  13 +@ApiModel(value="com.huaheng.pc.config.materialType.domain.MaterialType")
  14 +@Data
  15 +@TableName(value = "material_type")
  16 +public class MaterialType implements Serializable {
  17 + /**
  18 + * ID
  19 + */
  20 + @TableId(value = "id", type = IdType.AUTO)
  21 + @ApiModelProperty(value="ID")
  22 + private Integer id;
  23 +
  24 + /**
  25 + * 编码
  26 + */
  27 + @TableField(value = "code")
  28 + @ApiModelProperty(value="编码")
  29 + private String code;
  30 +
  31 + /**
  32 + * 名称
  33 + */
  34 + @TableField(value = "name")
  35 + @ApiModelProperty(value="名称")
  36 + private String name;
  37 +
  38 + /**
  39 + * 货主编码
  40 + */
  41 + @TableField(value = "companyCode")
  42 + @ApiModelProperty(value="货主编码")
  43 + private String companyCode;
  44 +
  45 + /**
  46 + * 仓库编码
  47 + */
  48 + @TableField(value = "warehouseCode")
  49 + @ApiModelProperty(value="仓库编码")
  50 + private String warehouseCode;
  51 +
  52 + /**
  53 + * ABC分类
  54 + */
  55 + @TableField(value = "abcClass")
  56 + @ApiModelProperty(value="ABC分类")
  57 + private String abcClass;
  58 +
  59 + /**
  60 + * 保质期(天)
  61 + */
  62 + @TableField(value = "daysToExpire")
  63 + @ApiModelProperty(value="保质期(天)")
  64 + private Integer daysToExpire;
  65 +
  66 + /**
  67 + * 入库流程
  68 + */
  69 + @TableField(value = "receivingFlow")
  70 + @ApiModelProperty(value="入库流程")
  71 + private String receivingFlow;
  72 +
  73 + /**
  74 + * 出库流程
  75 + */
  76 + @TableField(value = "shippingFlow")
  77 + @ApiModelProperty(value="出库流程")
  78 + private String shippingFlow;
  79 +
  80 + /**
  81 + * 定位规则
  82 + */
  83 + @TableField(value = "locatingRule")
  84 + @ApiModelProperty(value="定位规则")
  85 + private String locatingRule;
  86 +
  87 + /**
  88 + * 分配规则
  89 + */
  90 + @TableField(value = "allocationRule")
  91 + @ApiModelProperty(value="分配规则")
  92 + private String allocationRule;
  93 +
  94 + /**
  95 + * 补货规则
  96 + */
  97 + @TableField(value = "replenishmentRule")
  98 + @ApiModelProperty(value="补货规则")
  99 + private String replenishmentRule;
  100 +
  101 + /**
  102 + * 空货位规则
  103 + */
  104 + @TableField(value = "emptyLocRule")
  105 + @ApiModelProperty(value="空货位规则")
  106 + private String emptyLocRule;
  107 +
  108 + /**
  109 + * 拣货规则
  110 + */
  111 + @TableField(value = "pickingRule")
  112 + @ApiModelProperty(value="拣货规则")
  113 + private String pickingRule;
  114 +
  115 + /**
  116 + * 属性模版
  117 + */
  118 + @TableField(value = "attributeTemplateCode")
  119 + @ApiModelProperty(value="属性模版")
  120 + private String attributeTemplateCode;
  121 +
  122 + /**
  123 + * 记录序列号
  124 + */
  125 + @TableField(value = "trackSerialNum")
  126 + @ApiModelProperty(value="记录序列号")
  127 + private Integer trackSerialNum;
  128 +
  129 + /**
  130 + * 自动生成序列号
  131 + */
  132 + @TableField(value = "autoGenSerialNum")
  133 + @ApiModelProperty(value="自动生成序列号")
  134 + private Integer autoGenSerialNum;
  135 +
  136 + /**
  137 + * 自动生成序列号表达式
  138 + */
  139 + @TableField(value = "autoGenSerialNumFormat")
  140 + @ApiModelProperty(value="自动生成序列号表达式")
  141 + private String autoGenSerialNumFormat;
  142 +
  143 + /**
  144 + * 序列号模版
  145 + */
  146 + @TableField(value = "snTemplateCode")
  147 + @ApiModelProperty(value="序列号模版")
  148 + private String snTemplateCode;
  149 +
  150 + /**
  151 + * 临期预警天数
  152 + */
  153 + @TableField(value = "expiringDays")
  154 + @ApiModelProperty(value="临期预警天数")
  155 + private Integer expiringDays;
  156 +
  157 + /**
  158 + * 收货预警天数
  159 + */
  160 + @TableField(value = "minShelfLifeDays")
  161 + @ApiModelProperty(value="收货预警天数")
  162 + private Integer minShelfLifeDays;
  163 +
  164 + /**
  165 + * 状态
  166 + */
  167 + @TableField(value = "enable")
  168 + @ApiModelProperty(value="状态")
  169 + private Integer enable;
  170 +
  171 + /**
  172 + * 创建时间
  173 + */
  174 + @TableField(value = "created")
  175 + @ApiModelProperty(value="创建时间")
  176 + private Date created;
  177 +
  178 + /**
  179 + * 创建用户
  180 + */
  181 + @TableField(value = "createdBy")
  182 + @ApiModelProperty(value="创建用户")
  183 + private String createdBy;
  184 +
  185 + /**
  186 + * 创建时间
  187 + */
  188 + @TableField(value = "lastUpdated")
  189 + @ApiModelProperty(value="创建时间")
  190 + private Date lastUpdated;
  191 +
  192 + /**
  193 + * 更新用户
  194 + */
  195 + @TableField(value = "lastUpdatedBy")
  196 + @ApiModelProperty(value="更新用户")
  197 + private String lastUpdatedBy;
  198 +
  199 + /**
  200 + * 数据版本
  201 + */
  202 + @TableField(value = "version")
  203 + @ApiModelProperty(value="数据版本")
  204 + private Integer version;
  205 +
  206 + /**
  207 + * 是否AGV区域发货
  208 + */
  209 + @TableField(value = "userDef1")
  210 + @ApiModelProperty(value="是否AGV区域发货")
  211 + private String userDef1;
  212 +
  213 + /**
  214 + * 自定义字段2
  215 + */
  216 + @TableField(value = "userDef2")
  217 + @ApiModelProperty(value="自定义字段2")
  218 + private String userDef2;
  219 +
  220 + /**
  221 + * 商品同步标识
  222 + */
  223 + @TableField(value = "userDef3")
  224 + @ApiModelProperty(value="商品同步标识")
  225 + private String userDef3;
  226 +
  227 + /**
  228 + * 自定义字段4
  229 + */
  230 + @TableField(value = "userDef4")
  231 + @ApiModelProperty(value="自定义字段4")
  232 + private String userDef4;
  233 +
  234 + /**
  235 + * 自定义字段5
  236 + */
  237 + @TableField(value = "userDef5")
  238 + @ApiModelProperty(value="自定义字段5")
  239 + private String userDef5;
  240 +
  241 + /**
  242 + * 自定义字段6
  243 + */
  244 + @TableField(value = "userDef6")
  245 + @ApiModelProperty(value="自定义字段6")
  246 + private String userDef6;
  247 +
  248 + /**
  249 + * 自定义字段7
  250 + */
  251 + @TableField(value = "userDef7")
  252 + @ApiModelProperty(value="自定义字段7")
  253 + private String userDef7;
  254 +
  255 + /**
  256 + * 自定义字段8
  257 + */
  258 + @TableField(value = "userDef8")
  259 + @ApiModelProperty(value="自定义字段8")
  260 + private String userDef8;
  261 +
  262 + private static final long serialVersionUID = 1L;
  263 +}
0 264 \ No newline at end of file
... ...
src/main/java/com/huaheng/pc/config/materialType/mapper/MaterialTypeMapper.java 0 → 100644
  1 +package com.huaheng.pc.config.materialType.mapper;
  2 +
  3 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  4 +import com.huaheng.pc.config.materialType.domain.MaterialType;
  5 +
  6 +public interface MaterialTypeMapper extends BaseMapper<MaterialType> {
  7 +}
0 8 \ No newline at end of file
... ...
src/main/java/com/huaheng/pc/config/materialType/service/MaterialTypeService.java 0 → 100644
  1 +package com.huaheng.pc.config.materialType.service;
  2 +
  3 +import org.springframework.stereotype.Service;
  4 +import javax.annotation.Resource;
  5 +import java.util.List;
  6 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  7 +import com.huaheng.pc.config.materialType.domain.MaterialType;
  8 +import com.huaheng.pc.config.materialType.mapper.MaterialTypeMapper;
  9 +@Service
  10 +public class MaterialTypeService extends ServiceImpl<MaterialTypeMapper, MaterialType> {
  11 +
  12 +}
... ...
src/main/java/com/huaheng/pc/config/statusFlow/controller/StatusFlowDetailController.java
... ... @@ -15,7 +15,9 @@ import com.huaheng.framework.web.page.PageDomain;
15 15 import com.huaheng.framework.web.page.TableDataInfo;
16 16 import com.huaheng.framework.web.page.TableSupport;
17 17 import com.huaheng.pc.config.statusFlow.domain.StatusFlowDetail;
  18 +import com.huaheng.pc.config.statusFlow.domain.StatusFlowHeader;
18 19 import com.huaheng.pc.config.statusFlow.service.StatusFlowDetailService;
  20 +import com.huaheng.pc.config.statusFlow.service.StatusFlowHeaderService;
19 21 import io.swagger.annotations.Api;
20 22 import io.swagger.annotations.ApiOperation;
21 23 import io.swagger.annotations.ApiParam;
... ... @@ -35,6 +37,8 @@ public class StatusFlowDetailController extends BaseController {
35 37  
36 38 @Resource
37 39 private StatusFlowDetailService statusFlowDetailService;
  40 + @Resource
  41 + private StatusFlowHeaderService statusFlowHeaderService;
38 42  
39 43 private String prefix = "config/statusFlowDetail";
40 44  
... ... @@ -89,7 +93,9 @@ public class StatusFlowDetailController extends BaseController {
89 93 */
90 94 @GetMapping("/add/{headerId}")
91 95 public String add(@PathVariable("headerId")Integer headerId, ModelMap mmap) {
  96 + StatusFlowHeader statusFlowHeader = statusFlowHeaderService.getById(headerId);
92 97 mmap.put("headerId",headerId);
  98 + mmap.put("headerCode", statusFlowHeader.getCode());
93 99 return prefix + "/add";
94 100 }
95 101  
... ...
src/main/java/com/huaheng/pc/config/statusFlow/domain/StatusFlowDetail.java
... ... @@ -22,9 +22,13 @@ public class StatusFlowDetail implements Serializable {
22 22 private Integer id;
23 23  
24 24 @TableField(value = "headerId")
25   - @ApiModelProperty(value="null")
  25 + @ApiModelProperty(value="头表id")
26 26 private Integer headerId;
27 27  
  28 + @TableField(value = "headerCode")
  29 + @ApiModelProperty(value="头表编码")
  30 + private Integer headerCode;
  31 +
28 32 /**
29 33 * 状态流
30 34 */
... ...
src/main/java/com/huaheng/pc/config/statusFlow/service/StatusFlowDetailService.java
1 1 package com.huaheng.pc.config.statusFlow.service;
2 2  
  3 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  4 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
3 5 import org.springframework.stereotype.Service;
4 6 import javax.annotation.Resource;
5 7 import java.util.List;
  8 +import java.util.WeakHashMap;
  9 +
6 10 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7 11 import com.huaheng.pc.config.statusFlow.domain.StatusFlowDetail;
8 12 import com.huaheng.pc.config.statusFlow.mapper.StatusFlowDetailMapper;
9 13 @Service
10 14 public class StatusFlowDetailService extends ServiceImpl<StatusFlowDetailMapper, StatusFlowDetail> {
11 15  
  16 + public List<StatusFlowDetail> queryStatusFlowDetail(String headerCode){
  17 + LambdaQueryWrapper<StatusFlowDetail> lambdaQueryWrapper = Wrappers.lambdaQuery();
  18 + lambdaQueryWrapper.orderByAsc(StatusFlowDetail::getSequence)
  19 + .eq(StatusFlowDetail::getHeaderCode, headerCode);
  20 + return this.list(lambdaQueryWrapper);
  21 + }
12 22 }
... ...
src/main/java/com/huaheng/pc/receipt/receiptDetail/controller/ReceiptDetailController.java
... ... @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4 4 import com.baomidou.mybatisplus.core.metadata.IPage;
5 5 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
6 6 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  7 +import com.huaheng.common.exception.service.ServiceException;
7 8 import com.huaheng.common.support.Convert;
8 9 import com.huaheng.common.utils.StringUtils;
9 10 import com.huaheng.common.utils.security.ShiroUtils;
... ... @@ -23,6 +24,7 @@ import io.swagger.annotations.ApiOperation;
23 24 import io.swagger.annotations.ApiParam;
24 25 import org.apache.ibatis.annotations.Param;
25 26 import org.apache.shiro.authz.annotation.RequiresPermissions;
  27 +import org.aspectj.weaver.loadtime.Aj;
26 28 import org.springframework.stereotype.Controller;
27 29 import org.springframework.ui.ModelMap;
28 30 import org.springframework.web.bind.annotation.*;
... ... @@ -152,4 +154,39 @@ public class ReceiptDetailController extends BaseController {
152 154 // }
153 155 // return toAjax(receiptDetailService.removeByIds(list));
154 156 //}
  157 +
  158 + /**
  159 + * 审核入库单
  160 + */
  161 + @ApiOperation(value="审核入库单", notes="审核入库单", httpMethod = "POST")
  162 + @RequiresPermissions("receipt:receiptDetail:approval")
  163 + @Log(title = "入库-入库单 ",operating = "审核入库单 ", action = BusinessType.UPDATE)
  164 + @PostMapping("/approval")
  165 + @ResponseBody
  166 + public AjaxResult approval(@ApiParam(name="id",value="入库明细表id") String ids,
  167 + @ApiParam(name="approval",value="审核结果值,10审核驳回,20作废,100审核成功") Integer approval) {
  168 +
  169 + if (StringUtils.isEmpty(ids)){
  170 + return AjaxResult.error("id不能为空");
  171 + }
  172 + if (approval != 10 || approval != 20 || approval != 100){
  173 + return AjaxResult.error("传入参数错误");
  174 + }
  175 + for (Integer id : Convert.toIntArray(ids)) {
  176 + ReceiptDetail receiptDetail = new ReceiptDetail();
  177 + receiptDetail.setId(id);
  178 + receiptDetail.setProcessStamp(String.valueOf(approval));
  179 + receiptDetail.setLastUpdatedBy(ShiroUtils.getLoginName());
  180 + if (receiptDetailService.updateById(receiptDetail)){
  181 + ReceiptHeader receiptHeader = new ReceiptHeader();
  182 + receiptHeader.setFirstStatus(approval);
  183 + receiptHeader.setId(receiptDetail.getReceiptId());
  184 + receiptHeaderService.updateById(receiptHeader);
  185 + } else {
  186 + throw new ServiceException("审核失败");
  187 + }
  188 + }
  189 +
  190 + return AjaxResult.success("审核成功");
  191 + }
155 192 }
... ...
src/main/java/com/huaheng/pc/receipt/receiptDetail/service/ReceiptDetailServiceImpl.java
... ... @@ -7,6 +7,14 @@ import com.huaheng.common.utils.security.ShiroUtils;
7 7 import com.huaheng.framework.web.domain.AjaxResult;
8 8 import com.huaheng.pc.config.material.domain.Material;
9 9 import com.huaheng.pc.config.material.service.MaterialService;
  10 +import com.huaheng.pc.config.materialType.domain.MaterialType;
  11 +import com.huaheng.pc.config.materialType.service.MaterialTypeService;
  12 +import com.huaheng.pc.config.receiptPreference.domain.ReceiptPreference;
  13 +import com.huaheng.pc.config.receiptPreference.service.ReceiptPreferenceService;
  14 +import com.huaheng.pc.config.receiptType.domain.ReceiptType;
  15 +import com.huaheng.pc.config.receiptType.service.ReceiptTypeService;
  16 +import com.huaheng.pc.config.statusFlow.domain.StatusFlowDetail;
  17 +import com.huaheng.pc.config.statusFlow.service.StatusFlowDetailService;
10 18 import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader;
11 19 import com.huaheng.pc.receipt.receiptHeader.service.ReceiptHeaderService;
12 20 import org.aspectj.weaver.loadtime.Aj;
... ... @@ -26,6 +34,14 @@ public class ReceiptDetailServiceImpl extends ServiceImpl&lt;ReceiptDetailMapper, R
26 34 private MaterialService materialService;
27 35 @Resource
28 36 private ReceiptHeaderService receiptHeaderService;
  37 + @Resource
  38 + private ReceiptTypeService receiptTypeService;
  39 + @Resource
  40 + private StatusFlowDetailService statusFlowDetailService;
  41 + @Resource
  42 + private MaterialTypeService materialTypeService;
  43 + @Resource
  44 + private ReceiptPreferenceService receiptPreferenceService;
29 45  
30 46 /**
31 47 * 新增入库明细
... ... @@ -35,15 +51,17 @@ public class ReceiptDetailServiceImpl extends ServiceImpl&lt;ReceiptDetailMapper, R
35 51 @Transactional
36 52 public AjaxResult saveReceiptDetaial(ReceiptDetail receiptDetail){
37 53 /* 判断入库头表状态*/
38   - LambdaQueryWrapper<ReceiptHeader> lambda = Wrappers.lambdaQuery();
39   - lambda.eq(ReceiptHeader::getId, receiptDetail.getReceiptId());
40   - ReceiptHeader receiptHeader = receiptHeaderService.getOne(lambda);
  54 + LambdaQueryWrapper<ReceiptHeader> lambdaReceiptHeader = Wrappers.lambdaQuery();
  55 + lambdaReceiptHeader.eq(ReceiptHeader::getId, receiptDetail.getReceiptId());
  56 + ReceiptHeader receiptHeader = receiptHeaderService.getOne(lambdaReceiptHeader);
  57 +
  58 + //判断入库头表状态
41 59 if (receiptHeader == null ){
42   - return AjaxResult.error("找不到主单据");
  60 + throw new ServiceException("找不到主单据");
43 61 } else if (receiptHeader.getFirstStatus() > 100){
44   - return AjaxResult.error("单据进入订单池后,不允许新增明细");
  62 + throw new ServiceException("单据进入订单池后,不允许新增明细");
45 63 } else if (receiptHeader.getFirstStatus() == 20) {
46   - return AjaxResult.error("单据销毁");
  64 + throw new ServiceException("单据已作废");
47 65 }
48 66 receiptDetail.setReceiptCode(receiptHeader.getCode());
49 67  
... ... @@ -52,7 +70,7 @@ public class ReceiptDetailServiceImpl extends ServiceImpl&lt;ReceiptDetailMapper, R
52 70 lambdaQueryWrapper.eq(Material::getCode, receiptDetail.getMaterialCode());
53 71 Material material = materialService.getOne(lambdaQueryWrapper);
54 72 if (material == null) {
55   - return AjaxResult.error("物料不存在");
  73 + throw new ServiceException("物料不存在");
56 74 }
57 75 receiptDetail.setCompanyCode(material.getCompanyCode());
58 76 receiptDetail.setMaterialName(material.getName());
... ... @@ -63,6 +81,36 @@ public class ReceiptDetailServiceImpl extends ServiceImpl&lt;ReceiptDetailMapper, R
63 81 receiptDetail.setLastUpdatedBy(ShiroUtils.getLoginName());
64 82 receiptDetail.setWarehouseCode(ShiroUtils.getWarehouseCode());
65 83  
  84 + //查询头表中绑定的入库类型中的入库流程
  85 + LambdaQueryWrapper<ReceiptType> lambdaReceiptType = Wrappers.lambdaQuery();
  86 + lambdaReceiptType.eq(ReceiptType::getCode, receiptHeader.getReceiptType());
  87 + ReceiptType receiptType = receiptTypeService.getOne(lambdaReceiptType);
  88 + if (receiptType.getReceiptFlow() != null){
  89 + //物料是否有入库流程
  90 + List<StatusFlowDetail> statusFlowDetails = statusFlowDetailService.queryStatusFlowDetail(receiptType.getReceiptFlow());
  91 + receiptDetail.setProcessStamp(statusFlowDetails.get(0).getFlowCode());
  92 + } else if (material.getReceivingFlow() != null){
  93 + //物料是否有入库流程
  94 + List<StatusFlowDetail> statusFlowDetails = statusFlowDetailService.queryStatusFlowDetail(material.getReceivingFlow());
  95 + receiptDetail.setProcessStamp(statusFlowDetails.get(0).getFlowCode());
  96 + } else {
  97 + //该物料类别是否有入库流程
  98 + LambdaQueryWrapper<MaterialType> lambdaMaterialType = Wrappers.lambdaQuery();
  99 + lambdaMaterialType.eq(MaterialType::getCode, material.getType());
  100 + MaterialType materialType = materialTypeService.getOne(lambdaMaterialType);
  101 + if (materialType.getReceivingFlow() != null) {
  102 + List<StatusFlowDetail> statusFlowDetails = statusFlowDetailService.queryStatusFlowDetail(materialType.getReceivingFlow());
  103 + receiptDetail.setProcessStamp(statusFlowDetails.get(0).getFlowCode());
  104 + } else {
  105 + //以上都没有的情况下查询入库首选项中的入库流程
  106 + LambdaQueryWrapper<ReceiptPreference> lambda = Wrappers.lambdaQuery();
  107 + lambda.last("Limit 1");
  108 + ReceiptPreference receiptPreference = receiptPreferenceService.getOne(lambda);
  109 + List<StatusFlowDetail> statusFlowDetails = statusFlowDetailService.queryStatusFlowDetail(receiptPreference.getReceivingFlow());
  110 + receiptDetail.setProcessStamp(statusFlowDetails.get(0).getFlowCode());
  111 + }
  112 + }
  113 +
66 114 if (this.save(receiptDetail)) {
67 115 receiptHeader.setTotalQty(receiptHeader.getTotalQty()+receiptDetail.getTotalQty());
68 116 receiptHeader.setTotalLines(receiptHeader.getTotalLines()+1);
... ... @@ -89,9 +137,9 @@ public class ReceiptDetailServiceImpl extends ServiceImpl&lt;ReceiptDetailMapper, R
89 137 ReceiptHeader receiptHeader = receiptHeaderService.getById(receiptDetail.getReceiptId());
90 138 //判断物料编码是否被修改
91 139 if (!originalReceiptDetail.getMaterialCode().equals(receiptDetail.getMaterialCode())){
92   - LambdaQueryWrapper<Material> lambda = Wrappers.lambdaQuery();
93   - lambda.eq(Material::getCode,receiptDetail.getMaterialCode());
94   - Material material = materialService.getOne(lambda);
  140 + LambdaQueryWrapper<Material> lambdaMaterial = Wrappers.lambdaQuery();
  141 + lambdaMaterial.eq(Material::getCode,receiptDetail.getMaterialCode());
  142 + Material material = materialService.getOne(lambdaMaterial);
95 143 if (material == null) {
96 144 throw new ServiceException("该物料编码不存在");
97 145  
... ...
src/main/java/com/huaheng/pc/receipt/receiptHeader/service/ReceiptHeaderService.java
... ... @@ -3,10 +3,13 @@ package com.huaheng.pc.receipt.receiptHeader.service;
3 3 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4 4 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
5 5 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  6 +import com.huaheng.common.exception.service.ServiceException;
6 7 import com.huaheng.common.utils.security.ShiroUtils;
7 8 import com.huaheng.framework.web.domain.AjaxResult;
8 9 import com.huaheng.pc.config.receiptType.domain.ReceiptType;
9 10 import com.huaheng.pc.config.receiptType.service.ReceiptTypeService;
  11 +import com.huaheng.pc.config.statusFlow.domain.StatusFlowDetail;
  12 +import com.huaheng.pc.config.statusFlow.service.StatusFlowDetailService;
10 13 import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader;
11 14 import com.huaheng.pc.receipt.receiptHeader.mapper.ReceiptHeaderMapper;
12 15 import org.springframework.stereotype.Service;
... ... @@ -14,21 +17,27 @@ import org.springframework.stereotype.Service;
14 17 import javax.annotation.Resource;
15 18 import java.text.SimpleDateFormat;
16 19 import java.util.Date;
  20 +import java.util.List;
17 21  
18 22 @Service
19 23 public class ReceiptHeaderService extends ServiceImpl<ReceiptHeaderMapper, ReceiptHeader> {
20 24  
21 25 @Resource
22 26 private ReceiptTypeService receiptTypeService;
  27 + @Resource
  28 + private StatusFlowDetailService statusFlowDetailService;
23 29  
24 30 public AjaxResult saveReceiptHeader(ReceiptHeader receiptHeader){
25 31 LambdaQueryWrapper<ReceiptType> lambdaQueryWrapper = Wrappers.lambdaQuery();
26 32 lambdaQueryWrapper.eq(ReceiptType::getCode, receiptHeader.getReceiptType());
27 33 ReceiptType receiptType = receiptTypeService.getOne(lambdaQueryWrapper);
28   - if(receiptType == null) {
29   - return AjaxResult.error("没有对应的入库单类型");
30   - } else if (receiptType.getReceiptFlow() != null){
31 34  
  35 + //流程详情查询
  36 + LambdaQueryWrapper<StatusFlowDetail> lambdaStatus = Wrappers.lambdaQuery();
  37 + lambdaStatus.orderByAsc(StatusFlowDetail::getSequence);
  38 +
  39 + if(receiptType == null) {
  40 + throw new ServiceException("没有对应的入库单类型");
32 41 }
33 42  
34 43 String code = createCode(receiptHeader.getReceiptType());
... ...
src/main/java/com/huaheng/pc/shipment/shipmentDetailHistory/controller/ShipmentDetailHistoryController.java
... ... @@ -15,6 +15,8 @@ import com.huaheng.framework.web.page.TableDataInfo;
15 15 import com.huaheng.framework.web.page.TableSupport;
16 16 import com.huaheng.pc.shipment.shipmentDetail.domain.ShipmentDetail;
17 17 import com.huaheng.pc.shipment.shipmentDetail.service.ShipmentDetailService;
  18 +import com.huaheng.pc.shipment.shipmentDetailHistory.domain.ShipmentDetailHistory;
  19 +import com.huaheng.pc.shipment.shipmentDetailHistory.service.ShipmentDetailHistoryService;
18 20 import org.apache.shiro.authz.annotation.RequiresPermissions;
19 21 import org.springframework.beans.factory.annotation.Autowired;
20 22 import org.springframework.stereotype.Controller;
... ... @@ -24,7 +26,7 @@ import org.springframework.web.bind.annotation.*;
24 26 import java.util.List;
25 27  
26 28 /**
27   - * 出库明细 信息操作处理
  29 + * 历史出库明细 信息操作处理
28 30 *
29 31 * @author huaheng
30 32 * @date 2018-08-19
... ... @@ -36,12 +38,12 @@ public class ShipmentDetailHistoryController extends BaseController
36 38 private String prefix = "shipment/shipmentDetailHistory";
37 39  
38 40 @Autowired
39   - private ShipmentDetailService shipmentDetailService;
  41 + private ShipmentDetailHistoryService shipmentDetailHistoryService;
40 42  
41 43  
42 44 @RequiresPermissions("shipment:bill:view")
43 45 @GetMapping("/{shipmentId}/{shipmentCode}")
44   - public String shipmentDetail(@PathVariable("shipmentId") String shipmentId, @PathVariable("shipmentCode") String shipmentCode,@PathVariable("inventoryStatus") String inventoryStatus, ModelMap mmap)
  46 + public String shipmentHistoryDetail(@PathVariable("shipmentId") String shipmentId, @PathVariable("shipmentCode") String shipmentCode,@PathVariable("inventoryStatus") String inventoryStatus, ModelMap mmap)
45 47 {
46 48 mmap.put("receiptId", shipmentId);
47 49 mmap.put("shipmentCode", shipmentCode);
... ... @@ -53,31 +55,31 @@ public class ShipmentDetailHistoryController extends BaseController
53 55 * 查询出库明细列表
54 56 */
55 57 @RequiresPermissions("shipment:bill:list")
56   - @Log(title = "出库-出库单", operating= "查看出库明细", action = BusinessType.GRANT)
  58 + @Log(title = "出库-历史出库单", operating= "查看历史出库明细", action = BusinessType.GRANT)
57 59 @PostMapping("/list")
58 60 @ResponseBody
59   - public TableDataInfo list(ShipmentDetail shipmentDetail)
  61 + public TableDataInfo list(ShipmentDetailHistory shipmentDetailHistory)
60 62 {
61   - LambdaQueryWrapper<ShipmentDetail> lambdaQueryWrapper = Wrappers.lambdaQuery();
  63 + LambdaQueryWrapper<ShipmentDetailHistory> lambdaQueryWrapper = Wrappers.lambdaQuery();
62 64 PageDomain pageDomain = TableSupport.buildPageRequest();
63 65 Integer pageNum = pageDomain.getPageNum();
64 66 Integer pageSize = pageDomain.getPageSize();
65 67  
66 68 lambdaQueryWrapper
67   - .eq(ShipmentDetail::getWarehouseCode,ShiroUtils.getWarehouseCode())
68   - .in(ShipmentDetail::getCompanyCode,ShiroUtils.getCompanyCodeList())
69   - .eq(StringUtils.isNotEmpty(shipmentDetail.getShipmentCode()),ShipmentDetail::getShipmentCode,shipmentDetail.getShipmentCode())
70   - .orderByAsc(ShipmentDetail::getId);
  69 + .eq(ShipmentDetailHistory::getWarehouseCode,ShiroUtils.getWarehouseCode())
  70 + .in(ShipmentDetailHistory::getCompanyCode,ShiroUtils.getCompanyCodeList())
  71 + .eq(StringUtils.isNotEmpty(shipmentDetailHistory.getShipmentCode()),ShipmentDetailHistory::getShipmentCode,shipmentDetailHistory.getShipmentCode())
  72 + .orderByAsc(ShipmentDetailHistory::getId);
71 73  
72 74 if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){
73 75 /**
74 76 * 使用分页查询
75 77 */
76   - Page<ShipmentDetail> page = new Page<>(pageNum, pageSize);
77   - IPage<ShipmentDetail> iPage = shipmentDetailService.page(page, lambdaQueryWrapper);
  78 + Page<ShipmentDetailHistory> page = new Page<>(pageNum, pageSize);
  79 + IPage<ShipmentDetailHistory> iPage = shipmentDetailHistoryService.page(page, lambdaQueryWrapper);
78 80 return getMpDataTable(iPage.getRecords(),iPage.getTotal());
79 81 } else {
80   - List<ShipmentDetail> list = shipmentDetailService.list(lambdaQueryWrapper);
  82 + List<ShipmentDetailHistory> list = shipmentDetailHistoryService.list(lambdaQueryWrapper);
81 83 return getDataTable(list);
82 84 }
83 85 }
... ... @@ -87,12 +89,12 @@ public class ShipmentDetailHistoryController extends BaseController
87 89 * 删除出库明细
88 90 */
89 91 @RequiresPermissions("shipment:bill:remove")
90   - @Log(title = "出库-出库单", operating= "删除出库明细", action = BusinessType.DELETE)
  92 + @Log(title = "出库-历史出库单", operating= "删除历史出库明细", action = BusinessType.DELETE)
91 93 @PostMapping( "/remove")
92 94 @ResponseBody
93 95 public AjaxResult remove(String ids)
94 96 {
95   - AjaxResult result = shipmentDetailService.deleteDetail(ids);
  97 + AjaxResult result = shipmentDetailHistoryService.deleteDetail(ids);
96 98 return result;
97 99 }
98 100  
... ...
src/main/java/com/huaheng/pc/shipment/shipmentDetailHistory/domain/ShipmentDetailHistory.java 0 → 100644
  1 +package com.huaheng.pc.shipment.shipmentDetailHistory.domain;
  2 +
  3 +import com.baomidou.mybatisplus.annotation.IdType;
  4 +import com.baomidou.mybatisplus.annotation.TableField;
  5 +import com.baomidou.mybatisplus.annotation.TableId;
  6 +import com.baomidou.mybatisplus.annotation.TableName;
  7 +import io.swagger.annotations.ApiModel;
  8 +import io.swagger.annotations.ApiModelProperty;
  9 +
  10 +import java.io.Serializable;
  11 +import java.math.BigDecimal;
  12 +import java.util.Date;
  13 +
  14 +@ApiModel(value="com.huaheng.pc.shipment.shipmentDetail.domain.ShipmentDetailHistory")
  15 +@TableName(value = "shipment_detail_history")
  16 +public class ShipmentDetailHistory implements Serializable {
  17 + /**
  18 + * 出库单内部行号
  19 + */
  20 + @TableId(value = "id", type = IdType.AUTO)
  21 + @ApiModelProperty(value="出库单内部行号")
  22 + private Integer id;
  23 +
  24 + /**
  25 + * 出库单内部号
  26 + */
  27 + @TableField(value = "shipmentId")
  28 + @ApiModelProperty(value="出库单内部号")
  29 + private Integer shipmentId;
  30 +
  31 + /**
  32 + * 仓库
  33 + */
  34 + @TableField(value = "warehouseCode")
  35 + @ApiModelProperty(value="仓库")
  36 + private String warehouseCode;
  37 +
  38 + /**
  39 + * 货主
  40 + */
  41 + @TableField(value = "companyCode")
  42 + @ApiModelProperty(value="货主")
  43 + private String companyCode;
  44 +
  45 + /**
  46 + * 出库单号
  47 + */
  48 + @TableField(value = "shipmentCode")
  49 + @ApiModelProperty(value="出库单号")
  50 + private String shipmentCode;
  51 +
  52 + /**
  53 + * 上游订单号
  54 + */
  55 + @TableField(value = "referCode")
  56 + @ApiModelProperty(value="上游订单号")
  57 + private String referCode;
  58 +
  59 + /**
  60 + * 上游订单内部号
  61 + */
  62 + @TableField(value = "referId")
  63 + @ApiModelProperty(value="上游订单内部号")
  64 + private Integer referId;
  65 +
  66 + /**
  67 + * 上游订单行号
  68 + */
  69 + @TableField(value = "referLineNum")
  70 + @ApiModelProperty(value="上游订单行号")
  71 + private String referLineNum;
  72 +
  73 + /**
  74 + * 物料
  75 + */
  76 + @TableField(value = "materialCode")
  77 + @ApiModelProperty(value="物料")
  78 + private String materialCode;
  79 +
  80 + /**
  81 + * 物料描述
  82 + */
  83 + @TableField(value = "materialName")
  84 + @ApiModelProperty(value="物料描述")
  85 + private String materialName;
  86 +
  87 + /**
  88 + * 物料规格
  89 + */
  90 + @TableField(value = "materialSpec")
  91 + @ApiModelProperty(value="物料规格")
  92 + private String materialSpec;
  93 +
  94 + /**
  95 + * 物料单位
  96 + */
  97 + @TableField(value = "materialUnit")
  98 + @ApiModelProperty(value="物料单位")
  99 + private String materialUnit;
  100 +
  101 + /**
  102 + * 发货数量
  103 + */
  104 + @TableField(value = "shipQty")
  105 + @ApiModelProperty(value="发货数量")
  106 + private BigDecimal shipQty;
  107 +
  108 + /**
  109 + * 请求数量
  110 + */
  111 + @TableField(value = "requestQty")
  112 + @ApiModelProperty(value="请求数量")
  113 + private BigDecimal requestQty;
  114 +
  115 + /**
  116 + * 分配规则
  117 + */
  118 + @TableField(value = "allocationRule")
  119 + @ApiModelProperty(value="分配规则")
  120 + private String allocationRule;
  121 +
  122 + /**
  123 + * 补货规则
  124 + */
  125 + @TableField(value = "replenishmentRule")
  126 + @ApiModelProperty(value="补货规则")
  127 + private String replenishmentRule;
  128 +
  129 + /**
  130 + * 拣货货位
  131 + */
  132 + @TableField(value = "pickLocs")
  133 + @ApiModelProperty(value="拣货货位")
  134 + private String pickLocs;
  135 +
  136 + /**
  137 + * 属性1
  138 + */
  139 + @TableField(value = "attribute1")
  140 + @ApiModelProperty(value="属性1")
  141 + private String attribute1;
  142 +
  143 + /**
  144 + * 属性2
  145 + */
  146 + @TableField(value = "attribute2")
  147 + @ApiModelProperty(value="属性2")
  148 + private String attribute2;
  149 +
  150 + /**
  151 + * 属性3
  152 + */
  153 + @TableField(value = "attribute3")
  154 + @ApiModelProperty(value="属性3")
  155 + private String attribute3;
  156 +
  157 + /**
  158 + * 属性4
  159 + */
  160 + @TableField(value = "attribute4")
  161 + @ApiModelProperty(value="属性4")
  162 + private String attribute4;
  163 +
  164 + /**
  165 + * 批次
  166 + */
  167 + @TableField(value = "batch")
  168 + @ApiModelProperty(value="批次")
  169 + private String batch;
  170 +
  171 + /**
  172 + * 批号
  173 + */
  174 + @TableField(value = "lot")
  175 + @ApiModelProperty(value="批号")
  176 + private String lot;
  177 +
  178 + /**
  179 + * 项目号
  180 + */
  181 + @TableField(value = "projectNo")
  182 + @ApiModelProperty(value="项目号")
  183 + private String projectNo;
  184 +
  185 + /**
  186 + * 生产日期
  187 + */
  188 + @TableField(value = "manufactureDate")
  189 + @ApiModelProperty(value="生产日期")
  190 + private Date manufactureDate;
  191 +
  192 + /**
  193 + * 失效日期
  194 + */
  195 + @TableField(value = "expirationDate")
  196 + @ApiModelProperty(value="失效日期")
  197 + private Date expirationDate;
  198 +
  199 + /**
  200 + * 入库日期
  201 + */
  202 + @TableField(value = "agingDate")
  203 + @ApiModelProperty(value="入库日期")
  204 + private Date agingDate;
  205 +
  206 + /**
  207 + * 库存状态
  208 + */
  209 + @TableField(value = "inventorySts")
  210 + @ApiModelProperty(value="库存状态")
  211 + private String inventorySts;
  212 +
  213 + /**
  214 + * 月台货位
  215 + */
  216 + @TableField(value = "dockLoc")
  217 + @ApiModelProperty(value="月台货位")
  218 + private String dockLoc;
  219 +
  220 + /**
  221 + * 包装分类
  222 + */
  223 + @TableField(value = "packingClass")
  224 + @ApiModelProperty(value="包装分类")
  225 + private String packingClass;
  226 +
  227 +
  228 + /**
  229 + * 状态
  230 + */
  231 + @TableField(value = "status")
  232 + @ApiModelProperty(value="状态")
  233 + private Integer status;
  234 +
  235 + /**
  236 + * 波次号
  237 + */
  238 + @TableField(value = "waveId")
  239 + @ApiModelProperty(value="波次号")
  240 + private Integer waveId;
  241 +
  242 + /**
  243 + * 创建时间
  244 + */
  245 + @TableField(value = "created")
  246 + @ApiModelProperty(value="创建时间")
  247 + private Date created;
  248 +
  249 + /**
  250 + * 创建用户
  251 + */
  252 + @TableField(value = "createdBy")
  253 + @ApiModelProperty(value="创建用户")
  254 + private String createdBy;
  255 +
  256 + /**
  257 + * 创建时间
  258 + */
  259 + @TableField(value = "lastUpdated")
  260 + @ApiModelProperty(value="创建时间")
  261 + private Date lastUpdated;
  262 +
  263 + /**
  264 + * 更新用户
  265 + */
  266 + @TableField(value = "lastUpdatedBy")
  267 + @ApiModelProperty(value="更新用户")
  268 + private String lastUpdatedBy;
  269 +
  270 + /**
  271 + * 数据版本
  272 + */
  273 + @TableField(value = "version")
  274 + @ApiModelProperty(value="数据版本")
  275 + private Integer version;
  276 +
  277 + /**
  278 + * 自定义字段1
  279 + */
  280 + @TableField(value = "userDef1")
  281 + @ApiModelProperty(value="自定义字段1")
  282 + private String userDef1;
  283 +
  284 + /**
  285 + * 自定义字段2
  286 + */
  287 + @TableField(value = "userDef2")
  288 + @ApiModelProperty(value="自定义字段2")
  289 + private String userDef2;
  290 +
  291 + /**
  292 + * 自定义字段3
  293 + */
  294 + @TableField(value = "userDef3")
  295 + @ApiModelProperty(value="自定义字段3")
  296 + private String userDef3;
  297 +
  298 + /**
  299 + * 处理标记
  300 + */
  301 + @TableField(value = "processStamp")
  302 + @ApiModelProperty(value="处理标记")
  303 + private String processStamp;
  304 +
  305 + private static final long serialVersionUID = 1L;
  306 +
  307 + public static final String COL_SHIPMENTID = "shipmentId";
  308 +
  309 + public static final String COL_WAREHOUSECODE = "warehouseCode";
  310 +
  311 + public static final String COL_COMPANYCODE = "companyCode";
  312 +
  313 + public static final String COL_SHIPMENTCODE = "shipmentCode";
  314 +
  315 + public static final String COL_REFERCODE = "referCode";
  316 +
  317 + public static final String COL_REFERID = "referId";
  318 +
  319 + public static final String COL_REFERLINENUM = "referLineNum";
  320 +
  321 + public static final String COL_MATERIALCODE = "materialCode";
  322 +
  323 + public static final String COL_MATERIALNAME = "materialName";
  324 +
  325 + public static final String COL_MATERIALSPEC = "materialSpec";
  326 +
  327 + public static final String COL_MATERIALUNIT = "materialUnit";
  328 +
  329 + public static final String COL_SHIPQTY = "shipQty";
  330 +
  331 + public static final String COL_REQUESTQTY = "requestQty";
  332 +
  333 + public static final String COL_ALLOCATIONRULE = "allocationRule";
  334 +
  335 + public static final String COL_REPLENISHMENTRULE = "replenishmentRule";
  336 +
  337 + public static final String COL_PICKLOCS = "pickLocs";
  338 +
  339 + public static final String COL_ATTRIBUTE1 = "attribute1";
  340 +
  341 + public static final String COL_ATTRIBUTE2 = "attribute2";
  342 +
  343 + public static final String COL_ATTRIBUTE3 = "attribute3";
  344 +
  345 + public static final String COL_ATTRIBUTE4 = "attribute4";
  346 +
  347 + public static final String COL_BATCH = "batch";
  348 +
  349 + public static final String COL_LOT = "lot";
  350 +
  351 + public static final String COL_PROJECTNO = "projectNo";
  352 +
  353 + public static final String COL_MANUFACTUREDATE = "manufactureDate";
  354 +
  355 + public static final String COL_EXPIRATIONDATE = "expirationDate";
  356 +
  357 + public static final String COL_AGINGDATE = "agingDate";
  358 +
  359 + public static final String COL_INVENTORYSTS = "inventorySts";
  360 +
  361 + public static final String COL_DOCKLOC = "dockLoc";
  362 +
  363 + public static final String COL_PACKINGCLASS = "packingClass";
  364 +
  365 + public static final String COL_ENABLE = "enable";
  366 +
  367 + public static final String COL_WAVEID = "waveId";
  368 +
  369 + public static final String COL_CREATED = "created";
  370 +
  371 + public static final String COL_CREATEDBY = "createdBy";
  372 +
  373 + public static final String COL_LASTUPDATED = "lastUpdated";
  374 +
  375 + public static final String COL_LASTUPDATEDBY = "lastUpdatedBy";
  376 +
  377 + public static final String COL_VERSION = "version";
  378 +
  379 + public static final String COL_USERDEF1 = "userDef1";
  380 +
  381 + public static final String COL_USERDEF2 = "userDef2";
  382 +
  383 + public static final String COL_USERDEF3 = "userDef3";
  384 +
  385 + public static final String COL_PROCESSSTAMP = "processStamp";
  386 +
  387 + /**
  388 + * 获取出库单内部行号
  389 + *
  390 + * @return id - 出库单内部行号
  391 + */
  392 + public Integer getId() {
  393 + return id;
  394 + }
  395 +
  396 + /**
  397 + * 设置出库单内部行号
  398 + *
  399 + * @param id 出库单内部行号
  400 + */
  401 + public void setId(Integer id) {
  402 + this.id = id;
  403 + }
  404 +
  405 + /**
  406 + * 获取出库单内部号
  407 + *
  408 + * @return shipmentId - 出库单内部号
  409 + */
  410 + public Integer getShipmentId() {
  411 + return shipmentId;
  412 + }
  413 +
  414 + /**
  415 + * 设置出库单内部号
  416 + *
  417 + * @param shipmentId 出库单内部号
  418 + */
  419 + public void setShipmentId(Integer shipmentId) {
  420 + this.shipmentId = shipmentId;
  421 + }
  422 +
  423 + /**
  424 + * 获取仓库
  425 + *
  426 + * @return warehouseCode - 仓库
  427 + */
  428 + public String getWarehouseCode() {
  429 + return warehouseCode;
  430 + }
  431 +
  432 + /**
  433 + * 设置仓库
  434 + *
  435 + * @param warehouseCode 仓库
  436 + */
  437 + public void setWarehouseCode(String warehouseCode) {
  438 + this.warehouseCode = warehouseCode;
  439 + }
  440 +
  441 + /**
  442 + * 获取货主
  443 + *
  444 + * @return companyCode - 货主
  445 + */
  446 + public String getCompanyCode() {
  447 + return companyCode;
  448 + }
  449 +
  450 + /**
  451 + * 设置货主
  452 + *
  453 + * @param companyCode 货主
  454 + */
  455 + public void setCompanyCode(String companyCode) {
  456 + this.companyCode = companyCode;
  457 + }
  458 +
  459 + /**
  460 + * 获取出库单号
  461 + *
  462 + * @return shipmentCode - 出库单号
  463 + */
  464 + public String getShipmentCode() {
  465 + return shipmentCode;
  466 + }
  467 +
  468 + /**
  469 + * 设置出库单号
  470 + *
  471 + * @param shipmentCode 出库单号
  472 + */
  473 + public void setShipmentCode(String shipmentCode) {
  474 + this.shipmentCode = shipmentCode;
  475 + }
  476 +
  477 + /**
  478 + * 获取上游订单号
  479 + *
  480 + * @return referCode - 上游订单号
  481 + */
  482 + public String getReferCode() {
  483 + return referCode;
  484 + }
  485 +
  486 + /**
  487 + * 设置上游订单号
  488 + *
  489 + * @param referCode 上游订单号
  490 + */
  491 + public void setReferCode(String referCode) {
  492 + this.referCode = referCode;
  493 + }
  494 +
  495 + /**
  496 + * 获取上游订单内部号
  497 + *
  498 + * @return referId - 上游订单内部号
  499 + */
  500 + public Integer getReferId() {
  501 + return referId;
  502 + }
  503 +
  504 + /**
  505 + * 设置上游订单内部号
  506 + *
  507 + * @param referId 上游订单内部号
  508 + */
  509 + public void setReferId(Integer referId) {
  510 + this.referId = referId;
  511 + }
  512 +
  513 + /**
  514 + * 获取上游订单行号
  515 + *
  516 + * @return referLineNum - 上游订单行号
  517 + */
  518 + public String getReferLineNum() {
  519 + return referLineNum;
  520 + }
  521 +
  522 + /**
  523 + * 设置上游订单行号
  524 + *
  525 + * @param referLineNum 上游订单行号
  526 + */
  527 + public void setReferLineNum(String referLineNum) {
  528 + this.referLineNum = referLineNum;
  529 + }
  530 +
  531 + /**
  532 + * 获取物料
  533 + *
  534 + * @return materialCode - 物料
  535 + */
  536 + public String getMaterialCode() {
  537 + return materialCode;
  538 + }
  539 +
  540 + /**
  541 + * 设置物料
  542 + *
  543 + * @param materialCode 物料
  544 + */
  545 + public void setMaterialCode(String materialCode) {
  546 + this.materialCode = materialCode;
  547 + }
  548 +
  549 + /**
  550 + * 获取物料描述
  551 + *
  552 + * @return materialName - 物料描述
  553 + */
  554 + public String getMaterialName() {
  555 + return materialName;
  556 + }
  557 +
  558 + /**
  559 + * 设置物料描述
  560 + *
  561 + * @param materialName 物料描述
  562 + */
  563 + public void setMaterialName(String materialName) {
  564 + this.materialName = materialName;
  565 + }
  566 +
  567 + /**
  568 + * 获取物料规格
  569 + *
  570 + * @return materialSpec - 物料规格
  571 + */
  572 + public String getMaterialSpec() {
  573 + return materialSpec;
  574 + }
  575 +
  576 + /**
  577 + * 设置物料规格
  578 + *
  579 + * @param materialSpec 物料规格
  580 + */
  581 + public void setMaterialSpec(String materialSpec) {
  582 + this.materialSpec = materialSpec;
  583 + }
  584 +
  585 + /**
  586 + * 获取物料单位
  587 + *
  588 + * @return materialUnit - 物料单位
  589 + */
  590 + public String getMaterialUnit() {
  591 + return materialUnit;
  592 + }
  593 +
  594 + /**
  595 + * 设置物料单位
  596 + *
  597 + * @param materialUnit 物料单位
  598 + */
  599 + public void setMaterialUnit(String materialUnit) {
  600 + this.materialUnit = materialUnit;
  601 + }
  602 +
  603 + public BigDecimal getShipQty() {
  604 + return shipQty;
  605 + }
  606 +
  607 + public void setShipQty(BigDecimal shipQty) {
  608 + this.shipQty = shipQty;
  609 + }
  610 +
  611 + public BigDecimal getRequestQty() {
  612 + return requestQty;
  613 + }
  614 +
  615 + public void setRequestQty(BigDecimal requestQty) {
  616 + this.requestQty = requestQty;
  617 + }
  618 +
  619 + /**
  620 + * 获取分配规则
  621 + *
  622 + * @return allocationRule - 分配规则
  623 + */
  624 + public String getAllocationRule() {
  625 + return allocationRule;
  626 + }
  627 +
  628 + /**
  629 + * 设置分配规则
  630 + *
  631 + * @param allocationRule 分配规则
  632 + */
  633 + public void setAllocationRule(String allocationRule) {
  634 + this.allocationRule = allocationRule;
  635 + }
  636 +
  637 + /**
  638 + * 获取补货规则
  639 + *
  640 + * @return replenishmentRule - 补货规则
  641 + */
  642 + public String getReplenishmentRule() {
  643 + return replenishmentRule;
  644 + }
  645 +
  646 + /**
  647 + * 设置补货规则
  648 + *
  649 + * @param replenishmentRule 补货规则
  650 + */
  651 + public void setReplenishmentRule(String replenishmentRule) {
  652 + this.replenishmentRule = replenishmentRule;
  653 + }
  654 +
  655 + /**
  656 + * 获取拣货货位
  657 + *
  658 + * @return pickLocs - 拣货货位
  659 + */
  660 + public String getPickLocs() {
  661 + return pickLocs;
  662 + }
  663 +
  664 + /**
  665 + * 设置拣货货位
  666 + *
  667 + * @param pickLocs 拣货货位
  668 + */
  669 + public void setPickLocs(String pickLocs) {
  670 + this.pickLocs = pickLocs;
  671 + }
  672 +
  673 + /**
  674 + * 获取属性1
  675 + *
  676 + * @return attribute1 - 属性1
  677 + */
  678 + public String getAttribute1() {
  679 + return attribute1;
  680 + }
  681 +
  682 + /**
  683 + * 设置属性1
  684 + *
  685 + * @param attribute1 属性1
  686 + */
  687 + public void setAttribute1(String attribute1) {
  688 + this.attribute1 = attribute1;
  689 + }
  690 +
  691 + /**
  692 + * 获取属性2
  693 + *
  694 + * @return attribute2 - 属性2
  695 + */
  696 + public String getAttribute2() {
  697 + return attribute2;
  698 + }
  699 +
  700 + /**
  701 + * 设置属性2
  702 + *
  703 + * @param attribute2 属性2
  704 + */
  705 + public void setAttribute2(String attribute2) {
  706 + this.attribute2 = attribute2;
  707 + }
  708 +
  709 + /**
  710 + * 获取属性3
  711 + *
  712 + * @return attribute3 - 属性3
  713 + */
  714 + public String getAttribute3() {
  715 + return attribute3;
  716 + }
  717 +
  718 + /**
  719 + * 设置属性3
  720 + *
  721 + * @param attribute3 属性3
  722 + */
  723 + public void setAttribute3(String attribute3) {
  724 + this.attribute3 = attribute3;
  725 + }
  726 +
  727 + /**
  728 + * 获取属性4
  729 + *
  730 + * @return attribute4 - 属性4
  731 + */
  732 + public String getAttribute4() {
  733 + return attribute4;
  734 + }
  735 +
  736 + /**
  737 + * 设置属性4
  738 + *
  739 + * @param attribute4 属性4
  740 + */
  741 + public void setAttribute4(String attribute4) {
  742 + this.attribute4 = attribute4;
  743 + }
  744 +
  745 + /**
  746 + * 获取批次
  747 + *
  748 + * @return batch - 批次
  749 + */
  750 + public String getBatch() {
  751 + return batch;
  752 + }
  753 +
  754 + /**
  755 + * 设置批次
  756 + *
  757 + * @param batch 批次
  758 + */
  759 + public void setBatch(String batch) {
  760 + this.batch = batch;
  761 + }
  762 +
  763 + /**
  764 + * 获取批号
  765 + *
  766 + * @return lot - 批号
  767 + */
  768 + public String getLot() {
  769 + return lot;
  770 + }
  771 +
  772 + /**
  773 + * 设置批号
  774 + *
  775 + * @param lot 批号
  776 + */
  777 + public void setLot(String lot) {
  778 + this.lot = lot;
  779 + }
  780 +
  781 + /**
  782 + * 获取项目号
  783 + *
  784 + * @return projectNo - 项目号
  785 + */
  786 + public String getProjectNo() {
  787 + return projectNo;
  788 + }
  789 +
  790 + /**
  791 + * 设置项目号
  792 + *
  793 + * @param projectNo 项目号
  794 + */
  795 + public void setProjectNo(String projectNo) {
  796 + this.projectNo = projectNo;
  797 + }
  798 +
  799 + /**
  800 + * 获取生产日期
  801 + *
  802 + * @return manufactureDate - 生产日期
  803 + */
  804 + public Date getManufactureDate() {
  805 + return manufactureDate;
  806 + }
  807 +
  808 + /**
  809 + * 设置生产日期
  810 + *
  811 + * @param manufactureDate 生产日期
  812 + */
  813 + public void setManufactureDate(Date manufactureDate) {
  814 + this.manufactureDate = manufactureDate;
  815 + }
  816 +
  817 + /**
  818 + * 获取失效日期
  819 + *
  820 + * @return expirationDate - 失效日期
  821 + */
  822 + public Date getExpirationDate() {
  823 + return expirationDate;
  824 + }
  825 +
  826 + /**
  827 + * 设置失效日期
  828 + *
  829 + * @param expirationDate 失效日期
  830 + */
  831 + public void setExpirationDate(Date expirationDate) {
  832 + this.expirationDate = expirationDate;
  833 + }
  834 +
  835 + /**
  836 + * 获取入库日期
  837 + *
  838 + * @return agingDate - 入库日期
  839 + */
  840 + public Date getAgingDate() {
  841 + return agingDate;
  842 + }
  843 +
  844 + /**
  845 + * 设置入库日期
  846 + *
  847 + * @param agingDate 入库日期
  848 + */
  849 + public void setAgingDate(Date agingDate) {
  850 + this.agingDate = agingDate;
  851 + }
  852 +
  853 + /**
  854 + * 获取库存状态
  855 + *
  856 + * @return inventorySts - 库存状态
  857 + */
  858 + public String getInventorySts() {
  859 + return inventorySts;
  860 + }
  861 +
  862 + /**
  863 + * 设置库存状态
  864 + *
  865 + * @param inventorySts 库存状态
  866 + */
  867 + public void setInventorySts(String inventorySts) {
  868 + this.inventorySts = inventorySts;
  869 + }
  870 +
  871 + /**
  872 + * 获取月台货位
  873 + *
  874 + * @return dockLoc - 月台货位
  875 + */
  876 + public String getDockLoc() {
  877 + return dockLoc;
  878 + }
  879 +
  880 + /**
  881 + * 设置月台货位
  882 + *
  883 + * @param dockLoc 月台货位
  884 + */
  885 + public void setDockLoc(String dockLoc) {
  886 + this.dockLoc = dockLoc;
  887 + }
  888 +
  889 + /**
  890 + * 获取包装分类
  891 + *
  892 + * @return packingClass - 包装分类
  893 + */
  894 + public String getPackingClass() {
  895 + return packingClass;
  896 + }
  897 +
  898 + /**
  899 + * 设置包装分类
  900 + *
  901 + * @param packingClass 包装分类
  902 + */
  903 + public void setPackingClass(String packingClass) {
  904 + this.packingClass = packingClass;
  905 + }
  906 +
  907 + public Integer getStatus() {
  908 + return status;
  909 + }
  910 +
  911 + public void setStatus(Integer status) {
  912 + this.status = status;
  913 + }
  914 +
  915 + /**
  916 + * 获取波次号
  917 + *
  918 + * @return waveId - 波次号
  919 + */
  920 + public Integer getWaveId() {
  921 + return waveId;
  922 + }
  923 +
  924 + /**
  925 + * 设置波次号
  926 + *
  927 + * @param waveId 波次号
  928 + */
  929 + public void setWaveId(Integer waveId) {
  930 + this.waveId = waveId;
  931 + }
  932 +
  933 + /**
  934 + * 获取创建时间
  935 + *
  936 + * @return created - 创建时间
  937 + */
  938 + public Date getCreated() {
  939 + return created;
  940 + }
  941 +
  942 + /**
  943 + * 设置创建时间
  944 + *
  945 + * @param created 创建时间
  946 + */
  947 + public void setCreated(Date created) {
  948 + this.created = created;
  949 + }
  950 +
  951 + /**
  952 + * 获取创建用户
  953 + *
  954 + * @return createdBy - 创建用户
  955 + */
  956 + public String getCreatedBy() {
  957 + return createdBy;
  958 + }
  959 +
  960 + /**
  961 + * 设置创建用户
  962 + *
  963 + * @param createdBy 创建用户
  964 + */
  965 + public void setCreatedBy(String createdBy) {
  966 + this.createdBy = createdBy;
  967 + }
  968 +
  969 + /**
  970 + * 获取创建时间
  971 + *
  972 + * @return lastUpdated - 创建时间
  973 + */
  974 + public Date getLastUpdated() {
  975 + return lastUpdated;
  976 + }
  977 +
  978 + /**
  979 + * 设置创建时间
  980 + *
  981 + * @param lastUpdated 创建时间
  982 + */
  983 + public void setLastUpdated(Date lastUpdated) {
  984 + this.lastUpdated = lastUpdated;
  985 + }
  986 +
  987 + /**
  988 + * 获取更新用户
  989 + *
  990 + * @return lastUpdatedBy - 更新用户
  991 + */
  992 + public String getLastUpdatedBy() {
  993 + return lastUpdatedBy;
  994 + }
  995 +
  996 + /**
  997 + * 设置更新用户
  998 + *
  999 + * @param lastUpdatedBy 更新用户
  1000 + */
  1001 + public void setLastUpdatedBy(String lastUpdatedBy) {
  1002 + this.lastUpdatedBy = lastUpdatedBy;
  1003 + }
  1004 +
  1005 + /**
  1006 + * 获取数据版本
  1007 + *
  1008 + * @return version - 数据版本
  1009 + */
  1010 + public Integer getVersion() {
  1011 + return version;
  1012 + }
  1013 +
  1014 + /**
  1015 + * 设置数据版本
  1016 + *
  1017 + * @param version 数据版本
  1018 + */
  1019 + public void setVersion(Integer version) {
  1020 + this.version = version;
  1021 + }
  1022 +
  1023 + /**
  1024 + * 获取自定义字段1
  1025 + *
  1026 + * @return userDef1 - 自定义字段1
  1027 + */
  1028 + public String getUserDef1() {
  1029 + return userDef1;
  1030 + }
  1031 +
  1032 + /**
  1033 + * 设置自定义字段1
  1034 + *
  1035 + * @param userDef1 自定义字段1
  1036 + */
  1037 + public void setUserDef1(String userDef1) {
  1038 + this.userDef1 = userDef1;
  1039 + }
  1040 +
  1041 + /**
  1042 + * 获取自定义字段2
  1043 + *
  1044 + * @return userDef2 - 自定义字段2
  1045 + */
  1046 + public String getUserDef2() {
  1047 + return userDef2;
  1048 + }
  1049 +
  1050 + /**
  1051 + * 设置自定义字段2
  1052 + *
  1053 + * @param userDef2 自定义字段2
  1054 + */
  1055 + public void setUserDef2(String userDef2) {
  1056 + this.userDef2 = userDef2;
  1057 + }
  1058 +
  1059 + /**
  1060 + * 获取自定义字段3
  1061 + *
  1062 + * @return userDef3 - 自定义字段3
  1063 + */
  1064 + public String getUserDef3() {
  1065 + return userDef3;
  1066 + }
  1067 +
  1068 + /**
  1069 + * 设置自定义字段3
  1070 + *
  1071 + * @param userDef3 自定义字段3
  1072 + */
  1073 + public void setUserDef3(String userDef3) {
  1074 + this.userDef3 = userDef3;
  1075 + }
  1076 +
  1077 +
  1078 + /**
  1079 + * 获取处理标记
  1080 + *
  1081 + * @return processStamp - 处理标记
  1082 + */
  1083 + public String getProcessStamp() {
  1084 + return processStamp;
  1085 + }
  1086 +
  1087 + /**
  1088 + * 设置处理标记
  1089 + *
  1090 + * @param processStamp 处理标记
  1091 + */
  1092 + public void setProcessStamp(String processStamp) {
  1093 + this.processStamp = processStamp;
  1094 + }
  1095 +}
0 1096 \ No newline at end of file
... ...
src/main/java/com/huaheng/pc/shipment/shipmentDetailHistory/mapper/ShipmentDetailHistoryMapper.java 0 → 100644
  1 +package com.huaheng.pc.shipment.shipmentDetailHistory.mapper;
  2 +
  3 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  4 +import com.huaheng.pc.shipment.shipmentDetailHistory.domain.ShipmentDetailHistory;
  5 +
  6 +import java.util.List;
  7 +import java.util.Map;
  8 +
  9 +
  10 +public interface ShipmentDetailHistoryMapper extends BaseMapper<ShipmentDetailHistory> {
  11 +
  12 +
  13 + List<Map<String,Integer>> SelectFirstStatus(String ids);
  14 +
  15 + Integer batchDelete(String[] ids);
  16 +
  17 + Map<String,String> StatisticalByReceiptId(Integer headerId);
  18 +
  19 +}
0 20 \ No newline at end of file
... ...
src/main/java/com/huaheng/pc/shipment/shipmentDetailHistory/service/ShipmentDetailHistoryService.java 0 → 100644
  1 +package com.huaheng.pc.shipment.shipmentDetailHistory.service;
  2 +
  3 +import com.baomidou.mybatisplus.extension.service.IService;
  4 +import com.huaheng.framework.web.domain.AjaxResult;
  5 +import com.huaheng.pc.shipment.shipmentDetailHistory.domain.ShipmentDetailHistory;
  6 +
  7 +public interface ShipmentDetailHistoryService extends IService<ShipmentDetailHistory>{
  8 +
  9 + AjaxResult deleteDetail(String id);
  10 +
  11 +
  12 +}
... ...
src/main/java/com/huaheng/pc/shipment/shipmentDetailHistory/service/ShipmentDetailHistoryServiceImpl.java 0 → 100644
  1 +package com.huaheng.pc.shipment.shipmentDetailHistory.service;
  2 +
  3 +
  4 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  5 +import com.huaheng.common.utils.DataUtils;
  6 +import com.huaheng.common.utils.StringUtils;
  7 +import com.huaheng.framework.web.domain.AjaxResult;
  8 +import com.huaheng.pc.shipment.shipmentDetailHistory.domain.ShipmentDetailHistory;
  9 +import com.huaheng.pc.shipment.shipmentDetailHistory.mapper.ShipmentDetailHistoryMapper;
  10 +import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader;
  11 +import com.huaheng.pc.shipment.shipmentHeaderHistory.domain.ShipmentHeaderHistory;
  12 +import com.huaheng.pc.shipment.shipmentHeaderHistory.service.ShipmentHeaderHistoryService;
  13 +import org.springframework.beans.factory.annotation.Autowired;
  14 +import org.springframework.stereotype.Service;
  15 +import org.springframework.transaction.annotation.Transactional;
  16 +
  17 +import javax.annotation.Resource;
  18 +import java.util.List;
  19 +import java.util.Map;
  20 +
  21 +@Service
  22 +public class ShipmentDetailHistoryServiceImpl extends ServiceImpl<ShipmentDetailHistoryMapper, ShipmentDetailHistory> implements ShipmentDetailHistoryService {
  23 +
  24 +
  25 + @Resource
  26 + private ShipmentDetailHistoryMapper shipmentDetailHistoryMapper;
  27 + @Autowired
  28 + private ShipmentHeaderHistoryService shipmentHeaderHistoryService;
  29 +
  30 + /**
  31 + * 删除出库单据明细
  32 + *
  33 + * @param id
  34 + * @return
  35 + */
  36 + @Override
  37 + @Transactional
  38 + public AjaxResult deleteDetail(String id) {
  39 + if (StringUtils.isEmpty(id))
  40 + return AjaxResult.error("id不能为空");
  41 + String[] ids = id.split(",");
  42 + List<Map<String,Integer>> list = shipmentDetailHistoryMapper.SelectFirstStatus(id);
  43 + if (list.size() < 1) {
  44 + return AjaxResult.error("找不到主单据!");
  45 + }
  46 + if (list.size() > 1) {
  47 + return AjaxResult.error("有多个主单据,不能一起删除!");
  48 + }
  49 + if (list.get(0).get("firstStatus") > 100) {
  50 + return AjaxResult.error("单据状进入订单池,不允许删除明细");
  51 + }
  52 + Integer result = shipmentDetailHistoryMapper.batchDelete(ids);
  53 + if (result > 0) {
  54 + Integer headerId=list.get(0).get("id");
  55 + Map<String,String> map= shipmentDetailHistoryMapper.StatisticalByReceiptId(headerId);
  56 + if(DataUtils.getInteger(map.get("totalLines")) <= 0) {
  57 + shipmentHeaderHistoryService.removeById(headerId);
  58 + }
  59 + else {
  60 + //更新表头的总行数和总数量统计
  61 + ShipmentHeaderHistory shipmentHeaderHistory = new ShipmentHeaderHistory();
  62 + shipmentHeaderHistory.setId(headerId);
  63 + shipmentHeaderHistory.setTotalLines(DataUtils.getInteger(map.get("totalLines")));
  64 + shipmentHeaderHistory.setTotalQty(DataUtils.getBigDecimal(map.get("totalQty")));
  65 + shipmentHeaderHistoryService.saveOrUpdate(shipmentHeaderHistory);
  66 + }
  67 + return AjaxResult.success("删除单据明细成功");
  68 + }
  69 + else
  70 + return AjaxResult.error("删除单据明细失败");
  71 + }
  72 +}
... ...
src/main/java/com/huaheng/pc/shipment/shipmentHeader/controller/ShipmentHeaderController.java
... ... @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4 4 import com.baomidou.mybatisplus.core.metadata.IPage;
5 5 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
6 6 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  7 +import com.huaheng.common.exception.service.ServiceException;
7 8 import com.huaheng.common.support.Convert;
8 9 import com.huaheng.common.utils.StringUtils;
9 10 import com.huaheng.common.utils.security.ShiroUtils;
... ... @@ -11,7 +12,6 @@ import com.huaheng.framework.aspectj.lang.annotation.Log;
11 12 import com.huaheng.framework.aspectj.lang.constant.BusinessType;
12 13 import com.huaheng.framework.web.controller.BaseController;
13 14 import com.huaheng.framework.web.domain.AjaxResult;
14   -import com.huaheng.framework.web.domain.RetCode;
15 15 import com.huaheng.framework.web.page.PageDomain;
16 16 import com.huaheng.framework.web.page.TableDataInfo;
17 17 import com.huaheng.framework.web.page.TableSupport;
... ... @@ -22,9 +22,11 @@ import com.huaheng.pc.shipment.shipmentHeader.service.ShipmentHeaderService;
22 22 import org.apache.shiro.authz.annotation.RequiresPermissions;
23 23 import org.springframework.beans.factory.annotation.Autowired;
24 24 import org.springframework.stereotype.Controller;
  25 +import org.springframework.transaction.annotation.Transactional;
25 26 import org.springframework.ui.ModelMap;
26 27 import org.springframework.web.bind.annotation.*;
27 28  
  29 +import java.lang.reflect.InvocationTargetException;
28 30 import java.util.List;
29 31  
30 32  
... ... @@ -44,7 +46,6 @@ public class ShipmentHeaderController extends BaseController
44 46 private ShipmentHeaderService shipmentHeaderService;
45 47 @Autowired
46 48 private ShipmentDetailService shipmentDetailService;
47   -
48 49  
49 50 @RequiresPermissions("shipment:bill:view")
50 51 @GetMapping()
... ... @@ -155,18 +156,25 @@ public class ShipmentHeaderController extends BaseController
155 156 @Log(title = "出库-出库单", operating="删除出库主单", action = BusinessType.DELETE)
156 157 @PostMapping( "/remove")
157 158 @ResponseBody
158   - public AjaxResult remove(String ids) {
  159 + @Transactional
  160 + public AjaxResult remove(String ids) throws InvocationTargetException, IllegalAccessException {
159 161 if (StringUtils.isEmpty(ids))
160 162 return AjaxResult.error("id不能为空");
161 163 for (Integer id : Convert.toIntArray(ids))
162 164 {
163   - ShipmentHeader shipmentHeader=new ShipmentHeader();
164   - shipmentHeader.setId(id);
  165 + ShipmentHeader shipmentHeader=shipmentHeaderService.getById(id);
  166 +
  167 + //出库单设定为历史出库单,并删除出库单
  168 + shipmentHeaderService.addHistory(shipmentHeader);
165 169 shipmentHeader.setDeleted(true);
166   - boolean result=shipmentHeaderService.updateById(shipmentHeader);
  170 + boolean result=shipmentHeaderService.removeById(id);
167 171 if(result==false){
168   - return AjaxResult.error("删除失败");
  172 + throw new ServiceException("删除失败");
169 173 }
  174 + LambdaQueryWrapper<ShipmentDetail> shipmentDetailLambdaQueryWrapper=Wrappers.lambdaQuery();
  175 + shipmentDetailLambdaQueryWrapper.eq(ShipmentDetail::getShipmentCode,shipmentHeader.getCode())
  176 + .eq(ShipmentDetail::getWarehouseCode,shipmentHeader.getWarehouseCode());
  177 + shipmentDetailService.remove(shipmentDetailLambdaQueryWrapper);
170 178 }
171 179 return AjaxResult.success("删除成功!");
172 180 }
... ...
src/main/java/com/huaheng/pc/shipment/shipmentHeader/service/ShipmentHeaderService.java
... ... @@ -3,6 +3,9 @@ package com.huaheng.pc.shipment.shipmentHeader.service;
3 3 import com.huaheng.framework.web.domain.AjaxResult;
4 4 import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader;
5 5 import com.baomidou.mybatisplus.extension.service.IService;
  6 +
  7 +import java.lang.reflect.InvocationTargetException;
  8 +
6 9 public interface ShipmentHeaderService extends IService<ShipmentHeader>{
7 10  
8 11 //新增出库主单
... ... @@ -15,4 +18,6 @@ public interface ShipmentHeaderService extends IService&lt;ShipmentHeader&gt;{
15 18 //根据Id更新这个单据的首尾状态
16 19 AjaxResult updateShipmentStatus(int shipmentId);
17 20  
  21 + AjaxResult addHistory(ShipmentHeader shipmentHeader) throws InvocationTargetException, IllegalAccessException;
  22 +
18 23 }
... ...
src/main/java/com/huaheng/pc/shipment/shipmentHeader/service/ShipmentHeaderServiceImpl.java
1 1 package com.huaheng.pc.shipment.shipmentHeader.service;
2 2  
  3 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  4 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  5 +import com.huaheng.common.exception.service.ServiceException;
3 6 import com.huaheng.common.utils.security.ShiroUtils;
4 7 import com.huaheng.framework.web.domain.AjaxResult;
5 8 import com.huaheng.pc.shipment.shipmentContainerHeader.service.ShipmentContainerHeaderService;
  9 +import com.huaheng.pc.shipment.shipmentDetail.domain.ShipmentDetail;
6 10 import com.huaheng.pc.shipment.shipmentDetail.service.ShipmentDetailService;
  11 +import com.huaheng.pc.shipment.shipmentDetailHistory.domain.ShipmentDetailHistory;
  12 +import com.huaheng.pc.shipment.shipmentDetailHistory.service.ShipmentDetailHistoryService;
  13 +import com.huaheng.pc.shipment.shipmentHeaderHistory.domain.ShipmentHeaderHistory;
  14 +import com.huaheng.pc.shipment.shipmentHeaderHistory.service.ShipmentHeaderHistoryService;
7 15 import com.huaheng.pc.system.dict.service.IDictDataService;
  16 +import org.apache.commons.beanutils.BeanUtils;
8 17 import org.springframework.beans.factory.annotation.Autowired;
9 18 import org.springframework.stereotype.Service;
10 19 import javax.annotation.Resource;
  20 +import java.lang.reflect.InvocationTargetException;
11 21 import java.text.SimpleDateFormat;
  22 +import java.util.ArrayList;
12 23 import java.util.Date;
13 24 import java.util.List;
14 25 import java.util.Map;
... ... @@ -17,6 +28,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
17 28 import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader;
18 29 import com.huaheng.pc.shipment.shipmentHeader.mapper.ShipmentHeaderMapper;
19 30 import com.huaheng.pc.shipment.shipmentHeader.service.ShipmentHeaderService;
  31 +import org.springframework.transaction.annotation.Transactional;
  32 +
20 33 @Service
21 34 public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, ShipmentHeader> implements ShipmentHeaderService{
22 35  
... ... @@ -28,6 +41,11 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl&lt;ShipmentHeaderMapper,
28 41 private ShipmentDetailService shipmentDetailService;
29 42 @Autowired
30 43 private ShipmentContainerHeaderService shipmentContainerHeaderService;
  44 + @Autowired
  45 + private ShipmentHeaderHistoryService shipmentHeaderHistoryService;
  46 + @Autowired
  47 + private ShipmentDetailHistoryService shipmentDetailHistoryService;
  48 +
31 49  
32 50  
33 51 //新增出库主单
... ... @@ -122,4 +140,33 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl&lt;ShipmentHeaderMapper,
122 140 return AjaxResult.success("");
123 141  
124 142 }
  143 +
  144 + //出库单字段变为历史出库单
  145 + @Override
  146 + @Transactional
  147 + public AjaxResult addHistory(ShipmentHeader shipmentHeader) throws InvocationTargetException, IllegalAccessException {
  148 + //历史出库主单
  149 + ShipmentHeaderHistory shipmentHeaderHistory=new ShipmentHeaderHistory();
  150 + BeanUtils.copyProperties(shipmentHeaderHistory,shipmentHeader);
  151 + if(shipmentHeaderHistoryService.save(shipmentHeaderHistory)==false){
  152 + throw new ServiceException("存入历史出库主单失败");
  153 + }
  154 + LambdaQueryWrapper<ShipmentDetail> lambdaQueryWrapper=Wrappers.lambdaQuery();
  155 + lambdaQueryWrapper.eq(ShipmentDetail::getWarehouseCode,shipmentHeader.getWarehouseCode())
  156 + .eq(ShipmentDetail::getShipmentCode,shipmentHeader.getCode());
  157 + List<ShipmentDetail> shipmentDetails=shipmentDetailService.list(lambdaQueryWrapper);
  158 +
  159 + //历史出库子单
  160 + List<ShipmentDetailHistory> shipmentDetailHistories=new ArrayList<>();
  161 + for(ShipmentDetail item:shipmentDetails){
  162 + ShipmentDetailHistory shipmentDetailHistory=new ShipmentDetailHistory();
  163 + BeanUtils.copyProperties(shipmentDetailHistory,item);
  164 + shipmentDetailHistories.add(shipmentDetailHistory);
  165 + }
  166 + Boolean flag=shipmentDetailHistoryService.saveBatch(shipmentDetailHistories);
  167 + if(flag==false){
  168 + throw new ServiceException("存入历史出库子单失败");
  169 + }
  170 + return null;
  171 + }
125 172 }
... ...
src/main/java/com/huaheng/pc/shipment/shipmentHeaderHistory/controller/ShipmentHeaderHistoryController.java
... ... @@ -14,10 +14,10 @@ import com.huaheng.framework.web.domain.AjaxResult;
14 14 import com.huaheng.framework.web.page.PageDomain;
15 15 import com.huaheng.framework.web.page.TableDataInfo;
16 16 import com.huaheng.framework.web.page.TableSupport;
17   -import com.huaheng.pc.shipment.shipmentDetail.domain.ShipmentDetail;
18   -import com.huaheng.pc.shipment.shipmentDetail.service.ShipmentDetailService;
19   -import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader;
20   -import com.huaheng.pc.shipment.shipmentHeader.service.ShipmentHeaderService;
  17 +import com.huaheng.pc.shipment.shipmentDetailHistory.domain.ShipmentDetailHistory;
  18 +import com.huaheng.pc.shipment.shipmentDetailHistory.service.ShipmentDetailHistoryService;
  19 +import com.huaheng.pc.shipment.shipmentHeaderHistory.domain.ShipmentHeaderHistory;
  20 +import com.huaheng.pc.shipment.shipmentHeaderHistory.service.ShipmentHeaderHistoryService;
21 21 import org.apache.shiro.authz.annotation.RequiresPermissions;
22 22 import org.springframework.beans.factory.annotation.Autowired;
23 23 import org.springframework.stereotype.Controller;
... ... @@ -40,14 +40,14 @@ public class ShipmentHeaderHistoryController extends BaseController
40 40 private String prefix = "shipment/shipmentHeaderHistory";
41 41  
42 42 @Autowired
43   - private ShipmentHeaderService shipmentHeaderService;
  43 + private ShipmentHeaderHistoryService shipmentHeaderHistoryService;
44 44 @Autowired
45   - private ShipmentDetailService shipmentDetailService;
  45 + private ShipmentDetailHistoryService shipmentDetailHistoryService;
46 46  
47 47  
48 48 @RequiresPermissions("shipment:bill:view")
49 49 @GetMapping()
50   - public String shipmentHeader()
  50 + public String shipmentHeaderHistory()
51 51 {
52 52 return prefix + "/shipmentHeaderHistory";
53 53 }
... ... @@ -56,38 +56,38 @@ public class ShipmentHeaderHistoryController extends BaseController
56 56 * 查询出库单主列表
57 57 */
58 58 @RequiresPermissions("shipment:bill:list")
59   - @Log(title = "出库-出库单", operating="查看出库主单", action = BusinessType.GRANT)
  59 + @Log(title = "出库-出库单历史", operating="查看历史出库主单", action = BusinessType.GRANT)
60 60 @PostMapping("/list")
61 61 @ResponseBody
62   - public TableDataInfo list(ShipmentHeader shipmentHeader,String createdBegin, String createdEnd)
  62 + public TableDataInfo list(ShipmentHeaderHistory shipmentHeaderHistory, String createdBegin, String createdEnd)
63 63 {
64   - LambdaQueryWrapper<ShipmentHeader> lambdaQueryWrapper = Wrappers.lambdaQuery();
  64 + LambdaQueryWrapper<ShipmentHeaderHistory> lambdaQueryWrapper = Wrappers.lambdaQuery();
65 65 PageDomain pageDomain = TableSupport.buildPageRequest();
66 66 Integer pageNum = pageDomain.getPageNum();
67 67 Integer pageSize = pageDomain.getPageSize();
68 68  
69   - lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin),ShipmentHeader::getCreated, createdBegin)
70   - .le(StringUtils.isNotEmpty(createdEnd), ShipmentHeader::getCreated, createdEnd)
71   - .eq(ShipmentHeader::getWarehouseCode,ShiroUtils.getWarehouseCode())
72   - .eq(ShipmentHeader::getDeleted,true)
73   - .in(ShipmentHeader::getCompanyCode,ShiroUtils.getCompanyCodeList())
74   - .eq(StringUtils.isNotEmpty(shipmentHeader.getCode()),ShipmentHeader::getCode,shipmentHeader.getCode())
75   - .eq(StringUtils.isNotEmpty(shipmentHeader.getShipmentType()),ShipmentHeader::getShipmentType,shipmentHeader.getShipmentType())
76   - .eq(StringUtils.isNotEmpty(shipmentHeader.getReferCode()), ShipmentHeader::getReferCode, shipmentHeader.getReferCode())
77   - .eq(StringUtils.isNotEmpty(shipmentHeader.getReferCodeType()), ShipmentHeader::getReferCodeType, shipmentHeader.getReferCodeType())
78   - .eq(shipmentHeader.getFirstStatus()!=null, ShipmentHeader::getFirstStatus, shipmentHeader.getFirstStatus())
79   - .eq(shipmentHeader.getLastStatus()!=null, ShipmentHeader::getLastStatus, shipmentHeader.getLastStatus())
80   - .orderByDesc(ShipmentHeader::getId);
  69 + lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin),ShipmentHeaderHistory::getCreated, createdBegin)
  70 + .le(StringUtils.isNotEmpty(createdEnd), ShipmentHeaderHistory::getCreated, createdEnd)
  71 + .eq(ShipmentHeaderHistory::getWarehouseCode,ShiroUtils.getWarehouseCode())
  72 + .eq(ShipmentHeaderHistory::getDeleted,false)
  73 + .in(ShipmentHeaderHistory::getCompanyCode,ShiroUtils.getCompanyCodeList())
  74 + .eq(StringUtils.isNotEmpty(shipmentHeaderHistory.getCode()),ShipmentHeaderHistory::getCode,shipmentHeaderHistory.getCode())
  75 + .eq(StringUtils.isNotEmpty(shipmentHeaderHistory.getShipmentType()),ShipmentHeaderHistory::getShipmentType,shipmentHeaderHistory.getShipmentType())
  76 + .eq(StringUtils.isNotEmpty(shipmentHeaderHistory.getReferCode()), ShipmentHeaderHistory::getReferCode, shipmentHeaderHistory.getReferCode())
  77 + .eq(StringUtils.isNotEmpty(shipmentHeaderHistory.getReferCodeType()), ShipmentHeaderHistory::getReferCodeType, shipmentHeaderHistory.getReferCodeType())
  78 + .eq(shipmentHeaderHistory.getFirstStatus()!=null, ShipmentHeaderHistory::getFirstStatus, shipmentHeaderHistory.getFirstStatus())
  79 + .eq(shipmentHeaderHistory.getLastStatus()!=null, ShipmentHeaderHistory::getLastStatus, shipmentHeaderHistory.getLastStatus())
  80 + .orderByDesc(ShipmentHeaderHistory::getId);
81 81  
82 82 if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){
83 83 /**
84 84 * 使用分页查询
85 85 */
86   - Page<ShipmentHeader> page = new Page<>(pageNum, pageSize);
87   - IPage<ShipmentHeader> iPage = shipmentHeaderService.page(page, lambdaQueryWrapper);
  86 + Page<ShipmentHeaderHistory> page = new Page<>(pageNum, pageSize);
  87 + IPage<ShipmentHeaderHistory> iPage = shipmentHeaderHistoryService.page(page, lambdaQueryWrapper);
88 88 return getMpDataTable(iPage.getRecords(),iPage.getTotal());
89 89 } else {
90   - List<ShipmentHeader> list = shipmentHeaderService.list(lambdaQueryWrapper);
  90 + List<ShipmentHeaderHistory> list = shipmentHeaderHistoryService.list(lambdaQueryWrapper);
91 91 return getDataTable(list);
92 92 }
93 93 }
... ... @@ -97,7 +97,7 @@ public class ShipmentHeaderHistoryController extends BaseController
97 97 * 删除出库单主
98 98 */
99 99 @RequiresPermissions("shipment:bill:remove")
100   - @Log(title = "出库-出库单", operating="删除出库主单", action = BusinessType.DELETE)
  100 + @Log(title = "出库-历史出库单", operating="删除历史出库主单", action = BusinessType.DELETE)
101 101 @PostMapping( "/remove")
102 102 @ResponseBody
103 103 public AjaxResult remove(String ids) {
... ... @@ -105,12 +105,12 @@ public class ShipmentHeaderHistoryController extends BaseController
105 105 return AjaxResult.error("id不能为空");
106 106 for (Integer id : Convert.toIntArray(ids))
107 107 {
108   - boolean result=shipmentHeaderService.removeById(id);
109   - LambdaQueryWrapper<ShipmentDetail> lambdaQueryWrapper=Wrappers.lambdaQuery();
110   - lambdaQueryWrapper.eq(ShipmentDetail::getShipmentId,id)
111   - .eq(ShipmentDetail::getWarehouseCode,ShiroUtils.getWarehouseCode());
  108 + boolean result=shipmentHeaderHistoryService.removeById(id);
  109 + LambdaQueryWrapper<ShipmentDetailHistory> lambdaQueryWrapper=Wrappers.lambdaQuery();
  110 + lambdaQueryWrapper.eq(ShipmentDetailHistory::getShipmentId,id)
  111 + .eq(ShipmentDetailHistory::getWarehouseCode,ShiroUtils.getWarehouseCode());
112 112 Boolean flag=true;
113   - flag=shipmentDetailService.remove(lambdaQueryWrapper);
  113 + flag=shipmentDetailHistoryService.remove(lambdaQueryWrapper);
114 114 if(flag==false){
115 115 return AjaxResult.error("删除失败");
116 116 }
... ... @@ -126,17 +126,17 @@ public class ShipmentHeaderHistoryController extends BaseController
126 126 * @return
127 127 */
128 128 @RequiresPermissions("shipment:bill:report")
129   - @Log(title = "出库-出库单", operating="打印出库单报表", action = BusinessType.OTHER)
  129 + @Log(title = "出库-历史出库单", operating="打印历史出库单报表", action = BusinessType.OTHER)
130 130 @GetMapping("/report/{id}")
131 131 public String report(@PathVariable("id") Integer id, ModelMap mmap)
132 132 {
133   - ShipmentHeader shipmentHeader = shipmentHeaderService.getById(id);
134   - mmap.put("shipmentHeader", shipmentHeader);
  133 + ShipmentHeaderHistory shipmentHeaderHistory = shipmentHeaderHistoryService.getById(id);
  134 + mmap.put("shipmentHeader", shipmentHeaderHistory);
135 135  
136   - LambdaQueryWrapper<ShipmentDetail> lambdaQueryWrapper = Wrappers.lambdaQuery();
137   - lambdaQueryWrapper.eq(ShipmentDetail::getShipmentId,id)
138   - .eq(ShipmentDetail::getWarehouseCode,ShiroUtils.getWarehouseCode());
139   - List<ShipmentDetail> details = shipmentDetailService.list(lambdaQueryWrapper);
  136 + LambdaQueryWrapper<ShipmentDetailHistory> lambdaQueryWrapper = Wrappers.lambdaQuery();
  137 + lambdaQueryWrapper.eq(ShipmentDetailHistory::getShipmentId,id)
  138 + .eq(ShipmentDetailHistory::getWarehouseCode,ShiroUtils.getWarehouseCode());
  139 + List<ShipmentDetailHistory> details = shipmentDetailHistoryService.list(lambdaQueryWrapper);
140 140 mmap.put("details", details);
141 141  
142 142 return prefix + "/report";
... ... @@ -144,8 +144,8 @@ public class ShipmentHeaderHistoryController extends BaseController
144 144  
145 145 @PostMapping("/getShipmentHeader")
146 146 @ResponseBody
147   - public AjaxResult<ShipmentHeader> getShipmentHeader(int id){
148   - return AjaxResult.success(shipmentHeaderService.getById(id));
  147 + public AjaxResult<ShipmentHeaderHistory> getShipmentHeader(int id){
  148 + return AjaxResult.success(shipmentHeaderHistoryService.getById(id));
149 149 }
150 150  
151 151  
... ...
src/main/java/com/huaheng/pc/shipment/shipmentHeaderHistory/domain/ShipmentHeaderHistory.java 0 → 100644
  1 +package com.huaheng.pc.shipment.shipmentHeaderHistory.domain;
  2 +
  3 +import com.baomidou.mybatisplus.annotation.IdType;
  4 +import com.baomidou.mybatisplus.annotation.TableField;
  5 +import com.baomidou.mybatisplus.annotation.TableId;
  6 +import com.baomidou.mybatisplus.annotation.TableName;
  7 +import io.swagger.annotations.ApiModel;
  8 +import io.swagger.annotations.ApiModelProperty;
  9 +import lombok.Data;
  10 +
  11 +import java.io.Serializable;
  12 +import java.math.BigDecimal;
  13 +import java.util.Date;
  14 +
  15 +@ApiModel(value = "com.huaheng.pc.shipment.shipmentHeaderHistory.domain.ShipmentHeaderHistory")
  16 +@Data
  17 +@TableName(value = "shipment_header_history")
  18 +public class ShipmentHeaderHistory implements Serializable {
  19 + /**
  20 + * 出库单内部号
  21 + */
  22 + @TableId(value = "id", type = IdType.AUTO)
  23 + @ApiModelProperty(value = "出库单内部号")
  24 + private Integer id;
  25 +
  26 + /**
  27 + * 仓库
  28 + */
  29 + @TableField(value = "warehouseCode")
  30 + @ApiModelProperty(value = "仓库")
  31 + private String warehouseCode;
  32 +
  33 + /**
  34 + * 货主
  35 + */
  36 + @TableField(value = "companyCode")
  37 + @ApiModelProperty(value = "货主")
  38 + private String companyCode;
  39 +
  40 +
  41 +
  42 + /**
  43 + * 出库单号
  44 + */
  45 + @TableField(value = "code")
  46 + @ApiModelProperty(value = "出库单号")
  47 + private String code;
  48 +
  49 + /**
  50 + * erp订单号
  51 + */
  52 + @TableField(value = "referCode")
  53 + @ApiModelProperty(value = "erp订单号")
  54 + private String referCode;
  55 +
  56 + /**
  57 + * erp订单类型
  58 + */
  59 + @TableField(value = "referCodeType")
  60 + @ApiModelProperty(value = "erp订单类型")
  61 + private String referCodeType;
  62 +
  63 + /**
  64 + * erp订单内部号
  65 + */
  66 + @TableField(value = "referId")
  67 + @ApiModelProperty(value = "erp订单内部号")
  68 + private Integer referId;
  69 +
  70 + /**
  71 + * 订单平台
  72 + */
  73 + @TableField(value = "referPlatform")
  74 + @ApiModelProperty(value = "订单平台")
  75 + private Integer referPlatform;
  76 +
  77 + /**
  78 + * 主状态
  79 + */
  80 + @TableField(value = "firstStatus")
  81 + @ApiModelProperty(value = "主状态")
  82 + private Integer firstStatus;
  83 +
  84 + /**
  85 + * 拖状态
  86 + */
  87 + @TableField(value = "lastStatus")
  88 + @ApiModelProperty(value = "拖状态")
  89 + private Integer lastStatus;
  90 +
  91 + /**
  92 + * 出库单类型
  93 + */
  94 + @TableField(value = "shipmentType")
  95 + @ApiModelProperty(value = "出库单类型")
  96 + private String shipmentType;
  97 +
  98 + /**
  99 + * 路线
  100 + */
  101 + @TableField(value = "route")
  102 + @ApiModelProperty(value = "路线")
  103 + private String route;
  104 +
  105 + /**
  106 + * 客户编号
  107 + */
  108 + @TableField(value = "customerCode")
  109 + @ApiModelProperty(value = "客户编号")
  110 + private String customerCode;
  111 +
  112 + /**
  113 + * 客户名称
  114 + */
  115 + @TableField(value = "customerName")
  116 + @ApiModelProperty(value = "客户名称")
  117 + private String customerName;
  118 +
  119 + /**
  120 + * 优先级
  121 + */
  122 + @TableField(value = "priority")
  123 + @ApiModelProperty(value = "优先级")
  124 + private Integer priority;
  125 +
  126 + /**
  127 + * 要求到货时间
  128 + */
  129 + @TableField(value = "requestedDeliveryDate")
  130 + @ApiModelProperty(value = "要求到货时间")
  131 + private Date requestedDeliveryDate;
  132 +
  133 +
  134 +
  135 + /**
  136 + * 计划发车日期
  137 + */
  138 + @TableField(value = "scheduledShipDate")
  139 + @ApiModelProperty(value = "计划发车日期")
  140 + private Date scheduledShipDate;
  141 +
  142 + /**
  143 + * 实际发车时间
  144 + */
  145 + @TableField(value = "actualShipDateTime")
  146 + @ApiModelProperty(value = "实际发车时间")
  147 + private Date actualShipDateTime;
  148 +
  149 + /**
  150 + * 实际到货时间
  151 + */
  152 + @TableField(value = "actualDeliveryDate")
  153 + @ApiModelProperty(value = "实际到货时间")
  154 + private Date actualDeliveryDate;
  155 +
  156 + /**
  157 + * 配送要求
  158 + */
  159 + @TableField(value = "deliveryNote")
  160 + @ApiModelProperty(value = "配送要求")
  161 + private String deliveryNote;
  162 +
  163 + /**
  164 + * 失败原因
  165 + */
  166 + @TableField(value = "rejectionNote")
  167 + @ApiModelProperty(value = "失败原因")
  168 + private String rejectionNote;
  169 +
  170 + /**
  171 + * 波次号
  172 + */
  173 + @TableField(value = "waveId")
  174 + @ApiModelProperty(value = "波次号")
  175 + private Integer waveId;
  176 +
  177 + /**
  178 + * 发货月台
  179 + */
  180 + @TableField(value = "shipDock")
  181 + @ApiModelProperty(value = "发货月台")
  182 + private String shipDock;
  183 +
  184 + /**
  185 + * 分配完成
  186 + */
  187 + @TableField(value = "allocateComplete")
  188 + @ApiModelProperty(value = "分配完成")
  189 + private Integer allocateComplete;
  190 +
  191 + /**
  192 + * 总重量
  193 + */
  194 + @TableField(value = "totalWeight")
  195 + @ApiModelProperty(value = "总重量")
  196 + private BigDecimal totalWeight;
  197 +
  198 + /**
  199 + * 总数量
  200 + */
  201 + @TableField(value = "totalQty")
  202 + @ApiModelProperty(value = "总数量")
  203 + private BigDecimal totalQty;
  204 +
  205 + /**
  206 + * 总体积
  207 + */
  208 + @TableField(value = "totalVolume")
  209 + @ApiModelProperty(value = "总体积")
  210 + private BigDecimal totalVolume;
  211 +
  212 + /**
  213 + * 总行数
  214 + */
  215 + @TableField(value = "totalLines")
  216 + @ApiModelProperty(value = "总行数")
  217 + private Integer totalLines;
  218 +
  219 +
  220 +
  221 + /**
  222 + * 处理类型
  223 + */
  224 + @TableField(value = "processType")
  225 + @ApiModelProperty(value = "处理类型")
  226 + private String processType;
  227 +
  228 + /**
  229 + * 上次波次号
  230 + */
  231 + @TableField(value = "lastWaveId")
  232 + @ApiModelProperty(value = "上次波次号")
  233 + private Integer lastWaveId;
  234 +
  235 + /**
  236 + * 特征值
  237 + */
  238 + @TableField(value = "signValue")
  239 + @ApiModelProperty(value = "特征值")
  240 + private String signValue;
  241 +
  242 + /**
  243 + * 承运人
  244 + */
  245 + @TableField(value = "carrierCode")
  246 + @ApiModelProperty(value = "承运人")
  247 + private String carrierCode;
  248 +
  249 + /**
  250 + * 承运人服务商
  251 + */
  252 + @TableField(value = "carrierService")
  253 + @ApiModelProperty(value = "承运人服务商")
  254 + private String carrierService;
  255 +
  256 + /**
  257 + * 订单备注
  258 + */
  259 + @TableField(value = "shipmentNote")
  260 + @ApiModelProperty(value = "订单备注")
  261 + private String shipmentNote;
  262 +
  263 + /**
  264 + * 承运商编码
  265 + */
  266 + @TableField(value = "carrierServer")
  267 + @ApiModelProperty(value = "承运商编码")
  268 + private String carrierServer;
  269 +
  270 + /**
  271 + * 承运商名称
  272 + */
  273 + @TableField(value = "carrierServerName")
  274 + @ApiModelProperty(value = "承运商名称")
  275 + private String carrierServerName;
  276 +
  277 + /**
  278 + * 车牌号
  279 + */
  280 + @TableField(value = "plateNumber")
  281 + @ApiModelProperty(value = "车牌号")
  282 + private String plateNumber;
  283 +
  284 + /**
  285 + * 车型
  286 + */
  287 + @TableField(value = "carModel")
  288 + @ApiModelProperty(value = "车型")
  289 + private String carModel;
  290 +
  291 + /**
  292 + * 司机名称
  293 + */
  294 + @TableField(value = "driverName")
  295 + @ApiModelProperty(value = "司机名称")
  296 + private String driverName;
  297 +
  298 + /**
  299 + * 司机联系方式
  300 + */
  301 + @TableField(value = "driverTel")
  302 + @ApiModelProperty(value = "司机联系方式")
  303 + private String driverTel;
  304 +
  305 + /**
  306 + * 创建时间
  307 + */
  308 + @TableField(value = "created")
  309 + @ApiModelProperty(value = "创建时间")
  310 + private Date created;
  311 +
  312 + /**
  313 + * 创建用户
  314 + */
  315 + @TableField(value = "createdBy")
  316 + @ApiModelProperty(value = "创建用户")
  317 + private String createdBy;
  318 +
  319 + /**
  320 + * 创建时间
  321 + */
  322 + @TableField(value = "lastUpdated")
  323 + @ApiModelProperty(value = "创建时间")
  324 + private Date lastUpdated;
  325 +
  326 + /**
  327 + * 更新用户
  328 + */
  329 + @TableField(value = "lastUpdatedBy")
  330 + @ApiModelProperty(value = "更新用户")
  331 + private String lastUpdatedBy;
  332 +
  333 + /**
  334 + * 数据版本
  335 + */
  336 + @TableField(value = "version")
  337 + @ApiModelProperty(value = "数据版本")
  338 + private Integer version;
  339 +
  340 + /**
  341 + * 自定义字段1
  342 + */
  343 + @TableField(value = "userDef1")
  344 + @ApiModelProperty(value = "自定义字段1")
  345 + private String userDef1;
  346 +
  347 + /**
  348 + * 自定义字段2
  349 + */
  350 + @TableField(value = "userDef2")
  351 + @ApiModelProperty(value = "自定义字段2")
  352 + private String userDef2;
  353 +
  354 + /**
  355 + * 自定义字段3
  356 + */
  357 + @TableField(value = "userDef3")
  358 + @ApiModelProperty(value = "自定义字段3")
  359 + private String userDef3;
  360 + /**
  361 + * 处理标记
  362 + */
  363 + @TableField(value = "processStamp")
  364 + @ApiModelProperty(value = "处理标记")
  365 + private String processStamp;
  366 +
  367 + /**
  368 + * 是否删除
  369 + */
  370 + @TableField(value = "deleted")
  371 + @ApiModelProperty(value = "是否删除")
  372 + private Boolean deleted;
  373 +
  374 + private static final long serialVersionUID = 1L;
  375 +
  376 + public static final String COL_WAREHOUSECODE = "warehouseCode";
  377 +
  378 + public static final String COL_COMPANYCODE = "companyCode";
  379 +
  380 + public static final String COL_CODE = "code";
  381 +
  382 + public static final String COL_REFERCODE = "referCode";
  383 +
  384 + public static final String COL_REFERCODETYPE = "referCodeType";
  385 +
  386 + public static final String COL_REFERID = "referId";
  387 +
  388 + public static final String COL_REFERPLATFORM = "referPlatform";
  389 +
  390 + public static final String COL_FIRSTSTATUS = "firstStatus";
  391 +
  392 + public static final String COL_LASTSTATUS = "lastStatus";
  393 +
  394 + public static final String COL_SHIPMENTTYPE = "shipmentType";
  395 +
  396 + public static final String COL_ROUTE = "route";
  397 +
  398 + public static final String COL_CUSTOMERCODE = "customerCode";
  399 +
  400 + public static final String COL_CUSTOMERNAME = "customerName";
  401 +
  402 + public static final String COL_PRIORITY = "priority";
  403 +
  404 + public static final String COL_REQUESTEDDELIVERYDATE = "requestedDeliveryDate";
  405 +
  406 + public static final String COL_SCHEDULEDSHIPDATE = "scheduledShipDate";
  407 +
  408 + public static final String COL_ACTUALSHIPDATETIME = "actualShipDateTime";
  409 +
  410 + public static final String COL_ACTUALDELIVERYDATE = "actualDeliveryDate";
  411 +
  412 + public static final String COL_DELIVERYNOTE = "deliveryNote";
  413 +
  414 + public static final String COL_REJECTIONNOTE = "rejectionNote";
  415 +
  416 + public static final String COL_WAVEID = "waveId";
  417 +
  418 + public static final String COL_SHIPDOCK = "shipDock";
  419 +
  420 + public static final String COL_ALLOCATECOMPLETE = "allocateComplete";
  421 +
  422 + public static final String COL_TOTALWEIGHT = "totalWeight";
  423 +
  424 + public static final String COL_TOTALQTY = "totalQty";
  425 +
  426 + public static final String COL_TOTALVOLUME = "totalVolume";
  427 +
  428 + public static final String COL_TOTALLINES = "totalLines";
  429 +
  430 + public static final String COL_PROCESSTYPE = "processType";
  431 +
  432 + public static final String COL_LASTWAVEID = "lastWaveId";
  433 +
  434 + public static final String COL_SIGNVALUE = "signValue";
  435 +
  436 + public static final String COL_CARRIERCODE = "carrierCode";
  437 +
  438 + public static final String COL_CARRIERSERVICE = "carrierService";
  439 +
  440 + public static final String COL_SHIPMENTNOTE = "shipmentNote";
  441 +
  442 + public static final String COL_CARRIERSERVER = "carrierServer";
  443 +
  444 + public static final String COL_CARRIERSERVERNAME = "carrierServerName";
  445 +
  446 + public static final String COL_PLATENUMBER = "plateNumber";
  447 +
  448 + public static final String COL_CARMODEL = "carModel";
  449 +
  450 + public static final String COL_DRIVERNAME = "driverName";
  451 +
  452 + public static final String COL_DRIVERTEL = "driverTel";
  453 +
  454 + public static final String COL_CREATED = "created";
  455 +
  456 + public static final String COL_CREATEDBY = "createdBy";
  457 +
  458 + public static final String COL_LASTUPDATED = "lastUpdated";
  459 +
  460 + public static final String COL_LASTUPDATEDBY = "lastUpdatedBy";
  461 +
  462 + public static final String COL_VERSION = "version";
  463 +
  464 + public static final String COL_USERDEF1 = "userDef1";
  465 +
  466 + public static final String COL_USERDEF2 = "userDef2";
  467 +
  468 + public static final String COL_USERDEF3 = "userDef3";
  469 +
  470 + public static final String COL_PROCESSSTAMP = "processStamp";
  471 +
  472 + public static final String COL_DELETED = "deleted";
  473 +}
0 474 \ No newline at end of file
... ...
src/main/java/com/huaheng/pc/shipment/shipmentHeaderHistory/mapper/ShipmentHeaderHistoryMapper.java 0 → 100644
  1 +package com.huaheng.pc.shipment.shipmentHeaderHistory.mapper;
  2 +
  3 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  4 +import com.huaheng.pc.shipment.shipmentHeaderHistory.domain.ShipmentHeaderHistory;
  5 +
  6 +public interface ShipmentHeaderHistoryMapper extends BaseMapper<ShipmentHeaderHistory> {
  7 +
  8 +
  9 +
  10 +}
0 11 \ No newline at end of file
... ...
src/main/java/com/huaheng/pc/shipment/shipmentHeaderHistory/service/ShipmentHeaderHistoryService.java 0 → 100644
  1 +package com.huaheng.pc.shipment.shipmentHeaderHistory.service;
  2 +
  3 +import com.baomidou.mybatisplus.extension.service.IService;
  4 +import com.huaheng.pc.shipment.shipmentHeaderHistory.domain.ShipmentHeaderHistory;
  5 +
  6 +public interface ShipmentHeaderHistoryService extends IService<ShipmentHeaderHistory>{
  7 +
  8 +
  9 +}
... ...
src/main/java/com/huaheng/pc/shipment/shipmentHeaderHistory/service/ShipmentHeaderHistoryServiceImpl.java 0 → 100644
  1 +package com.huaheng.pc.shipment.shipmentHeaderHistory.service;
  2 +
  3 +
  4 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  5 +import com.huaheng.pc.shipment.shipmentHeaderHistory.domain.ShipmentHeaderHistory;
  6 +import com.huaheng.pc.shipment.shipmentHeaderHistory.mapper.ShipmentHeaderHistoryMapper;
  7 +import org.springframework.stereotype.Service;
  8 +
  9 +
  10 +@Service
  11 +public class ShipmentHeaderHistoryServiceImpl extends ServiceImpl<ShipmentHeaderHistoryMapper, ShipmentHeaderHistory> implements ShipmentHeaderHistoryService {
  12 +
  13 +}
... ...
src/main/resources/mybatis/config/MaterialTypeMapper.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="com.huaheng.pc.config.materialType.mapper.MaterialTypeMapper">
  4 + <resultMap id="BaseResultMap" type="com.huaheng.pc.config.materialType.domain.MaterialType">
  5 + <!--@mbg.generated-->
  6 + <id column="id" jdbcType="INTEGER" property="id" />
  7 + <result column="code" jdbcType="VARCHAR" property="code" />
  8 + <result column="name" jdbcType="VARCHAR" property="name" />
  9 + <result column="companyCode" jdbcType="VARCHAR" property="companyCode" />
  10 + <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" />
  11 + <result column="abcClass" jdbcType="VARCHAR" property="abcClass" />
  12 + <result column="daysToExpire" jdbcType="INTEGER" property="daysToExpire" />
  13 + <result column="receivingFlow" jdbcType="VARCHAR" property="receivingFlow" />
  14 + <result column="shippingFlow" jdbcType="VARCHAR" property="shippingFlow" />
  15 + <result column="locatingRule" jdbcType="VARCHAR" property="locatingRule" />
  16 + <result column="allocationRule" jdbcType="VARCHAR" property="allocationRule" />
  17 + <result column="replenishmentRule" jdbcType="VARCHAR" property="replenishmentRule" />
  18 + <result column="emptyLocRule" jdbcType="VARCHAR" property="emptyLocRule" />
  19 + <result column="pickingRule" jdbcType="VARCHAR" property="pickingRule" />
  20 + <result column="attributeTemplateCode" jdbcType="VARCHAR" property="attributeTemplateCode" />
  21 + <result column="trackSerialNum" jdbcType="INTEGER" property="trackSerialNum" />
  22 + <result column="autoGenSerialNum" jdbcType="INTEGER" property="autoGenSerialNum" />
  23 + <result column="autoGenSerialNumFormat" jdbcType="VARCHAR" property="autoGenSerialNumFormat" />
  24 + <result column="snTemplateCode" jdbcType="VARCHAR" property="snTemplateCode" />
  25 + <result column="expiringDays" jdbcType="INTEGER" property="expiringDays" />
  26 + <result column="minShelfLifeDays" jdbcType="INTEGER" property="minShelfLifeDays" />
  27 + <result column="enable" jdbcType="INTEGER" property="enable" />
  28 + <result column="created" jdbcType="TIMESTAMP" property="created" />
  29 + <result column="createdBy" jdbcType="VARCHAR" property="createdBy" />
  30 + <result column="lastUpdated" jdbcType="TIMESTAMP" property="lastUpdated" />
  31 + <result column="lastUpdatedBy" jdbcType="VARCHAR" property="lastUpdatedBy" />
  32 + <result column="version" jdbcType="INTEGER" property="version" />
  33 + <result column="userDef1" jdbcType="VARCHAR" property="userDef1" />
  34 + <result column="userDef2" jdbcType="VARCHAR" property="userDef2" />
  35 + <result column="userDef3" jdbcType="VARCHAR" property="userDef3" />
  36 + <result column="userDef4" jdbcType="VARCHAR" property="userDef4" />
  37 + <result column="userDef5" jdbcType="VARCHAR" property="userDef5" />
  38 + <result column="userDef6" jdbcType="VARCHAR" property="userDef6" />
  39 + <result column="userDef7" jdbcType="VARCHAR" property="userDef7" />
  40 + <result column="userDef8" jdbcType="VARCHAR" property="userDef8" />
  41 + </resultMap>
  42 + <sql id="Base_Column_List">
  43 + <!--@mbg.generated-->
  44 + id, code, `name`, companyCode, warehouseCode, abcClass, daysToExpire, receivingFlow,
  45 + shippingFlow, locatingRule, allocationRule, replenishmentRule, emptyLocRule, pickingRule,
  46 + attributeTemplateCode, trackSerialNum, autoGenSerialNum, autoGenSerialNumFormat,
  47 + snTemplateCode, expiringDays, minShelfLifeDays, `enable`, created, createdBy, lastUpdated,
  48 + lastUpdatedBy, version, userDef1, userDef2, userDef3, userDef4, userDef5, userDef6,
  49 + userDef7, userDef8
  50 + </sql>
  51 +</mapper>
0 52 \ No newline at end of file
... ...
src/main/resources/mybatis/shipment/ShipmentDetailHistoryMapper.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="com.huaheng.pc.shipment.shipmentDetailHistory.mapper.ShipmentDetailHistoryMapper">
  4 + <resultMap id="BaseResultMap" type="com.huaheng.pc.shipment.shipmentDetailHistory.domain.ShipmentDetailHistory">
  5 + <!--@mbg.generated-->
  6 + <id column="id" jdbcType="INTEGER" property="id" />
  7 + <result column="shipmentId" jdbcType="INTEGER" property="shipmentId" />
  8 + <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" />
  9 + <result column="companyCode" jdbcType="VARCHAR" property="companyCode" />
  10 + <result column="shipmentCode" jdbcType="VARCHAR" property="shipmentCode" />
  11 + <result column="referCode" jdbcType="VARCHAR" property="referCode" />
  12 + <result column="referId" jdbcType="INTEGER" property="referId" />
  13 + <result column="referLineNum" jdbcType="VARCHAR" property="referLineNum" />
  14 + <result column="materialCode" jdbcType="VARCHAR" property="materialCode" />
  15 + <result column="materialName" jdbcType="VARCHAR" property="materialName" />
  16 + <result column="materialSpec" jdbcType="VARCHAR" property="materialSpec" />
  17 + <result column="materialUnit" jdbcType="VARCHAR" property="materialUnit" />
  18 + <result column="shipQty" jdbcType="INTEGER" property="shipQty" />
  19 + <result column="requestQty" jdbcType="INTEGER" property="requestQty" />
  20 + <result column="allocationRule" jdbcType="VARCHAR" property="allocationRule" />
  21 + <result column="replenishmentRule" jdbcType="VARCHAR" property="replenishmentRule" />
  22 + <result column="pickLocs" jdbcType="VARCHAR" property="pickLocs" />
  23 + <result column="attribute1" jdbcType="VARCHAR" property="attribute1" />
  24 + <result column="attribute2" jdbcType="VARCHAR" property="attribute2" />
  25 + <result column="attribute3" jdbcType="VARCHAR" property="attribute3" />
  26 + <result column="attribute4" jdbcType="VARCHAR" property="attribute4" />
  27 + <result column="batch" jdbcType="VARCHAR" property="batch" />
  28 + <result column="lot" jdbcType="VARCHAR" property="lot" />
  29 + <result column="projectNo" jdbcType="VARCHAR" property="projectNo" />
  30 + <result column="manufactureDate" jdbcType="DATE" property="manufactureDate" />
  31 + <result column="expirationDate" jdbcType="DATE" property="expirationDate" />
  32 + <result column="agingDate" jdbcType="DATE" property="agingDate" />
  33 + <result column="inventorySts" jdbcType="VARCHAR" property="inventorySts" />
  34 + <result column="dockLoc" jdbcType="VARCHAR" property="dockLoc" />
  35 + <result column="packingClass" jdbcType="VARCHAR" property="packingClass" />
  36 + <result column="status" jdbcType="INTEGER" property="status" />
  37 + <result column="waveId" jdbcType="INTEGER" property="waveId" />
  38 + <result column="created" jdbcType="TIMESTAMP" property="created" />
  39 + <result column="createdBy" jdbcType="VARCHAR" property="createdBy" />
  40 + <result column="lastUpdated" jdbcType="TIMESTAMP" property="lastUpdated" />
  41 + <result column="lastUpdatedBy" jdbcType="VARCHAR" property="lastUpdatedBy" />
  42 + <result column="version" jdbcType="INTEGER" property="version" />
  43 + <result column="userDef1" jdbcType="VARCHAR" property="userDef1" />
  44 + <result column="userDef2" jdbcType="VARCHAR" property="userDef2" />
  45 + <result column="userDef3" jdbcType="VARCHAR" property="userDef3" />
  46 + <result column="processStamp" jdbcType="VARCHAR" property="processStamp" />
  47 + </resultMap>
  48 + <sql id="Base_Column_List">
  49 + <!--@mbg.generated-->
  50 + id, shipmentId, warehouseCode, companyCode, shipmentCode, referCode, referId, referLineNum,
  51 + materialCode, materialName, materialSpec, materialUnit, shipQty, requestQty, allocationRule,
  52 + replenishmentRule, pickLocs, attribute1, attribute2, attribute3, attribute4, batch,
  53 + lot, projectNo, manufactureDate, expirationDate, agingDate, inventorySts, dockLoc,
  54 + packingClass, `enable`, waveId, created, createdBy, lastUpdated, lastUpdatedBy, version,
  55 + userDef1, userDef2, userDef3,processStamp
  56 + </sql>
  57 +
  58 + <select id="SelectFirstStatus" resultType="java.util.Map">
  59 + SELECT h.id, h.firstStatus
  60 + FROM shipment_header_history h
  61 + INNER JOIN shipment_detail_history d ON h.id = d.shipmentId AND d.id IN (#{ids})
  62 + GROUP BY h.id,firstStatus
  63 + </select>
  64 +
  65 + <delete id="batchDelete">
  66 + DELETE FROM shipment_detail_history WHERE id IN
  67 + <foreach item="idItem" collection="array" open="(" separator="," close=")">
  68 + #{idItem}
  69 + </foreach>
  70 + </delete>
  71 +
  72 + <select id="StatisticalByReceiptId" resultType="java.util.Map">
  73 + SELECT count(*) as 'totalLines',sum(shipQty) as 'totalQty'
  74 + FROM shipment_detail_history
  75 + WHERE shipmentId=#{headerId}
  76 + </select>
  77 +
  78 +</mapper>
0 79 \ No newline at end of file
... ...
src/main/resources/mybatis/shipment/ShipmentDetailMapper.xml
... ... @@ -43,11 +43,6 @@
43 43 <result column="userDef1" jdbcType="VARCHAR" property="userDef1" />
44 44 <result column="userDef2" jdbcType="VARCHAR" property="userDef2" />
45 45 <result column="userDef3" jdbcType="VARCHAR" property="userDef3" />
46   - <result column="userDef4" jdbcType="VARCHAR" property="userDef4" />
47   - <result column="userDef5" jdbcType="VARCHAR" property="userDef5" />
48   - <result column="userDef6" jdbcType="VARCHAR" property="userDef6" />
49   - <result column="userDef7" jdbcType="VARCHAR" property="userDef7" />
50   - <result column="userDef8" jdbcType="VARCHAR" property="userDef8" />
51 46 <result column="processStamp" jdbcType="VARCHAR" property="processStamp" />
52 47 </resultMap>
53 48 <sql id="Base_Column_List">
... ... @@ -57,7 +52,7 @@
57 52 replenishmentRule, pickLocs, attribute1, attribute2, attribute3, attribute4, batch,
58 53 lot, projectNo, manufactureDate, expirationDate, agingDate, inventorySts, dockLoc,
59 54 packingClass, `enable`, waveId, created, createdBy, lastUpdated, lastUpdatedBy, version,
60   - userDef1, userDef2, userDef3, userDef4, userDef5, userDef6, userDef7, userDef8, processStamp
  55 + userDef1, userDef2, userDef3,processStamp
61 56 </sql>
62 57  
63 58  
... ...
src/main/resources/mybatis/shipment/ShipmentHeaderHistoryMapper.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="com.huaheng.pc.shipment.shipmentHeaderHistory.mapper.ShipmentHeaderHistoryMapper">
  4 + <resultMap id="BaseResultMap" type="com.huaheng.pc.shipment.shipmentHeaderHistory.domain.ShipmentHeaderHistory">
  5 + <!--@mbg.generated-->
  6 + <id column="id" jdbcType="INTEGER" property="id" />
  7 + <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" />
  8 + <result column="companyCode" jdbcType="VARCHAR" property="companyCode" />
  9 + <result column="code" jdbcType="VARCHAR" property="code" />
  10 + <result column="referCode" jdbcType="VARCHAR" property="referCode" />
  11 + <result column="referCodeType" jdbcType="VARCHAR" property="referCodeType" />
  12 + <result column="referId" jdbcType="INTEGER" property="referId" />
  13 + <result column="referPlatform" jdbcType="INTEGER" property="referPlatform" />
  14 + <result column="firstStatus" jdbcType="INTEGER" property="firstStatus" />
  15 + <result column="lastStatus" jdbcType="INTEGER" property="lastStatus" />
  16 + <result column="shipmentType" jdbcType="VARCHAR" property="shipmentType" />
  17 + <result column="route" jdbcType="VARCHAR" property="route" />
  18 + <result column="customerCode" jdbcType="VARCHAR" property="customerCode" />
  19 + <result column="customerName" jdbcType="VARCHAR" property="customerName" />
  20 + <result column="priority" jdbcType="INTEGER" property="priority" />
  21 + <result column="requestedDeliveryDate" jdbcType="DATE" property="requestedDeliveryDate" />
  22 + <result column="scheduledShipDate" jdbcType="DATE" property="scheduledShipDate" />
  23 + <result column="actualShipDateTime" jdbcType="TIMESTAMP" property="actualShipDateTime" />
  24 + <result column="actualDeliveryDate" jdbcType="DATE" property="actualDeliveryDate" />
  25 + <result column="deliveryNote" jdbcType="VARCHAR" property="deliveryNote" />
  26 + <result column="rejectionNote" jdbcType="VARCHAR" property="rejectionNote" />
  27 + <result column="waveId" jdbcType="INTEGER" property="waveId" />
  28 + <result column="shipDock" jdbcType="VARCHAR" property="shipDock" />
  29 + <result column="allocateComplete" jdbcType="INTEGER" property="allocateComplete" />
  30 + <result column="totalWeight" jdbcType="DECIMAL" property="totalWeight" />
  31 + <result column="totalQty" jdbcType="INTEGER" property="totalQty" />
  32 + <result column="totalVolume" jdbcType="DECIMAL" property="totalVolume" />
  33 + <result column="totalLines" jdbcType="INTEGER" property="totalLines" />
  34 + <result column="processType" jdbcType="VARCHAR" property="processType" />
  35 + <result column="lastWaveId" jdbcType="INTEGER" property="lastWaveId" />
  36 + <result column="signValue" jdbcType="VARCHAR" property="signValue" />
  37 + <result column="carrierCode" jdbcType="VARCHAR" property="carrierCode" />
  38 + <result column="carrierService" jdbcType="VARCHAR" property="carrierService" />
  39 + <result column="shipmentNote" jdbcType="VARCHAR" property="shipmentNote" />
  40 + <result column="carrierServer" jdbcType="VARCHAR" property="carrierServer" />
  41 + <result column="carrierServerName" jdbcType="VARCHAR" property="carrierServerName" />
  42 + <result column="plateNumber" jdbcType="VARCHAR" property="plateNumber" />
  43 + <result column="carModel" jdbcType="VARCHAR" property="carModel" />
  44 + <result column="driverName" jdbcType="VARCHAR" property="driverName" />
  45 + <result column="driverTel" jdbcType="VARCHAR" property="driverTel" />
  46 + <result column="created" jdbcType="TIMESTAMP" property="created" />
  47 + <result column="createdBy" jdbcType="VARCHAR" property="createdBy" />
  48 + <result column="lastUpdated" jdbcType="TIMESTAMP" property="lastUpdated" />
  49 + <result column="lastUpdatedBy" jdbcType="VARCHAR" property="lastUpdatedBy" />
  50 + <result column="version" jdbcType="INTEGER" property="version" />
  51 + <result column="userDef1" jdbcType="VARCHAR" property="userDef1" />
  52 + <result column="userDef2" jdbcType="VARCHAR" property="userDef2" />
  53 + <result column="userDef3" jdbcType="VARCHAR" property="userDef3" />
  54 + <result column="processStamp" jdbcType="VARCHAR" property="processStamp" />
  55 + <result column="deleted" jdbcType="BIT" property="deleted" />
  56 + </resultMap>
  57 + <sql id="Base_Column_List">
  58 + <!--@mbg.generated-->
  59 + id, warehouseCode, companyCode, code, referCode, referCodeType, referId,
  60 + referPlatform, firstStatus, lastStatus, shipmentType, route, customerCode, customerName,
  61 + priority, requestedDeliveryDate, scheduledShipDate, actualShipDateTime,
  62 + actualDeliveryDate, deliveryNote, rejectionNote, waveId, shipDock, allocateComplete,
  63 + totalWeight, totalQty, totalVolume, totalLines,
  64 + processType, lastWaveId, signValue, carrierCode, carrierService, shipmentNote, carrierServer,
  65 + carrierServerName, plateNumber, carModel, driverName, driverTel, created, createdBy,
  66 + lastUpdated, lastUpdatedBy, version, userDef1, userDef2, userDef3,processStamp, deleted
  67 + </sql>
  68 +
  69 +
  70 +</mapper>
0 71 \ No newline at end of file
... ...
src/main/resources/mybatis/shipment/ShipmentHeaderMapper.xml
... ... @@ -51,11 +51,6 @@
51 51 <result column="userDef1" jdbcType="VARCHAR" property="userDef1" />
52 52 <result column="userDef2" jdbcType="VARCHAR" property="userDef2" />
53 53 <result column="userDef3" jdbcType="VARCHAR" property="userDef3" />
54   - <result column="userDef4" jdbcType="VARCHAR" property="userDef4" />
55   - <result column="userDef5" jdbcType="VARCHAR" property="userDef5" />
56   - <result column="userDef6" jdbcType="VARCHAR" property="userDef6" />
57   - <result column="userDef7" jdbcType="VARCHAR" property="userDef7" />
58   - <result column="userDef8" jdbcType="VARCHAR" property="userDef8" />
59 54 <result column="processStamp" jdbcType="VARCHAR" property="processStamp" />
60 55 <result column="deleted" jdbcType="BIT" property="deleted" />
61 56 </resultMap>
... ... @@ -68,8 +63,7 @@
68 63 totalWeight, totalQty, totalVolume, totalLines,
69 64 processType, lastWaveId, signValue, carrierCode, carrierService, shipmentNote, carrierServer,
70 65 carrierServerName, plateNumber, carModel, driverName, driverTel, created, createdBy,
71   - lastUpdated, lastUpdatedBy, version, userDef1, userDef2, userDef3, userDef4, userDef5,
72   - userDef6, userDef7, userDef8, processStamp, deleted
  66 + lastUpdated, lastUpdatedBy, version, userDef1, userDef2, userDef3,processStamp, deleted
73 67 </sql>
74 68  
75 69 <select id="createCode" resultType="java.lang.String">
... ...
src/main/resources/templates/config/statusFlowDetail/add.html
... ... @@ -6,6 +6,7 @@
6 6 <div class="wrapper wrapper-content animated fadeInRight ibox-content">
7 7 <form class="form-horizontal m" id="form-statusFlowDetails-add">
8 8 <input name="headerId" type="hidden" th:value="${headerId}">
  9 + <input name="headerCode" type="hidden" th:value="${headerCode}">
9 10 <div class="form-group">
10 11 <label class="col-sm-3 control-label">状态流:</label>
11 12 <div class="col-sm-8">
... ...
src/main/resources/templates/receipt/receiptDetail/receiptDetail.html
... ... @@ -51,6 +51,7 @@
51 51 <script th:inline="javascript">
52 52 var editFlag = [[${@permission.hasPermi('receipt:receiptDetail:edit')}]];
53 53 var removeFlag = [[${@permission.hasPermi('receipt:receiptDetail:remove')}]];
  54 + var approvalFlag = [[${@permission.hasPermi('receipt:receiptHeader:approval')}]]
54 55 var prefix = ctx + "receipt/receiptDetail";
55 56 var datas = [[${@dict.getType('isVirtualBom')}]];
56 57 $(function() {
... ... @@ -218,6 +219,11 @@
218 219 align: 'center',
219 220 formatter: function(value, row, index) {
220 221 var actions = [];
  222 + if (row.processStamp == 5){
  223 + actions.push('<a class="btn btn-success btn-xs ' + approvalFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')">审核通过</a> ');
  224 + actions.push('<a class="btn btn-warning btn-xs ' + approvalFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')">驳回</a>');
  225 + actions.push('<a class="btn btn-danger btn-xs ' + approvalFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')">作废</a>');
  226 + }
221 227 actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
222 228 actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>');
223 229 return actions.join('');
... ...
src/main/resources/templates/receipt/receiptHeader/add.html
... ... @@ -64,7 +64,7 @@
64 64 url : prefix + "/add",
65 65 data : {
66 66 "receiptType": $("#receiptType option:selected").val(),
67   - "companyCode": $("#company option:selected").attr("code"),
  67 + "companyCode": $("#company option:selected").val(),
68 68 "receiptNote": $("input[name='receiptNote']").val(),
69 69 "scheduledArriveDate": $("input[name='scheduledArriveDate']").val(),
70 70 },
... ...
src/main/resources/templates/shipment/shipmentHeaderHistory/shipmentHeaderHistory.html
... ... @@ -20,7 +20,7 @@
20 20 <div id="myTabContent" class="tab-content">
21 21 <div class="tab-pane fade in active" id="tabHeader">
22 22 <div class="col-sm-12 select-info">
23   - <form id="receiptHeader-form">
  23 + <form id="shipmentHeaderHistory-form">
24 24 <div class="select-list">
25 25 <ul>
26 26 <li>
... ...