Browse Source

引用物料部分,新增入库部门字段,从销售订单修改开始,到采购计划转采购订单

dev
zhangsiqi 5 months ago
parent
commit
bc62adba62
  1. 10
      ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpBom.java
  2. 10
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeorderBom.java
  3. 15
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrderChild.java
  4. 4
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseStorageOrderDetailMapper.java
  5. 33
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java
  6. 28
      ruoyi-admin/src/main/resources/mapper/erp/ErpBomMapper.xml
  7. 10
      ruoyi-admin/src/main/resources/mapper/system/SysMakeorderBomMapper.xml
  8. 6
      ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml
  9. 2
      ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderDetailMapper.xml
  10. 15
      ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseStorageOrderDetailMapper.xml
  11. 19
      ruoyi-admin/src/main/resources/templates/erp/bom/add.html
  12. 10
      ruoyi-admin/src/main/resources/templates/erp/bom/edit.html
  13. 3
      ruoyi-admin/src/main/resources/templates/erp/material/select.html
  14. 18
      ruoyi-admin/src/main/resources/templates/system/makeorder/bmps.html
  15. 4
      ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html
  16. 4
      ruoyi-admin/src/main/resources/templates/system/salesOrder/edit.html

10
ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpBom.java

@ -56,6 +56,8 @@ public class ErpBom extends BaseEntity
@Excel(name = "描述",sort = 4) @Excel(name = "描述",sort = 4)
private String describe; private String describe;
private String warehouseDept;
/** 用量 */ /** 用量 */
@Excel(name = "用量",sort = 8) @Excel(name = "用量",sort = 8)
private Long useNum; private Long useNum;
@ -393,6 +395,14 @@ public class ErpBom extends BaseEntity
this.removeFileIdStr = removeFileIdStr; this.removeFileIdStr = removeFileIdStr;
} }
public String getWarehouseDept() {
return warehouseDept;
}
public void setWarehouseDept(String warehouseDept) {
this.warehouseDept = warehouseDept;
}
@Override @Override
public String toString() { public String toString() {
return "ErpBom{" + return "ErpBom{" +

10
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeorderBom.java

@ -70,6 +70,8 @@ public class SysMakeorderBom extends BaseEntity
@Excel(name = "描述") @Excel(name = "描述")
private String describe; private String describe;
private String warehouseDept;
/** 用量 */ /** 用量 */
@Excel(name = "用量") @Excel(name = "用量")
private Long useNum; private Long useNum;
@ -249,6 +251,14 @@ public class SysMakeorderBom extends BaseEntity
return sortNo; return sortNo;
} }
public String getWarehouseDept() {
return warehouseDept;
}
public void setWarehouseDept(String warehouseDept) {
this.warehouseDept = warehouseDept;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

15
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrderChild.java

@ -64,6 +64,11 @@ public class SysSalesOrderChild extends BaseEntity {
@Excel(name = "物料的描述") @Excel(name = "物料的描述")
private String describe; private String describe;
@Excel(name = "入库部门")
private String warehouseDept;
/** 国内税率 */ /** 国内税率 */
@Excel(name = "国内税率") @Excel(name = "国内税率")
private Double countTax; private Double countTax;
@ -251,6 +256,14 @@ public class SysSalesOrderChild extends BaseEntity {
this.describe = describe; this.describe = describe;
} }
public String getWarehouseDept() {
return warehouseDept;
}
public void setWarehouseDept(String warehouseDept) {
this.warehouseDept = warehouseDept;
}
public Double getCountTax() { public Double getCountTax() {
return countTax; return countTax;
} }
@ -423,6 +436,8 @@ public class SysSalesOrderChild extends BaseEntity {
this.bomId = bomId; this.bomId = bomId;
} }
@Override @Override
public String toString() { public String toString() {
return Objects.toStringHelper(this) return Objects.toStringHelper(this)

4
ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseStorageOrderDetailMapper.java

@ -104,4 +104,8 @@ public interface WarehouseStorageOrderDetailMapper
* */ * */
int updateWarehouseStorageMakeOrderDetailByObject(WarehouseStorageOrderDetail warehouseStorageOrderDetail); int updateWarehouseStorageMakeOrderDetailByObject(WarehouseStorageOrderDetail warehouseStorageOrderDetail);
/*
* 根据入库单号供应商id物料号更新对应的物料单详情
* */
WarehouseStorageOrderDetail selectWarehouseStorageOrderDetailListByRelatedOrderCode(WarehouseStorageOrderDetail warehouseStorageOrderDetail);
} }

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

@ -82,19 +82,37 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS
return warehouseStorageOrderMapper.selectWarehouseStorageOrderList(warehouseStorageOrder); return warehouseStorageOrderMapper.selectWarehouseStorageOrderList(warehouseStorageOrder);
} }
/** /**暂收采购入库通知单
* 新增仓库入库单
*
* @param warehouseStorageOrder 仓库入库单 * @param warehouseStorageOrder 仓库入库单
* @return 结果 * @return 结果
*/ */
@Transactional
@Override @Override
public int insertWarehouseStorageOrder(WarehouseStorageOrder warehouseStorageOrder) public int insertWarehouseStorageOrder(WarehouseStorageOrder warehouseStorageOrder)
{ {
warehouseStorageOrder.setCreateTime(DateUtils.getNowDate());
String loginName = ShiroUtils.getLoginName(); String loginName = ShiroUtils.getLoginName();
warehouseStorageOrder.setCreateBy(loginName); warehouseStorageOrder.setUpdateBy(loginName);
return warehouseStorageOrderMapper.insertWarehouseStorageOrder(warehouseStorageOrder); warehouseStorageOrder.setUpdateTime(new Date());
List<WarehouseStorageOrderDetail> storageOrderDetailList = warehouseStorageOrder.getWarehouseStorageOrderDetailList();
if (StringUtils.isEmpty(storageOrderDetailList)){
log.warn("入库单详情为空:{}",storageOrderDetailList);
}else {
for (WarehouseStorageOrderDetail warehouseStorageOrderDetail : storageOrderDetailList) {
WarehouseStorageOrderDetail tempStorageOrderDetail = new WarehouseStorageOrderDetail();
tempStorageOrderDetail.setMaterialNo(warehouseStorageOrderDetail.getMaterialNo());
tempStorageOrderDetail.setSupplierCode(warehouseStorageOrderDetail.getSupplierCode());
tempStorageOrderDetail.setWarehouseStorageCode(warehouseStorageOrder.getWarehouseStorageCode());
WarehouseStorageOrderDetail storageOrderDetailFromData = storageOrderDetailMapper.selectWarehouseStorageOrderByObject(tempStorageOrderDetail);
if (storageOrderDetailFromData == null){
log.warn("数据库中入库单详情为空:{}",tempStorageOrderDetail);
}else {
storageOrderDetailMapper.insertWarehouseStorageOrderDetail(warehouseStorageOrderDetail);
}
}
}
warehouseStorageOrder.setWarehouseStorageStatus("1");
return warehouseStorageOrderMapper.updateWarehouseStorageOrder(warehouseStorageOrder);
} }
/** /**
@ -134,9 +152,6 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS
return warehouseStorageOrderMapper.updateWarehouseStorageOrder(warehouseStorageOrder); return warehouseStorageOrderMapper.updateWarehouseStorageOrder(warehouseStorageOrder);
} }
/** /**
* 修改保存暂收-采购单(采购入库) * 修改保存暂收-采购单(采购入库)
* *

28
ruoyi-admin/src/main/resources/mapper/erp/ErpBomMapper.xml

@ -20,6 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="unit" column="unit" /> <result property="unit" column="unit" />
<result property="brand" column="brand" /> <result property="brand" column="brand" />
<result property="describe" column="describe" /> <result property="describe" column="describe" />
<result property="warehouseDept" column="warehouseDept" />
<result property="useNum" column="use_num" /> <result property="useNum" column="use_num" />
<result property="lossRate" column="loss_rate" /> <result property="lossRate" column="loss_rate" />
<result property="parentId" column="parent_id" /> <result property="parentId" column="parent_id" />
@ -59,6 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="unit" column="sub_unit" /> <result property="unit" column="sub_unit" />
<result property="brand" column="sub_brand" /> <result property="brand" column="sub_brand" />
<result property="describe" column="sub_describe" /> <result property="describe" column="sub_describe" />
<result property="warehouseDept" column="warehouseDept" />
<result property="useNum" column="sub_use_num" /> <result property="useNum" column="sub_use_num" />
<result property="lossRate" column="sub_loss_rate" /> <result property="lossRate" column="sub_loss_rate" />
<result property="parentId" column="sub_parent_id" /> <result property="parentId" column="sub_parent_id" />
@ -70,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectErpBomVo"> <sql id="selectErpBomVo">
select id, del_flag, create_by, create_time, update_by, update_time, remark, bom_no, select id, del_flag, create_by, create_time, update_by, update_time, remark, bom_no,
material_no, material_name, material_type, process_method, unit, brand, `describe`, material_no, material_name, material_type, process_method, unit, brand, `describe`,warehouseDept,
engineer,use_num, loss_rate, parent_id, `level`, sort_no, audit_status, use_status, engineer,use_num, loss_rate, parent_id, `level`, sort_no, audit_status, use_status,
instance_id,instance_type,submit_instance_id,cancel_instance_id,restore_instance_id, instance_id,instance_type,submit_instance_id,cancel_instance_id,restore_instance_id,
apply_title,apply_user,apply_time from erp_bom apply_title,apply_user,apply_time from erp_bom
@ -79,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectErpBomList" parameterType="ErpBomVo" resultMap="ErpBomResult"> <select id="selectErpBomList" parameterType="ErpBomVo" resultMap="ErpBomResult">
select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time
, erp.remark,erp.bom_no,erp.material_no,erp.material_name, erp.audit_status, erp.use_status , erp.remark,erp.bom_no,erp.material_no,erp.material_name, erp.audit_status, erp.use_status
, erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.engineer, , erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.warehouseDept,erp.engineer,
erp.use_num,erp.loss_rate, erp.parent_id, erp.`level`, erp.sort_no, erp.instance_id, erp.use_num,erp.loss_rate, erp.parent_id, erp.`level`, erp.sort_no, erp.instance_id,
erp.instance_type, processDict.dict_label as instance_type_name, erp.submit_instance_id, erp.instance_type, processDict.dict_label as instance_type_name, erp.submit_instance_id,
erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time
@ -123,6 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="brand != null and brand != ''"> and erp.brand = #{brand}</if> <if test="brand != null and brand != ''"> and erp.brand = #{brand}</if>
<if test="describe != null and describe != ''"> and erp.`describe` = #{describe}</if> <if test="describe != null and describe != ''"> and erp.`describe` = #{describe}</if>
<if test="engineer != null and engineer != ''"> and erp.engineer = #{engineer}</if> <if test="engineer != null and engineer != ''"> and erp.engineer = #{engineer}</if>
<if test="warehouseDept != null and warehouseDept != ''"> and erp.warehouseDept = #{warehouseDept}</if>
<if test="useNum != null "> and erp.use_num = #{useNum}</if> <if test="useNum != null "> and erp.use_num = #{useNum}</if>
<if test="lossRate != null "> and erp.loss_rate = #{lossRate}</if> <if test="lossRate != null "> and erp.loss_rate = #{lossRate}</if>
<if test="parentId != null "> and erp.parent_id = #{parentId}</if> <if test="parentId != null "> and erp.parent_id = #{parentId}</if>
@ -152,14 +155,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectErpBomList1" resultMap="ErpBomResult"> <select id="selectErpBomList1" resultMap="ErpBomResult">
select bom_no, id, create_by, create_time, update_by, update_time, remark, select bom_no, id, create_by, create_time, update_by, update_time, remark,
material_no, material_name, material_type, process_method, unit, material_no, material_name, material_type, process_method, unit,
brand, `describe`,engineer,use_num, loss_rate, parent_id, `level`, brand, `describe`,warehouseDept,engineer,use_num, loss_rate, parent_id, `level`,
sort_no, audit_status, use_status from erp_bom sort_no, audit_status, use_status from erp_bom
where bom_no != "" ORDER BY id DESC; where bom_no != "" ORDER BY id DESC;
</select> </select>
<select id="selectErpBomById" parameterType="Long" resultMap="ErpBomResult"> <select id="selectErpBomById" parameterType="Long" resultMap="ErpBomResult">
select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time,
erp.remark,erp.bom_no, erp.material_no , erp.material_name, erp.audit_status, erp.use_status, erp.remark,erp.bom_no, erp.material_no , erp.material_name, erp.audit_status, erp.use_status,
erp.material_type, erp.process_method, erp.unit, erp.brand, erp.describe, erp.use_num, erp.engineer, erp.material_type, erp.process_method, erp.unit, erp.brand, erp.describe,erp.warehouseDept,
erp.use_num, erp.engineer,
erp.loss_rate, erp.parent_id, erp.level, erp.sort_no,erp.instance_id,erp.instance_type, erp.loss_rate, erp.parent_id, erp.level, erp.sort_no,erp.instance_id,erp.instance_type,
erp.submit_instance_id,erp.cancel_instance_id,erp.restore_instance_id,erp.apply_title, erp.submit_instance_id,erp.cancel_instance_id,erp.restore_instance_id,erp.apply_title,
erp.apply_user,erp.apply_time, erp.apply_user,erp.apply_time,
@ -192,6 +196,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="unit != null and unit != ''"> and unit = #{unit}</if> <if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="brand != null and brand != ''"> and brand = #{brand}</if> <if test="brand != null and brand != ''"> and brand = #{brand}</if>
<if test="describe != null and describe != ''"> and `describe` = #{describe}</if> <if test="describe != null and describe != ''"> and `describe` = #{describe}</if>
<if test="warehouseDept != null and warehouseDept != ''"> and warehouseDept = #{warehouseDept}</if>
<if test="engineer != null and engineer != ''"> and engineer = #{engineer}</if> <if test="engineer != null and engineer != ''"> and engineer = #{engineer}</if>
<if test="useNum != null "> and use_num = #{useNum}</if> <if test="useNum != null "> and use_num = #{useNum}</if>
<if test="lossRate != null "> and loss_rate = #{lossRate}</if> <if test="lossRate != null "> and loss_rate = #{lossRate}</if>
@ -217,6 +222,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="unit != null and unit != '' ">unit,</if> <if test="unit != null and unit != '' ">unit,</if>
<if test="brand != null and brand != '' ">brand,</if> <if test="brand != null and brand != '' ">brand,</if>
<if test="describe != null and describe != '' ">`describe`,</if> <if test="describe != null and describe != '' ">`describe`,</if>
<if test="warehouseDept != null and warehouseDept != '' ">warehouseDept,</if>
<if test="engineer != null and engineer != '' ">engineer,</if> <if test="engineer != null and engineer != '' ">engineer,</if>
<if test="useNum != null">use_num,</if> <if test="useNum != null">use_num,</if>
<if test="lossRate != null">loss_rate,</if> <if test="lossRate != null">loss_rate,</if>
@ -247,6 +253,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="unit != null and unit != '' ">#{unit},</if> <if test="unit != null and unit != '' ">#{unit},</if>
<if test="brand != null and brand != '' ">#{brand},</if> <if test="brand != null and brand != '' ">#{brand},</if>
<if test="describe != null and describe != '' ">#{describe},</if> <if test="describe != null and describe != '' ">#{describe},</if>
<if test="warehouseDept != null and warehouseDept != '' ">#{warehouseDept},</if>
<if test="engineer != null and engineer != '' ">#{engineer},</if> <if test="engineer != null and engineer != '' ">#{engineer},</if>
<if test="useNum != null">#{useNum},</if> <if test="useNum != null">#{useNum},</if>
<if test="lossRate != null">#{lossRate},</if> <if test="lossRate != null">#{lossRate},</if>
@ -281,6 +288,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="unit != null and unit != '' ">unit = #{unit},</if> <if test="unit != null and unit != '' ">unit = #{unit},</if>
<if test="brand != null and brand != '' ">brand = #{brand},</if> <if test="brand != null and brand != '' ">brand = #{brand},</if>
<if test="describe != null and describe != '' ">`describe` = #{describe},</if> <if test="describe != null and describe != '' ">`describe` = #{describe},</if>
<if test="warehouseDept != null and warehouseDept != '' ">warehouseDept = #{warehouseDept},</if>
<if test="engineer != null and engineer != '' ">engineer = #{engineer},</if> <if test="engineer != null and engineer != '' ">engineer = #{engineer},</if>
<if test="useNum != null">use_num = #{useNum},</if> <if test="useNum != null">use_num = #{useNum},</if>
<if test="lossRate != null">loss_rate = #{lossRate},</if> <if test="lossRate != null">loss_rate = #{lossRate},</if>
@ -336,13 +344,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="batchErpBom"> <insert id="batchErpBom">
insert into erp_bom( id, del_flag, create_by, create_time, update_by, update_time, remark, bom_no, material_no, insert into erp_bom( id, del_flag, create_by, create_time, update_by, update_time, remark, bom_no, material_no,
material_name, material_type, process_method, unit, brand, `describe`, use_num, loss_rate, material_name, material_type, process_method, unit, brand, `describe`,warehouseDept, use_num, loss_rate,
parent_id, `level`, sort_no, audit_status, use_status) values parent_id, `level`, sort_no, audit_status, use_status) values
<foreach item="item" index="index" collection="list" separator=","> <foreach item="item" index="index" collection="list" separator=",">
( #{item.id}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, ( #{item.id}, #{item.delFlag}, #{item.createBy}, #{item.createTime},
#{item.updateBy}, #{item.updateTime}, #{item.remark}, #{item.bomNo}, #{item.updateBy}, #{item.updateTime}, #{item.remark}, #{item.bomNo},
#{item.materialNo}, #{item.materialName}, #{item.materialType}, #{item.processMethod}, #{item.materialNo}, #{item.materialName}, #{item.materialType}, #{item.processMethod},
#{item.unit}, #{item.brand}, #{item.describe}, #{item.useNum}, #{item.lossRate}, #{item.unit}, #{item.brand}, #{item.describe},#{item.warehouseDept}, #{item.useNum}, #{item.lossRate},
#{item.parentId}, #{item.level}, #{item.sortNo}, #{item.auditStatus}, #{item.useStatus}) #{item.parentId}, #{item.level}, #{item.sortNo}, #{item.auditStatus}, #{item.useStatus})
</foreach> </foreach>
</insert> </insert>
@ -374,7 +382,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectErpBomByMaterialNo" parameterType="String" resultMap="ErpBomResult"> <select id="selectErpBomByMaterialNo" parameterType="String" resultMap="ErpBomResult">
select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time,
erp.remark,erp.bom_no,erp.material_no,erp.material_name, erp.audit_status, erp.use_status, erp.remark,erp.bom_no,erp.material_no,erp.material_name, erp.audit_status, erp.use_status,
erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.engineer, erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.warehouseDept,erp.engineer,
erp.use_num,erp.loss_rate, erp.parent_id, erp.`level`, erp.sort_no, erp.instance_id, erp.use_num,erp.loss_rate, erp.parent_id, erp.`level`, erp.sort_no, erp.instance_id,
erp.instance_type, processDict.dict_label as instance_type_name, erp.submit_instance_id, erp.instance_type, processDict.dict_label as instance_type_name, erp.submit_instance_id,
erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time, erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time,
@ -409,7 +417,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectSubBomsByParentMaterialNo" parameterType="map" resultMap="ErpBomResult"> <select id="selectSubBomsByParentMaterialNo" parameterType="map" resultMap="ErpBomResult">
select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time,
erp.remark,erp.bom_no,erp.material_no,erp.material_name, erp.audit_status, erp.use_status, erp.remark,erp.bom_no,erp.material_no,erp.material_name, erp.audit_status, erp.use_status,
erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.engineer, erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.warehouseDept,erp.engineer,
erp.use_num,erp.loss_rate, erp.parent_id, erp.`level`, erp.sort_no, erp.instance_id, erp.use_num,erp.loss_rate, erp.parent_id, erp.`level`, erp.sort_no, erp.instance_id,
erp.instance_type, processDict.dict_label as instance_type_name, erp.submit_instance_id, erp.instance_type, processDict.dict_label as instance_type_name, erp.submit_instance_id,
erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time, erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time,
@ -448,7 +456,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectErpBomByMaterialNos" parameterType="String" resultMap="ErpBomResult"> <select id="selectErpBomByMaterialNos" parameterType="String" resultMap="ErpBomResult">
select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time,
erp.remark,erp.bom_no,erp.material_no,erp.material_name, erp.audit_status, erp.use_status, erp.remark,erp.bom_no,erp.material_no,erp.material_name, erp.audit_status, erp.use_status,
erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.engineer, erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.warehouseDept,erp.engineer,
erp.use_num,erp.loss_rate, erp.parent_id, erp.`level`, erp.sort_no, erp.instance_id, erp.use_num,erp.loss_rate, erp.parent_id, erp.`level`, erp.sort_no, erp.instance_id,
erp.instance_type, processDict.dict_label as instance_type_name, erp.submit_instance_id, erp.instance_type, processDict.dict_label as instance_type_name, erp.submit_instance_id,
erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time, erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time,
@ -482,7 +490,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectErpBomByParentIds" parameterType="Map" resultMap="ErpBomResult"> <select id="selectErpBomByParentIds" parameterType="Map" resultMap="ErpBomResult">
select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time,
erp.remark,erp.bom_no,erp.material_no,erp.material_name, erp.audit_status, erp.use_status, erp.remark,erp.bom_no,erp.material_no,erp.material_name, erp.audit_status, erp.use_status,
erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.engineer, erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.warehouseDept,erp.engineer,
erp.use_num,erp.loss_rate, erp.parent_id, erp.`level`, erp.sort_no, erp.instance_id, erp.use_num,erp.loss_rate, erp.parent_id, erp.`level`, erp.sort_no, erp.instance_id,
erp.instance_type, processDict.dict_label as instance_type_name, erp.submit_instance_id, erp.instance_type, processDict.dict_label as instance_type_name, erp.submit_instance_id,
erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time, erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time,

10
ruoyi-admin/src/main/resources/mapper/system/SysMakeorderBomMapper.xml

@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="unit" column="unit" /> <result property="unit" column="unit" />
<result property="brand" column="brand" /> <result property="brand" column="brand" />
<result property="describe" column="describe" /> <result property="describe" column="describe" />
<result property="warehouseDept" column="warehouseDept" />
<result property="useNum" column="use_num" /> <result property="useNum" column="use_num" />
<result property="lossRate" column="loss_rate" /> <result property="lossRate" column="loss_rate" />
<result property="level" column="level" /> <result property="level" column="level" />
@ -31,7 +32,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectSysMakeorderBomVo"> <sql id="selectSysMakeorderBomVo">
select id, del_flag, create_by, create_time, update_by, update_time, remark, make_no, sales_order_code, sales_order_material_no, bom_no, material_no, photoUrl, material_name, material_type, process_method, unit, brand, `describe`, use_num, loss_rate, level, sort_no from sys_makeorder_bom select id, del_flag, create_by, create_time, update_by, update_time,
remark, make_no, sales_order_code, sales_order_material_no,
bom_no, material_no, photoUrl, material_name, material_type, process_method, unit, brand, `describe`,
warehouseDept, use_num, loss_rate, level, sort_no from sys_makeorder_bom
</sql> </sql>
<select id="selectSysMakeorderBomList" parameterType="SysMakeorderBom" resultMap="SysMakeorderBomResult"> <select id="selectSysMakeorderBomList" parameterType="SysMakeorderBom" resultMap="SysMakeorderBomResult">
@ -49,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="unit != null and unit != ''"> and unit = #{unit}</if> <if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="brand != null and brand != ''"> and brand = #{brand}</if> <if test="brand != null and brand != ''"> and brand = #{brand}</if>
<if test="describe != null and describe != ''"> and `describe` = #{describe}</if> <if test="describe != null and describe != ''"> and `describe` = #{describe}</if>
<if test="warehouseDept != null and warehouseDept != ''"> and warehouseDept = #{warehouseDept}</if>
<if test="useNum != null "> and use_num = #{useNum}</if> <if test="useNum != null "> and use_num = #{useNum}</if>
<if test="lossRate != null "> and loss_rate = #{lossRate}</if> <if test="lossRate != null "> and loss_rate = #{lossRate}</if>
<if test="level != null "> and level = #{level}</if> <if test="level != null "> and level = #{level}</if>
@ -88,6 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="unit != null">unit,</if> <if test="unit != null">unit,</if>
<if test="brand != null">brand,</if> <if test="brand != null">brand,</if>
<if test="describe != null">`describe`,</if> <if test="describe != null">`describe`,</if>
<if test="warehouseDept != null">warehouseDept,</if>
<if test="useNum != null">use_num,</if> <if test="useNum != null">use_num,</if>
<if test="lossRate != null">loss_rate,</if> <if test="lossRate != null">loss_rate,</if>
<if test="level != null">level,</if> <if test="level != null">level,</if>
@ -112,6 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="unit != null">#{unit},</if> <if test="unit != null">#{unit},</if>
<if test="brand != null">#{brand},</if> <if test="brand != null">#{brand},</if>
<if test="describe != null">#{describe},</if> <if test="describe != null">#{describe},</if>
<if test="warehouseDept != null">#{warehouseDept},</if>
<if test="useNum != null">#{useNum},</if> <if test="useNum != null">#{useNum},</if>
<if test="lossRate != null">#{lossRate},</if> <if test="lossRate != null">#{lossRate},</if>
<if test="level != null">#{level},</if> <if test="level != null">#{level},</if>
@ -140,6 +147,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="unit != null">unit = #{unit},</if> <if test="unit != null">unit = #{unit},</if>
<if test="brand != null">brand = #{brand},</if> <if test="brand != null">brand = #{brand},</if>
<if test="describe != null">`describe` = #{describe},</if> <if test="describe != null">`describe` = #{describe},</if>
<if test="warehouseDept != null">warehouseDept = #{warehouseDept},</if>
<if test="useNum != null">use_num = #{useNum},</if> <if test="useNum != null">use_num = #{useNum},</if>
<if test="lossRate != null">loss_rate = #{lossRate},</if> <if test="lossRate != null">loss_rate = #{lossRate},</if>
<if test="level != null">level = #{level},</if> <if test="level != null">level = #{level},</if>

6
ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml

@ -15,6 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="unit" column="unit" /> <result property="unit" column="unit" />
<result property="photoUrl" column="photoUrl" /> <result property="photoUrl" column="photoUrl" />
<result property="describe" column="describe" /> <result property="describe" column="describe" />
<result property="warehouseDept" column="warehouseDept" />
<result property="countTax" column="countTax" /> <result property="countTax" column="countTax" />
<result property="usdTax" column="usdTax" /> <result property="usdTax" column="usdTax" />
<result property="materialNum" column="materialNum" /> <result property="materialNum" column="materialNum" />
@ -43,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectSysSalesOrderChild"> <sql id="selectSysSalesOrderChild">
select a.id, a.quoteId, a.materialId, a.materialCode, a.materialName, a.materialType, a.processMethod, a.brand, a.photoUrl,a.unit, a.`describe`, select a.id, a.quoteId, a.materialId, a.materialCode, a.materialName, a.materialType, a.processMethod, a.brand, a.photoUrl,a.unit, a.`describe`,
a.countTax, a.usdTax, a.materialNum,a.materialSole, a.materialRmb, a.materialNoRmb, a.materialNoUsd, a.materialUsd, a.materialUsdSum, a.warehouseDept,a.countTax, a.usdTax, a.materialNum,a.materialSole, a.materialRmb, a.materialNoRmb, a.materialNoUsd, a.materialUsd, a.materialUsdSum,
a.materialNoUsdSum, a.materialNoRmbSum, a.materialRmbSum,a.delivery_time, a.expiry_day, a.materialNoUsdSum, a.materialNoRmbSum, a.materialRmbSum,a.delivery_time, a.expiry_day,
a.out_bound_quantity, a.un_bound_quantity, a.create_by, a.create_time, a.update_by, a.out_bound_quantity, a.un_bound_quantity, a.create_by, a.create_time, a.update_by,
a.update_time, a.remark, a.use_status,a.audit_status a.update_time, a.remark, a.use_status,a.audit_status
@ -87,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="unit != null">unit,</if> <if test="unit != null">unit,</if>
<if test="photoUrl != null">photoUrl,</if> <if test="photoUrl != null">photoUrl,</if>
<if test="describe != null">`describe`,</if> <if test="describe != null">`describe`,</if>
<if test="warehouseDept != null">warehouseDept,</if>
<if test="countTax != null">countTax,</if> <if test="countTax != null">countTax,</if>
<if test="usdTax != null">usdTax,</if> <if test="usdTax != null">usdTax,</if>
<if test="materialNum != null">materialNum,</if> <if test="materialNum != null">materialNum,</if>
@ -122,6 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="unit != null">#{unit},</if> <if test="unit != null">#{unit},</if>
<if test="photoUrl != null">#{photoUrl},</if> <if test="photoUrl != null">#{photoUrl},</if>
<if test="describe != null">#{describe},</if> <if test="describe != null">#{describe},</if>
<if test="warehouseDept != null">#{warehouseDept},</if>
<if test="countTax != null">#{countTax},</if> <if test="countTax != null">#{countTax},</if>
<if test="usdTax != null">#{usdTax},</if> <if test="usdTax != null">#{usdTax},</if>
<if test="materialNum != null">#{materialNum},</if> <if test="materialNum != null">#{materialNum},</if>
@ -161,6 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="photoUrl != null">photoUrl = #{photoUrl},</if> <if test="photoUrl != null">photoUrl = #{photoUrl},</if>
<if test="unit != null">unit = #{unit},</if> <if test="unit != null">unit = #{unit},</if>
<if test="describe != null">`describe` = #{describe},</if> <if test="describe != null">`describe` = #{describe},</if>
<if test="warehouseDept != null">warehouseDept = #{warehouseDept},</if>
<if test="countTax != null">countTax = #{countTax},</if> <if test="countTax != null">countTax = #{countTax},</if>
<if test="usdTax != null">usdTax = #{usdTax},</if> <if test="usdTax != null">usdTax = #{usdTax},</if>
<if test="materialNum != null">materialNum = #{materialNum},</if> <if test="materialNum != null">materialNum = #{materialNum},</if>

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

@ -63,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectWarehouseOutOrderDetailList" parameterType="WarehouseOutOrderDetail" resultMap="WarehouseOutOrderDetailResult"> <select id="selectWarehouseOutOrderDetailList" parameterType="WarehouseOutOrderDetail" resultMap="WarehouseOutOrderDetailResult">
<include refid="selectWarehouseOutOrderDetailVo"/> <include refid="selectWarehouseOutOrderDetailVo"/>
<where> <where>
</where> </where>
</select> </select>

15
ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseStorageOrderDetailMapper.xml

@ -435,5 +435,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="restoreWarehouseStorageOrderDetailById" parameterType="Long"> <update id="restoreWarehouseStorageOrderDetailById" parameterType="Long">
update warehouse_storage_order_detail set del_flag = '0' where warehouse_storage_detail_id = #{warehouseStorageDetailId} update warehouse_storage_order_detail set del_flag = '0' where warehouse_storage_detail_id = #{warehouseStorageDetailId}
</update> </update>
<select id="selectWarehouseStorageOrderDetailListByRelatedOrderCode" parameterType="WarehouseOutOrderDetail" resultMap="WarehouseStorageOrderDetailResult">
<include refid="selectWarehouseStorageOrderDetailVo"/>
<where>
<if test="relatedOrder!= null">
and related_order_code = #{relatedOrderCode}
</if>
<if test="materialNo!= null">
and material_no = #{materialNo}
</if>
<if test="supplierCode!= null">
and supplier_code = #{supplierCode}
</if>
</where>
</select>
</mapper> </mapper>

19
ruoyi-admin/src/main/resources/templates/erp/bom/add.html

@ -73,8 +73,12 @@
<textarea name="describe" class="form-control" readonly required></textarea> <textarea name="describe" class="form-control" readonly required></textarea>
</div> </div>
</div> </div>
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label is-required">入库部门:</label>
<div class="col-sm-8">
<input name="warehouseDept" class="form-control">
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">工程员:</label> <label class="col-sm-3 control-label is-required">工程员:</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -109,6 +113,7 @@
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var bomLevelSelectDatas = [[${@dict.getTypeSelect('bomLevel')}]]; var bomLevelSelectDatas = [[${@dict.getTypeSelect('bomLevel')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]]; var processMethodDatas = [[${@dict.getType('processMethod')}]];
var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]];
var loginName = [[${@permission.getPrincipalProperty('loginName')}]]; var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var userName = [[${@permission.getPrincipalProperty('userName')}]]; var userName = [[${@permission.getPrincipalProperty('userName')}]];
$("#form-bom-add").validate({ $("#form-bom-add").validate({
@ -364,6 +369,14 @@
return $.table.selectDictLabel(processMethodDatas, value); return $.table.selectDictLabel(processMethodDatas, value);
} }
}, },
{
field: 'warehouseDept',
align: 'center',
title: '入库部门',visible:false,
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(warehouseDeptDatas, value);
}
},
{ {
field: 'remark', field: 'remark',
align: 'center', align: 'center',
@ -407,6 +420,7 @@
$("input[name='processMethod']").val(data.processMethod); $("input[name='processMethod']").val(data.processMethod);
$("#selectUnit").val([data.unit]).trigger("change"); $("#selectUnit").val([data.unit]).trigger("change");
$("input[name='unit']").val(data.unit); $("input[name='unit']").val(data.unit);
$("input[name='warehouseDept']").val(data.warehouseDept);
} }
@ -478,6 +492,7 @@
processMethod: rowData.processMethod, processMethod: rowData.processMethod,
unit: rowData.unit, unit: rowData.unit,
brand: rowData.brand, brand: rowData.brand,
warehouseDept: rowData.warehouseDept,
level: "1", level: "1",
useNum:'', useNum:'',
lossRate:'' lossRate:''

10
ruoyi-admin/src/main/resources/templates/erp/bom/edit.html

@ -100,6 +100,7 @@
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]]; var processMethodDatas = [[${@dict.getType('processMethod')}]];
var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]];
var bomLevelSelectDatas = [[${@dict.getTypeSelect('bomLevel')}]]; var bomLevelSelectDatas = [[${@dict.getTypeSelect('bomLevel')}]];
$("#form-bom-edit").validate({ focusCleanup: true}); $("#form-bom-edit").validate({ focusCleanup: true});
function selMaterialTb(){ function selMaterialTb(){
@ -294,6 +295,14 @@
return $.table.selectDictLabel(processMethodDatas, value); return $.table.selectDictLabel(processMethodDatas, value);
} }
}, },
{
field: 'warehouseDept',
align: 'center',
title: '入库部门',visible:false,
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(warehouseDeptDatas, value);
}
},
{ {
field: 'remark', field: 'remark',
align: 'center', align: 'center',
@ -366,6 +375,7 @@
brand: rowData.brand, brand: rowData.brand,
unit: rowData.unit, unit: rowData.unit,
processMethod: rowData.processMethod, processMethod: rowData.processMethod,
warehouseDept: rowData.warehouseDept,
} }
}) })
layer.close(index); layer.close(index);

3
ruoyi-admin/src/main/resources/templates/erp/material/select.html

@ -99,9 +99,10 @@
field: 'describe', field: 'describe',
title: '描述' title: '描述'
}, },
{field:'warehouseDept', title: '仓库部门',},
{ {
field: 'processMethod', field: 'processMethod',
title: '半成品类型', title: '加工方法',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value); return $.table.selectDictLabel(processMethodDatas, value);
} }

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

@ -53,7 +53,7 @@
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var levelDatas = [[${@dict.getType('bomLevel')}]]; var levelDatas = [[${@dict.getType('bomLevel')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]]; var warehouseDates = [[${@dict.getType('warehouseDate')}]];
// var subTableFormArray = []; // var subTableFormArray = [];
@ -131,6 +131,14 @@
align: 'center', align: 'center',
title: '描述' title: '描述'
}, },
{
field: 'warehouseDept',
align: 'center',
title: '入库部门',visible: false,
formatter: function(value, row, index) {
return $.table.selectDictLabel(warehouseDates, value);
}
},
{ {
field: 'processMethod', field: 'processMethod',
align: 'center', align: 'center',
@ -271,6 +279,14 @@
return $.table.selectDictLabel(processMethodDatas, value); return $.table.selectDictLabel(processMethodDatas, value);
} }
}, },
{
field: 'warehouseDept',
align: 'center',
title: '入库部门',visible: false,
formatter: function(value, row, index) {
return $.table.selectDictLabel(warehouseDates, value);
}
},
{ {
field: 'useNum', field: 'useNum',
title: '用量', title: '用量',

4
ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html

@ -339,6 +339,9 @@
{ title: '描述',field: 'describe',align: 'center'}, { title: '描述',field: 'describe',align: 'center'},
{title: '品牌',field: 'brand',align: 'center'}, {title: '品牌',field: 'brand',align: 'center'},
{ title: '单位',field: 'unit',align: 'center', formatter: function(value, row, index) {return $.table.selectDictLabel(sysUnitClassDatas, value);}}, { title: '单位',field: 'unit',align: 'center', formatter: function(value, row, index) {return $.table.selectDictLabel(sysUnitClassDatas, value);}},
{ title: '入库部门',field: 'warehouseDept',align: 'center',
formatter: function(value, row, index) {}
},
{title: '半成品类型',field: 'processMethod',align: 'center',formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);}}, {title: '半成品类型',field: 'processMethod',align: 'center',formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);}},
{ title: '对外售价',field: 'materialSole',editable: true}, { title: '对外售价',field: 'materialSole',editable: true},
{title: '国内税率',field: 'countTax',align: 'center',editable: {type: 'text',mode: 'inline',},}, {title: '国内税率',field: 'countTax',align: 'center',editable: {type: 'text',mode: 'inline',},},
@ -673,6 +676,7 @@
unit: rowData.unit, unit: rowData.unit,
processMethod: rowData.processMethod, processMethod: rowData.processMethod,
photoUrl: rowData.photoUrl, photoUrl: rowData.photoUrl,
warehouseDept: rowData.warehouseDept,
countTax: $("#taxRate_add").val(), countTax: $("#taxRate_add").val(),
usdTax: $("#usdTax_add").val(), usdTax: $("#usdTax_add").val(),
materialSole: "", materialSole: "",

4
ruoyi-admin/src/main/resources/templates/system/salesOrder/edit.html

@ -374,6 +374,9 @@
return $.table.selectDictLabel(processMethodDatas, value); return $.table.selectDictLabel(processMethodDatas, value);
} }
}, },
{ title: '入库部门',field: 'warehouseDept',align: 'center',
formatter: function(value, row, index) {}
},
{ title: '对外售价',field: 'materialSole', { title: '对外售价',field: 'materialSole',
editable: { editable: {
type: 'text', type: 'text',
@ -654,6 +657,7 @@
describe: rowData.describe, describe: rowData.describe,
brand: rowData.brand, brand: rowData.brand,
photoUrl: rowData.photoUrl, photoUrl: rowData.photoUrl,
warehouseDept:rowData.warehouseDept,
unit: rowData.unit, unit: rowData.unit,
processMethod: rowData.processMethod, processMethod: rowData.processMethod,
countTax:rmb , countTax:rmb ,

Loading…
Cancel
Save