mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
bug1221 修改
This commit is contained in:
+1
-1
@@ -63,7 +63,7 @@ public class PlateGoodDO extends BaseDO {
|
|||||||
/**
|
/**
|
||||||
* 价格
|
* 价格
|
||||||
*/
|
*/
|
||||||
// private Double price;
|
private Double price;
|
||||||
/**
|
/**
|
||||||
* 品牌
|
* 品牌
|
||||||
*/
|
*/
|
||||||
|
|||||||
+23
-1
@@ -123,7 +123,29 @@ public class PartsServiceImpl implements PartsService {
|
|||||||
}
|
}
|
||||||
// 更新
|
// 更新
|
||||||
updateReqVO.setOrganId(organId).setIsComposite(updateReqVO.getIsComposite() != null && updateReqVO.getIsComposite());
|
updateReqVO.setOrganId(organId).setIsComposite(updateReqVO.getIsComposite() != null && updateReqVO.getIsComposite());
|
||||||
PartsDO updateObj = BeanUtils.toBean(updateReqVO, PartsDO.class);
|
PartsDO updateObj = PartsDO.builder()
|
||||||
|
.id(updateReqVO.getId())
|
||||||
|
.organId(organId)
|
||||||
|
.goodsId(updateReqVO.getGoodsId())
|
||||||
|
.name(updateReqVO.getName())
|
||||||
|
.color(getEmpty(updateReqVO.getColor()))
|
||||||
|
.material(getEmpty(updateReqVO.getMaterial()))
|
||||||
|
.category(updateReqVO.getCategory())
|
||||||
|
.type(getEmpty(updateReqVO.getType()))
|
||||||
|
.model(getEmpty(updateReqVO.getModel()))
|
||||||
|
.price(getZeroDouble(updateReqVO.getPrice()))
|
||||||
|
.width(getZeroDouble(updateReqVO.getWidth()))
|
||||||
|
.length(getZeroDouble(updateReqVO.getLength()))
|
||||||
|
.thickness(getZeroDouble(updateReqVO.getThickness()))
|
||||||
|
.spec(getEmpty(updateReqVO.getSpec()))
|
||||||
|
.brand(getEmpty(updateReqVO.getBrand()))
|
||||||
|
.factory(getEmpty(updateReqVO.getFactory()))
|
||||||
|
.unit(getEmpty(updateReqVO.getUnit()))
|
||||||
|
.isComposite(updateReqVO.getIsComposite() != null && updateReqVO.getIsComposite())
|
||||||
|
.subparts(getEmpty(updateReqVO.getSubparts()))
|
||||||
|
.remark(getEmpty(updateReqVO.getRemark()))
|
||||||
|
.build();
|
||||||
|
|
||||||
partsMapper.updateById(updateObj);
|
partsMapper.updateById(updateObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+17
-2
@@ -99,12 +99,27 @@ public class PlateManageServiceImpl implements PlateManageService {
|
|||||||
if (updateReqVO.getId() == null) {
|
if (updateReqVO.getId() == null) {
|
||||||
throw exception(ErrorCodeConstants.PLATE_NOT_EXISTS);
|
throw exception(ErrorCodeConstants.PLATE_NOT_EXISTS);
|
||||||
}
|
}
|
||||||
validatePlateExists(Long.valueOf(updateReqVO.getId()), organId);
|
validatePlateExists(updateReqVO.getId(), organId);
|
||||||
PlateGoodDO updateObj = BeanUtils.toBean(updateReqVO, PlateGoodDO.class);
|
|
||||||
// 校验板材goods_id是否相同
|
// 校验板材goods_id是否相同
|
||||||
if (plateGoodMapper.isByGoodIDAndId(updateReqVO.getGoodsId(), organId, Long.valueOf(updateReqVO.getId()))) {
|
if (plateGoodMapper.isByGoodIDAndId(updateReqVO.getGoodsId(), organId, Long.valueOf(updateReqVO.getId()))) {
|
||||||
throw exception(PLATE_GOODS_ID_NOT_SAME);
|
throw exception(PLATE_GOODS_ID_NOT_SAME);
|
||||||
}
|
}
|
||||||
|
PlateGoodDO updateObj = PlateGoodDO.builder()
|
||||||
|
.id(updateReqVO.getId())
|
||||||
|
.goodsId(updateReqVO.getGoodsId())
|
||||||
|
.goodsName(updateReqVO.getGoodsName())
|
||||||
|
.material(updateReqVO.getMaterial())
|
||||||
|
.color(updateReqVO.getColor())
|
||||||
|
.texture(ObjectUtil.isNull(updateReqVO.getTexture()) ? false : updateReqVO.getTexture())
|
||||||
|
.width(getZeroDouble(updateReqVO.getWidth()))
|
||||||
|
.height(getZeroDouble(updateReqVO.getHeight()))
|
||||||
|
.thickness(getZeroDouble(updateReqVO.getThickness()))
|
||||||
|
.price(getZeroDouble(updateReqVO.getPrice()))
|
||||||
|
.brand(getEmpty(updateReqVO.getBrand()))
|
||||||
|
.spec(getEmpty(updateReqVO.getSpec()))
|
||||||
|
.remark(getEmpty(updateReqVO.getRemark()))
|
||||||
|
.build();
|
||||||
plateGoodMapper.updateById(updateObj);
|
plateGoodMapper.updateById(updateObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user