打印编码
This commit is contained in:
@@ -36,6 +36,11 @@ public class FullWorkOrderDO extends BaseDO {
|
||||
*/
|
||||
private String materialCode;
|
||||
|
||||
/**
|
||||
* 打印物料编码
|
||||
*/
|
||||
private String encodingPrint;
|
||||
|
||||
/**
|
||||
* 图片地址
|
||||
*/
|
||||
|
||||
@@ -37,6 +37,12 @@ public class FullWorkOrderQuery implements Serializable {
|
||||
@Schema(description = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
/**
|
||||
* 打印物料编码
|
||||
*/
|
||||
@Schema(description = "打印编码(国产替代)")
|
||||
private String encodingPrint;
|
||||
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
|
||||
@@ -45,6 +45,14 @@ public class FullWorkOrderReq implements Serializable {
|
||||
@Length(max = 255, message = "物料编码长度不能超过 {max} 个字符")
|
||||
private String materialCode;
|
||||
|
||||
/**
|
||||
* 打印物料编码
|
||||
*/
|
||||
@Schema(description = "打印编码(国产替代)")
|
||||
@NotBlank(message = "打印编码(国产替代)不能为空")
|
||||
private String encodingPrint;
|
||||
|
||||
/**
|
||||
/**
|
||||
* 图片地址
|
||||
*/
|
||||
|
||||
@@ -44,6 +44,12 @@ public class FullWorkOrderResp extends BaseDetailResp {
|
||||
@ExcelProperty(value = "物料编码", order = 4)
|
||||
private String materialCode;
|
||||
|
||||
/**
|
||||
* 打印物料编码
|
||||
*/
|
||||
@Schema(description = "打印编码(国产替代)")
|
||||
private String encodingPrint;
|
||||
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
|
||||
@@ -26,6 +26,8 @@ import top.wms.admin.fullWorkOrder.model.req.FullWorkOrderInfoReq;
|
||||
import top.wms.admin.fullWorkOrder.model.req.FullWorkOrderReq;
|
||||
import top.wms.admin.fullWorkOrder.model.resp.FullWorkOrderResp;
|
||||
import top.wms.admin.fullWorkOrder.service.FullWorkOrderService;
|
||||
import top.wms.admin.material.mapper.MaterialInfoMapper;
|
||||
import top.wms.admin.material.model.entity.MaterialInfoDO;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -42,6 +44,8 @@ public class FullWorkOrderServiceImpl extends BaseServiceImpl<FullWorkOrderMappe
|
||||
|
||||
private final FullWorkOrderInfoMapper fullWorkOrderInfoMapper;
|
||||
|
||||
private final MaterialInfoMapper materialInfoMapper;
|
||||
|
||||
@Override
|
||||
public PageResp<FullWorkOrderResp> page(FullWorkOrderQuery query, PageQuery pageQuery) {
|
||||
QueryWrapper<FullWorkOrderDO> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
@@ -32,6 +32,11 @@ public class MaterialInfoDO extends BaseDO {
|
||||
*/
|
||||
private String encoding;
|
||||
|
||||
/**
|
||||
* 打印物料编码
|
||||
*/
|
||||
private String encodingPrint;
|
||||
|
||||
/**
|
||||
* 物料单位重量(g)
|
||||
*/
|
||||
|
||||
@@ -37,6 +37,13 @@ public class MaterialInfoQuery implements Serializable {
|
||||
@Query(type = QueryType.EQ)
|
||||
private String encoding;
|
||||
|
||||
/**
|
||||
* 打印物料编码
|
||||
*/
|
||||
@Schema(description = "打印编码(国产替代)")
|
||||
@Query(type = QueryType.EQ)
|
||||
private String encodingPrint;
|
||||
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
|
||||
@@ -29,9 +29,17 @@ public class MaterialImportRowReq implements Serializable {
|
||||
*/
|
||||
@Schema(description = "物料编码")
|
||||
@NotBlank(message = "物料编码不能为空")
|
||||
@Length(max = 255, message = "物料编码长度不能超过 {max} 个字符")
|
||||
@Length(max = 64, message = "物料编码长度不能超过 {max} 个字符")
|
||||
private String encoding;
|
||||
|
||||
/**
|
||||
* 打印编码(国产替代)
|
||||
*/
|
||||
@Schema(description = "打印编码(国产替代)")
|
||||
@NotBlank(message = "打印编码(国产替代)不能为空")
|
||||
@Length(max = 64, message = "打印编码(国产替代)长度不能超过 {max} 个字符")
|
||||
private String encodingPrint;
|
||||
|
||||
/**
|
||||
* 物料单位重量(g)
|
||||
*/
|
||||
|
||||
@@ -37,9 +37,16 @@ public class MaterialInfoReq implements Serializable {
|
||||
*/
|
||||
@Schema(description = "物料编码")
|
||||
@NotBlank(message = "物料编码不能为空")
|
||||
@Length(max = 255, message = "物料编码长度不能超过 {max} 个字符")
|
||||
@Length(max = 64, message = "物料编码长度不能超过 {max} 个字符")
|
||||
private String encoding;
|
||||
|
||||
/**
|
||||
* 打印物料编码
|
||||
*/
|
||||
@Schema(description = "打印编码(国产替代)")
|
||||
@Length(max = 64, message = "打印编码(国产替代)长度不能超过 {max} 个字符")
|
||||
private String encodingPrint;
|
||||
|
||||
/**
|
||||
* 物料单位重量(g)
|
||||
*/
|
||||
|
||||
@@ -36,6 +36,13 @@ public class MaterialInfoResp extends BaseDetailResp {
|
||||
@ExcelProperty(value = "物料编码", order = 2)
|
||||
private String encoding;
|
||||
|
||||
/**
|
||||
* 打印物料编码
|
||||
*/
|
||||
@Schema(description = "打印编码(国产替代)")
|
||||
@ExcelProperty(value = "打印编码(国产替代)", order = 2)
|
||||
private String encodingPrint;
|
||||
|
||||
/**
|
||||
* 物料单位重量(g)
|
||||
*/
|
||||
|
||||
@@ -254,10 +254,12 @@ public class MaterialInfoServiceImpl extends BaseServiceImpl<MaterialInfoMapper,
|
||||
// 修改 or 新增
|
||||
if (UPDATE.validate(req.getDuplicateName(), row.getMaterialName(), existName)) {
|
||||
materialDO.setMaterialName(row.getMaterialName());
|
||||
materialDO.setEncodingPrint(row.getEncodingPrint());
|
||||
materialDO.setUpdateUser(UserContextHolder.getUserId());
|
||||
updateByNameList.add(materialDO);
|
||||
} else if (UPDATE.validate(req.getDuplicateCode(), row.getEncoding(), existCode)) {
|
||||
materialDO.setEncoding(row.getEncoding());
|
||||
materialDO.setEncodingPrint(row.getEncodingPrint());
|
||||
materialDO.setUpdateUser(UserContextHolder.getUserId());
|
||||
updateByCodeList.add(materialDO);
|
||||
} else {
|
||||
|
||||
@@ -37,6 +37,11 @@ public class WorkOrderDO extends BaseDO {
|
||||
*/
|
||||
private Long materialId;
|
||||
|
||||
/**
|
||||
* 打印物料编码
|
||||
*/
|
||||
private String encodingPrint;
|
||||
|
||||
/**
|
||||
* 实际总重量
|
||||
*/
|
||||
|
||||
@@ -41,6 +41,12 @@ public class WorkOrderQuery implements Serializable {
|
||||
@Schema(description = "物料编码")
|
||||
private String encoding;
|
||||
|
||||
/**
|
||||
* 打印物料编码
|
||||
*/
|
||||
@Schema(description = "打印编码(国产替代)")
|
||||
private String encodingPrint;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
|
||||
@@ -30,6 +30,13 @@ public class WorkOrderReq implements Serializable {
|
||||
@NotNull(message = "物料主键id不能为空")
|
||||
private Long materialId;
|
||||
|
||||
/**
|
||||
* 打印物料编码
|
||||
*/
|
||||
@Schema(description = "打印编码(国产替代)")
|
||||
@NotBlank(message = "打印编码(国产替代)不能为空")
|
||||
private String encodingPrint;
|
||||
|
||||
/**
|
||||
* 称重列表
|
||||
*/
|
||||
|
||||
@@ -68,6 +68,13 @@ public class WorkOrderResp extends BaseDetailResp {
|
||||
@ExcelProperty(value = "物料编码", order = 5)
|
||||
private String encoding;
|
||||
|
||||
/**
|
||||
* 打印物料编码
|
||||
*/
|
||||
@Schema(description = "打印物料编码")
|
||||
@ExcelProperty(value = "打印物料编码", order = 5)
|
||||
private String encodingPrint;
|
||||
|
||||
/**
|
||||
* 物料单位重量
|
||||
*/
|
||||
|
||||
@@ -183,6 +183,7 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO
|
||||
workOrder.setTitle(title);
|
||||
workOrder.setMaterialId(req.getMaterialId());
|
||||
workOrder.setBatch(materialInfoDO.getBatch());
|
||||
workOrder.setEncodingPrint(req.getEncodingPrint());
|
||||
workOrder.setMark(req.getWorkOrderInfos().get(0).getMark());
|
||||
workOrder.setTotalWeight(totalWeight);
|
||||
workOrder.setTotalCount(totalCount);
|
||||
|
||||
@@ -23,6 +23,14 @@
|
||||
</foreach>
|
||||
ELSE unit_weight
|
||||
END,
|
||||
encoding_print = CASE
|
||||
<foreach collection="list" item="item" separator="">
|
||||
<if test="item.encodingPrint != null and item.encodingPrint != ''">
|
||||
WHEN material_name = #{item.materialName} THEN #{item.encodingPrint}
|
||||
</if>
|
||||
</foreach>
|
||||
ELSE encoding_print
|
||||
END,
|
||||
update_user = CASE
|
||||
<foreach collection="list" item="item" separator="">
|
||||
<if test="item.updateUser != null">
|
||||
@@ -60,6 +68,14 @@
|
||||
</foreach>
|
||||
ELSE unit_weight
|
||||
END,
|
||||
encoding_print = CASE
|
||||
<foreach collection="list" item="item" separator="">
|
||||
<if test="item.encodingPrint != null and item.encodingPrint != ''">
|
||||
WHEN encoding = #{item.encoding} THEN #{item.encodingPrint}
|
||||
</if>
|
||||
</foreach>
|
||||
ELSE encoding_print
|
||||
END,
|
||||
update_user = CASE
|
||||
<foreach collection="list" item="item" separator="">
|
||||
<if test="item.updateUser != null">
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user