更新生产单信息
This commit is contained in:
parent
a192ae63c9
commit
86bd0b411f
|
|
@ -51,7 +51,7 @@ public class ProduceOrderDO extends BaseDO {
|
|||
/**
|
||||
* 产品id
|
||||
*/
|
||||
private Integer productId;
|
||||
private Long productId;
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -5,9 +5,11 @@ import cn.hangtag.framework.common.exception.enums.GlobalErrorCodeConstants;
|
|||
import cn.hangtag.framework.common.util.FuncUtil;
|
||||
import cn.hangtag.framework.common.util.validation.ValidationUtils;
|
||||
import cn.hangtag.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.hangtag.module.oms.dal.dataobject.productinfo.ProductInfoDO;
|
||||
import cn.hangtag.module.oms.dal.dataobject.saleorder.SaleOrderDO;
|
||||
import cn.hangtag.module.oms.enums.CodeRuleIDConstants;
|
||||
import cn.hangtag.module.oms.serialnumber.CodingRulesUtils;
|
||||
import cn.hangtag.module.oms.service.productinfo.ProductInfoService;
|
||||
import cn.hangtag.module.system.controller.admin.user.vo.user.UserImportRespVO;
|
||||
import cn.hangtag.module.system.controller.admin.user.vo.user.UserSaveReqVO;
|
||||
import cn.hangtag.module.system.dal.dataobject.user.AdminUserDO;
|
||||
|
|
@ -46,6 +48,8 @@ public class ProduceOrderServiceImpl implements ProduceOrderService {
|
|||
|
||||
@Resource
|
||||
private ProduceOrderMapper produceOrderMapper;
|
||||
@Resource
|
||||
private ProductInfoService productInfoService;
|
||||
|
||||
@Override
|
||||
public Long createProduceOrder(ProduceOrderSaveReqVO createReqVO) {
|
||||
|
|
@ -68,6 +72,16 @@ public class ProduceOrderServiceImpl implements ProduceOrderService {
|
|||
validateProduceOrderExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ProduceOrderDO updateObj = BeanUtils.toBean(updateReqVO, ProduceOrderDO.class);
|
||||
ProductInfoDO productInfo = productInfoService.getProductInfo(updateObj.getProductId());
|
||||
Double specSizeWidth = productInfo.getSpecSizeWidth();
|
||||
Double specSizeHeight = productInfo.getSpecSizeHeight();
|
||||
String specMaterial = productInfo.getSpecMaterial();
|
||||
StringBuffer str = new StringBuffer();
|
||||
str.append(String.format("货名:%s\r\n",productInfo.getName()));
|
||||
str.append(String.format("规格:%s × %s \r\n",specSizeWidth,specSizeHeight));
|
||||
str.append(String.format("纸质:%s \r\n",specMaterial));
|
||||
updateObj.setDetails(str.toString());
|
||||
|
||||
produceOrderMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -396,12 +396,11 @@ public class SaleOrderServiceImpl implements SaleOrderService {
|
|||
|
||||
Double specSizeWidth = productInfo.getSpecSizeWidth();
|
||||
Double specSizeHeight = productInfo.getSpecSizeHeight();
|
||||
Double specSizeThk = productInfo.getSpecSizeThk();
|
||||
String specMaterial = productInfo.getSpecMaterial();
|
||||
StringBuffer str = new StringBuffer();
|
||||
str.append(String.format("货名:%s\r\n",productInfo.getName()));
|
||||
str.append(String.format("规格:%s × %s \r\n",specSizeWidth,specSizeHeight));
|
||||
str.append(String.format("纸质:%s × %s \r\n",specMaterial));
|
||||
str.append(String.format("纸质:%s \r\n",specMaterial));
|
||||
saveReqVO.setDetails(str.toString());
|
||||
Long produceOrderId = produceOrderService.createProduceOrder(saveReqVO);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue