邱宇豪
2023-11-27 b1c00ede50ba51a46b1cfbcdf129f1e68b228e6c
20231127_qiuyh_调整物料管理搅拌站入库记录
已修改3个文件
169 ■■■■ 文件已修改
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/service/impl/MinXingPlantServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/resources/mapping/MinXingPlantMapper.xml 160 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/resources/mapping/TSteelProduceMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/service/impl/MinXingPlantServiceImpl.java
@@ -8,6 +8,7 @@
import com.thhy.general.config.SysUserInfo;
import com.thhy.general.exception.BasicException;
import com.thhy.general.utils.ExcelUtils;
import com.thhy.general.utils.UUIDUtils;
import com.thhy.general.utils.UserInfoUtils;
import com.thhy.materials.modules.biz.materialsplan.entity.RsbStatDto;
import com.thhy.materials.modules.biz.materialsplan.entity.StatResultVo;
@@ -59,6 +60,10 @@
        String companyId = sysUserInfo.getCompanyId();
        minXingPlantVo.setCompanyId(companyId);
        minXingPlantVo.setCreateUser(sysUserInfo.getUserId());
        minXingPlantVo.setId(UUIDUtils.create());
        minXingPlantVo.setOpType(1);
        minXingPlantVo.setMaterialValue(minXingPlantVo.getChangeStock());
        minXingPlantVo.setType(4);
        minXingPlantMapper.insert(minXingPlantVo);
        RLock lock = redissonClient.getLock("materlock");
        try {
hd/pipe/materialsManage/src/main/resources/mapping/MinXingPlantMapper.xml
@@ -3,83 +3,83 @@
<mapper namespace="com.thhy.materials.modules.biz.mixingstationstorage.mapper.MinXingPlantMapper">
  <insert id="insert" >
    insert into t_material_stock_record
    <trim prefix="(" suffix=")" suffixOverrides=",">
        <if test="id != null">
            id,
        </if>
        <if test="type != null">
            type,
        </if>
        <if test="opType != null">
            op_Type,
        </if>
        <if test="materialName != null">
            material_name,
        </if>
        <if test="materialValue != null">
            material_value,
        </if>
        <if test="beforeStock != null">
            before_stock,
        </if>
        <if test="afterStock != null">
            after_stock,
        </if>
        <if test="remark != null">
            remark,
        </if>
        <if test="pipeId != null">
            pipe_id,
        </if>
        <if test="pipeNum != null">
            pipe_num,
        </if>
        <if test="createDate != null">
            create_date,
        </if>
        <if test="supplierName != null">
            supplier_name,
        </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
        <if test="id != null">
            #{id},
        </if>
        <if test="type != null">
            #{type},
        </if>
        <if test=" != null">
            #{opType},
        </if>
        <if test="materialName != null">
            #{materialName},
        </if>
        <if test="materialValue != null">
            #{materialValue},
        </if>
        <if test="beforeStock != null">
            #{beforeStock},
        </if>
        <if test="afterStock != null">
            #{afterStock},
        </if>
        <if test="remark != null">
            #{remark},
        </if>
        <if test="pipeId != null">
            #{pipeId},
        </if>
        <if test="pipeNum != null">
            #{pipeNum},
        </if>
        <if test="createDate != null">
            #{createDate},
        </if>
        <if test="supplierName != null">
            #{supplierName},
        </if>
    </trim>
      insert into t_material_stock_record
      <trim prefix="(" suffix=")" suffixOverrides=",">
          <if test="id != null">
              id,
          </if>
          <if test="createDate != null">
              create_date,
          </if>
          <if test="type != null">
              type,
          </if>
          <if test="opType != null">
              op_type,
          </if>
          <if test="dictId != null">
              material_name,
          </if>
          <if test="materialValue != null">
              material_value,
          </if>
          <if test="beforeStock != null">
              before_stock,
          </if>
          <if test="afterStock != null">
              after_stock,
          </if>
          <if test="companyId != null">
              company_id,
          </if>
          <if test="remark != null">
              remark,
          </if>
          <if test="createUser != null">
              create_user,
          </if>
          <if test="supplierName != null">
              supplier_name,
          </if>
      </trim>
      <trim prefix="values (" suffix=")" suffixOverrides=",">
          <if test="id != null">
              #{id},
          </if>
          <if test="createDate != null">
              #{createDate},
          </if>
          <if test="type != null">
              #{type},
          </if>
          <if test="opType != null">
              #{opType},
          </if>
          <if test="dictId != null">
              #{dictId},
          </if>
          <if test="materialValue != null">
              #{materialValue},
          </if>
          <if test="beforeStock != null">
              #{beforeStock},
          </if>
          <if test="afterStock != null">
              #{afterStock},
          </if>
          <if test="companyId != null">
              #{companyId},
          </if>
          <if test="remark != null">
              #{remark},
          </if>
          <if test="createUser != null">
              #{createUser},
          </if>
          <if test="supplierName != null">
              #{supplierName},
          </if>
      </trim>
  </insert>
  <select id="selectAllList" parameterType="com.thhy.materials.modules.biz.mixingstationstorage.dto.MinXingPlantDto" resultType="com.thhy.materials.modules.biz.mixingstationstorage.entity.MinXingPlantVo">
@@ -174,6 +174,9 @@
      <if test="createUser != null">
        create_user,
      </if>
      <if test="supplierName != null">
        supplier_name,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
@@ -209,6 +212,9 @@
      <if test="createUser != null">
        #{createUser},
      </if>
      <if test="supplierName != null">
        #{supplierName},
      </if>
    </trim>
  </insert>
  <select id="selectInventoryRecordList" parameterType="com.thhy.materials.modules.biz.mixingstationstorage.dto.TMaterialStockRecordDto" resultType="com.thhy.materials.modules.biz.mixingstationstorage.entity.TMaterialStockRecordVo">
hd/pipe/materialsManage/src/main/resources/mapping/TSteelProduceMapper.xml
@@ -91,8 +91,8 @@
      <if test="isModel!=null and isModel!='' ">
          and tsp.size_id=#{sizeId}
      </if>
      <if test="realName!=null and realName!='' ">
          and spu.real_name regexp #{realName}
      <if test="platUserName!=null and platUserName!='' ">
          and spu.real_name regexp #{platUserName}
      </if>
        order by tsp.produce_number desc