Browse Source

[fix] 生产管理 仓库管理

修改生产管理所有的损耗率数据格式
修改领料单审核通过后生成出库单详情的方法:添加过滤,如果是两个相同的物料,领料数据进行累加,并且只保留一条数据;新增订单数量为本次领料数
修修改委内入库品质后生成入库单的方法:修改入库单号的生成方式;新增 品质已合格数
dev
liuxiaoxu 4 months ago
parent
commit
7baf242ae2
  1. 1
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderServiceImpl.java
  2. 6
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeorderPickDetail.java
  3. 6
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderDetailMapper.java
  4. 77
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java
  5. 8
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java
  6. 9
      ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderDetailMapper.xml
  7. 14
      ruoyi-admin/src/main/resources/templates/erp/inboundOrder/add.html
  8. 14
      ruoyi-admin/src/main/resources/templates/erp/inboundOrder/processInboundDetail.html
  9. 14
      ruoyi-admin/src/main/resources/templates/erp/inboundOrder/produceInboundDetail.html
  10. 1
      ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeInStartingQuality.html
  11. 9
      ruoyi-admin/src/main/resources/templates/system/makeorder/addProduceInbound.html
  12. 7
      ruoyi-admin/src/main/resources/templates/system/makeorder/addpick.html
  13. 14
      ruoyi-admin/src/main/resources/templates/system/makeorder/bmps.html
  14. 14
      ruoyi-admin/src/main/resources/templates/system/makeorder/bmzgqr.html
  15. 14
      ruoyi-admin/src/main/resources/templates/system/makeorder/detail.html
  16. 14
      ruoyi-admin/src/main/resources/templates/system/makeorder/gcsh.html
  17. 14
      ruoyi-admin/src/main/resources/templates/system/makeorderpick/detail.html
  18. 14
      ruoyi-admin/src/main/resources/templates/system/makeorderpick/edit.html
  19. 14
      ruoyi-admin/src/main/resources/templates/system/makeorderpick/taskModifyApply.html
  20. 14
      ruoyi-admin/src/main/resources/templates/system/makeorderpick/taskScjlVerify.html
  21. 14
      ruoyi-admin/src/main/resources/templates/system/makeorderpick/taskSczgVerify.html

1
ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderServiceImpl.java

@ -349,6 +349,7 @@ public class QualityOrderServiceImpl implements IQualityOrderService
//根据品质单号从数据库查询 用于更新入库单
QualityOrder tempQualityOrder = qualityOrderMapper.selectQualityOrderByCode(qualityOrder.getQualityOrderCode());
tempQualityOrder.setWarehouseCode(warehouseStorageCode);
String qualityStatus = tempQualityOrder.getQualityStatus();
String qualityStorageStatus = tempQualityOrder.getQualityStorageStatus();

6
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeorderPickDetail.java

@ -66,7 +66,7 @@ public class SysMakeorderPickDetail extends BaseEntity
/** 用量 */
private Long useNum;
/** 损耗率 */
private BigDecimal lossRate;
private String lossRate;
/** 层级 */
private Long level;
/** 排序 */
@ -216,11 +216,11 @@ public class SysMakeorderPickDetail extends BaseEntity
this.useNum = useNum;
}
public BigDecimal getLossRate() {
public String getLossRate() {
return lossRate;
}
public void setLossRate(BigDecimal lossRate) {
public void setLossRate(String lossRate) {
this.lossRate = lossRate;
}

6
ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderDetailMapper.java

@ -83,6 +83,12 @@ public interface WarehouseOutOrderDetailMapper
*/
List<WarehouseOutOrderDetail> selectOutOrderDetailListByCode(String outOrderCode);
/**
* 根据物料号出库单号关联单号查询出库单详情数据
*/
public WarehouseOutOrderDetail selectOutOrderDetailListByThreeCode(WarehouseOutOrderDetail warehouseOutOrderDetail);
/**
* 销售单-出库 物料信息关联设备信息
*/

77
ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java

@ -311,7 +311,7 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService
throw new BusinessException("添加出库单信息失败");
}
//生成出库单详情相关信息
generateWarehouseOutOrder(sysMakeorderPickVo, tempSysMakeorderPickVo, outOrderCode,mergeMakeorderPickDetails);
generateWarehouseOutOrder(sysMakeorderPickVo, tempSysMakeorderPickVo, outOrderCode,sysMakeorderPickDetails);
return insertResult;
}
@ -343,44 +343,59 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService
//生成出库单详情相关信息
private void generateWarehouseOutOrder(SysMakeorderPickVo sysMakeorderPickVo, SysMakeorderPickVo tempSysMakeorderPickVo, String outOrderCode,List<SysMakeorderPickDetail> mergeMakeorderPickDetails) {
private void generateWarehouseOutOrder(SysMakeorderPickVo sysMakeorderPickVo, SysMakeorderPickVo tempSysMakeorderPickVo, String outOrderCode,List<SysMakeorderPickDetail> sysMakeorderPickDetails) {
for (SysMakeorderPickDetail sysMakeorderPickDetail : mergeMakeorderPickDetails) {
for (SysMakeorderPickDetail sysMakeorderPickDetail : sysMakeorderPickDetails) {
WarehouseOutOrderDetail warehouseOutOrderDetail = new WarehouseOutOrderDetail();
warehouseOutOrderDetail.setOutOrderCode(outOrderCode);
warehouseOutOrderDetail.setWarehouseOutStatus("4");
warehouseOutOrderDetail.setRelatedOrderCode(tempSysMakeorderPickVo.getMakeNo());
warehouseOutOrderDetail.setMakeNo(tempSysMakeorderPickVo.getMakeNo());
//标明来源是生产订单
warehouseOutOrderDetail.setWarehouseOrderType("1");
warehouseOutOrderDetail.setWarehouseOutType("1");
warehouseOutOrderDetail.setMaterialSum(tempSysMakeorderPickVo.getMaterialSum());
warehouseOutOrderDetail.setEnterpriseSum(tempSysMakeorderPickVo.getEnterpriseSum());
warehouseOutOrderDetail.setCreateBy(ShiroUtils.getLoginName());
warehouseOutOrderDetail.setCreateTime(new Date());
warehouseOutOrderDetail.setApplyName(sysMakeorderPickVo.getApplyUser());
//物料相关信息
warehouseOutOrderDetail.setMaterialNo(sysMakeorderPickDetail.getMaterialNo());
warehouseOutOrderDetail.setMaterialName(sysMakeorderPickDetail.getMaterialName());
warehouseOutOrderDetail.setMaterialDescribe(sysMakeorderPickDetail.getDescribe());
warehouseOutOrderDetail.setMaterialUnit(sysMakeorderPickDetail.getUnit());
warehouseOutOrderDetail.setMaterialBrand(sysMakeorderPickDetail.getBrand());
warehouseOutOrderDetail.setMaterialProcessMethod(sysMakeorderPickDetail.getProcessMethod());
warehouseOutOrderDetail.setMakeNum(tempSysMakeorderPickVo.getMaterialSum());
//根据出库单号和关联单号以及物料号查找出库单详情数据
WarehouseOutOrderDetail tempWarehouseOutOrderDetail = outOrderDetailMapper.selectOutOrderDetailListByThreeCode(warehouseOutOrderDetail);
if (tempWarehouseOutOrderDetail != null){
warehouseOutOrderDetail.setOutOrderDetailId(tempWarehouseOutOrderDetail.getOutOrderDetailId());
Integer applyOutOrderSum = (int) (sysMakeorderPickDetail.getPickNum()+tempWarehouseOutOrderDetail.getApplyOutOrderSum());
Integer makeNum = (int) (sysMakeorderPickDetail.getPickNum() + tempWarehouseOutOrderDetail.getMakeNum());
warehouseOutOrderDetail.setApplyOutOrderSum(applyOutOrderSum);
warehouseOutOrderDetail.setMakeNum(makeNum);
int updateWarehouseOutOrderDetailResult = outOrderDetailMapper.updateWarehouseOutOrderDetail(warehouseOutOrderDetail);
if (updateWarehouseOutOrderDetailResult <= 0){
throw new BusinessException("更新出库单详情失败");
}
}else {
warehouseOutOrderDetail.setWarehouseOutStatus("4");
warehouseOutOrderDetail.setMakeNo(tempSysMakeorderPickVo.getMakeNo());
//标明来源是生产订单
warehouseOutOrderDetail.setWarehouseOrderType("1");
warehouseOutOrderDetail.setWarehouseOutType("1");
warehouseOutOrderDetail.setMaterialSum(tempSysMakeorderPickVo.getMaterialSum());
warehouseOutOrderDetail.setEnterpriseSum(tempSysMakeorderPickVo.getEnterpriseSum());
warehouseOutOrderDetail.setCreateBy(ShiroUtils.getLoginName());
warehouseOutOrderDetail.setCreateTime(new Date());
warehouseOutOrderDetail.setApplyName(sysMakeorderPickVo.getApplyUser());
warehouseOutOrderDetail.setMaterialName(sysMakeorderPickDetail.getMaterialName());
warehouseOutOrderDetail.setMaterialDescribe(sysMakeorderPickDetail.getDescribe());
warehouseOutOrderDetail.setMaterialUnit(sysMakeorderPickDetail.getUnit());
warehouseOutOrderDetail.setMaterialBrand(sysMakeorderPickDetail.getBrand());
warehouseOutOrderDetail.setMaterialProcessMethod(sysMakeorderPickDetail.getProcessMethod());
//订单数量为本次领料数量
warehouseOutOrderDetail.setMakeNum(Math.toIntExact(sysMakeorderPickDetail.getPickNum()));
//添加申请出库数量
warehouseOutOrderDetail.setApplyOutOrderSum(Math.toIntExact(sysMakeorderPickDetail.getPickNum()));
if (StringUtils.isNotEmpty(sysMakeorderPickDetail.getDescribe())) {
String[] splitDescribe = sysMakeorderPickDetail.getDescribe().split(",");
if (splitDescribe.length >= 2) {
warehouseOutOrderDetail.setMaterialModel(splitDescribe[0]);
warehouseOutOrderDetail.setMaterialSpecification(splitDescribe[1]);
warehouseOutOrderDetail.setApplyOutOrderSum(Math.toIntExact(sysMakeorderPickDetail.getPickNum()));
if (StringUtils.isNotEmpty(sysMakeorderPickDetail.getDescribe())) {
String[] splitDescribe = sysMakeorderPickDetail.getDescribe().split(",");
if (splitDescribe.length >= 2) {
warehouseOutOrderDetail.setMaterialModel(splitDescribe[0]);
warehouseOutOrderDetail.setMaterialSpecification(splitDescribe[1]);
}
}
int insertOutOrderDetailResult = outOrderDetailMapper.insertWarehouseOutOrderDetail(warehouseOutOrderDetail);
if (insertOutOrderDetailResult <= 0){
throw new BusinessException("新增出库单详情数据失败");
}
}
int insertOutOrderDetailResult = outOrderDetailMapper.insertWarehouseOutOrderDetail(warehouseOutOrderDetail);
if (insertOutOrderDetailResult <= 0){
throw new BusinessException("新增出库单详情数据失败");
}
}
}

8
ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java

@ -403,8 +403,8 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS
public int insertWarehouseStorageOrderByMakeInQualityOrder(QualityOrder tempQualityOrder, List<QualityOrderDetail> qualityOrderDetailList) {
WarehouseStorageOrder warehouseStorageOrder = new WarehouseStorageOrder();
String loginName = ShiroUtils.getLoginName();
String warehouseStorageCode = redisCache.generateBillNo("RK");
warehouseStorageOrder.setWarehouseStorageCode(warehouseStorageCode);
warehouseStorageOrder.setWarehouseStorageCode(tempQualityOrder.getWarehouseCode());
warehouseStorageOrder.setRelatedOrderCode(tempQualityOrder.getRelatedOrderCode());
//暂收设置为全部品质
warehouseStorageOrder.setWarehouseQualityStatus("2");
@ -423,7 +423,7 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS
for (QualityOrderDetail qualityOrderDetail : qualityOrderDetailList) {
WarehouseStorageOrderDetail warehouseStorageOrderDetail = new WarehouseStorageOrderDetail();
warehouseStorageOrderDetail.setWarehouseStorageCode(warehouseStorageCode);
warehouseStorageOrderDetail.setWarehouseStorageCode(tempQualityOrder.getWarehouseCode());
warehouseStorageOrderDetail.setRelatedOrderCode(tempQualityOrder.getRelatedOrderCode());
warehouseStorageOrderDetail.setWarehouseQualityStatus("2");
warehouseStorageOrderDetail.setWarehouseStorageStatus("2");
@ -433,6 +433,8 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS
warehouseStorageOrderDetail.setMakeStorageNum(qualityOrderDetail.getMakeInNum());
//设置委内加工费单价
warehouseStorageOrderDetail.setMakeInUnitPrice(qualityOrderDetail.getMakeInUnitPrice());
//设置品质已合格数
warehouseStorageOrderDetail.setQualityHasQualifiedNum(qualityOrderDetail.getQualityHasqualifiedNum());
warehouseStorageOrderDetail.setMaterialNo(qualityOrderDetail.getMaterialNo());
warehouseStorageOrderDetail.setMaterialName(qualityOrderDetail.getMaterialName());
warehouseStorageOrderDetail.setMaterialBrand(qualityOrderDetail.getMaterialBrand());

9
ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderDetailMapper.xml

@ -77,6 +77,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where out_order_code = #{outOrderCode}
</select>
<select id="selectOutOrderDetailListByThreeCode" parameterType="WarehouseOutOrderDetail" resultMap="WarehouseOutOrderDetailResult">
<include refid="selectWarehouseOutOrderDetailVo"/>
where out_order_code = #{outOrderCode}
and related_order_code = #{relatedOrderCode}
and material_no = #{materialNo}
</select>
<select id="selectShippingDeviceList" parameterType="WarehouseOutOrderDetail" resultMap="WarehouseOutOrderDetailResult">
<include refid="selectWarehouseOutOrderDetailVo"/>
where sales_order_code = #{salesOrderCode}

14
ruoyi-admin/src/main/resources/templates/erp/inboundOrder/add.html

@ -283,13 +283,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

14
ruoyi-admin/src/main/resources/templates/erp/inboundOrder/processInboundDetail.html

@ -279,13 +279,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

14
ruoyi-admin/src/main/resources/templates/erp/inboundOrder/produceInboundDetail.html

@ -296,13 +296,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

1
ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeInStartingQuality.html

@ -110,6 +110,7 @@
"thisArrivedNum": item.thisArrivedNum,
"qualityQualifiedNum": item.qualityQualifiedNum,
"qualityUnqualifiedNum": item.qualityUnqualifiedNum,
"makeInNum":item.makeInNum,
"makeInUnitPrice": item.makeInUnitPrice,
"materialDeptType": item.materialDeptType,
// ...其他字段

9
ruoyi-admin/src/main/resources/templates/system/makeorder/addProduceInbound.html

@ -311,13 +311,6 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
},
{
field: 'materialNum',
@ -422,7 +415,7 @@
// 使用 JSON.stringify() 序列化数据
const jsonData = JSON.stringify(combinedData);
// 发送 AJAX 请求到后端接口
$.operate.saveJson(prefix + "/addEquipmentResumeSave", jsonData);
$.operate.saveJson(prefix + "/addProduceInboundSave", jsonData);
}

7
ruoyi-admin/src/main/resources/templates/system/makeorder/addpick.html

@ -292,13 +292,6 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
},
{
field: 'materialNum',

14
ruoyi-admin/src/main/resources/templates/system/makeorder/bmps.html

@ -301,13 +301,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

14
ruoyi-admin/src/main/resources/templates/system/makeorder/bmzgqr.html

@ -289,13 +289,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

14
ruoyi-admin/src/main/resources/templates/system/makeorder/detail.html

@ -290,13 +290,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

14
ruoyi-admin/src/main/resources/templates/system/makeorder/gcsh.html

@ -289,13 +289,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

14
ruoyi-admin/src/main/resources/templates/system/makeorderpick/detail.html

@ -278,13 +278,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

14
ruoyi-admin/src/main/resources/templates/system/makeorderpick/edit.html

@ -248,13 +248,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

14
ruoyi-admin/src/main/resources/templates/system/makeorderpick/taskModifyApply.html

@ -314,13 +314,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

14
ruoyi-admin/src/main/resources/templates/system/makeorderpick/taskScjlVerify.html

@ -318,13 +318,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

14
ruoyi-admin/src/main/resources/templates/system/makeorderpick/taskSczgVerify.html

@ -318,13 +318,13 @@
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value + "%";
// }
// }
},
{
field: 'materialNum',

Loading…
Cancel
Save