工艺路线-BOM弹窗后端

highway
A0010407 1 year ago
parent ca4b21061c
commit 736f72f4af

@ -11,6 +11,7 @@ import com.op.common.log.annotation.Log;
import com.op.common.log.enums.BusinessType; import com.op.common.log.enums.BusinessType;
import com.op.common.security.annotation.RequiresPermissions; import com.op.common.security.annotation.RequiresPermissions;
import com.op.technology.domain.Bom; import com.op.technology.domain.Bom;
import com.op.technology.domain.BomComponent;
import com.op.technology.domain.ProProcess; import com.op.technology.domain.ProProcess;
import com.op.technology.domain.Equipment; import com.op.technology.domain.Equipment;
import com.op.technology.service.IProProcessService; import com.op.technology.service.IProProcessService;
@ -153,11 +154,11 @@ public class ProProcessController extends BaseController {
/** /**
* BOM * BOM
*/ */
@RequiresPermissions("mes:pro:process:bomList") @RequiresPermissions("mes:pro:process:bomComponentList")
@GetMapping("/bomList") @GetMapping("/bomComponentList")
public TableDataInfo bomList(Bom bom) { public TableDataInfo selectBaseBomComponentList(BomComponent bomComponent) {
startPage(); startPage();
List<Bom> list = proProcessService.selectBomList(bom); List<BomComponent> list = proProcessService.selectBaseBomComponentList(bomComponent);
return getDataTable(list); return getDataTable(list);
} }
} }

@ -1,6 +1,7 @@
package com.op.technology.mapper; package com.op.technology.mapper;
import com.op.technology.domain.Bom; import com.op.technology.domain.Bom;
import com.op.technology.domain.BomComponent;
import com.op.technology.domain.Equipment; import com.op.technology.domain.Equipment;
import com.op.technology.domain.ProProcess; import com.op.technology.domain.ProProcess;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -71,5 +72,5 @@ public interface ProProcessMapper
List<Equipment> selectEquipmentList(Equipment equipment); List<Equipment> selectEquipmentList(Equipment equipment);
Equipment selectEquipmentByEquipmentId(Long equipmentId); Equipment selectEquipmentByEquipmentId(Long equipmentId);
List<Bom> selectBomList(Bom bom); List<BomComponent> selectBaseBomComponentList(BomComponent bomComponent);
} }

@ -1,6 +1,7 @@
package com.op.technology.service; package com.op.technology.service;
import com.op.technology.domain.Bom; import com.op.technology.domain.Bom;
import com.op.technology.domain.BomComponent;
import com.op.technology.domain.Equipment; import com.op.technology.domain.Equipment;
import com.op.technology.domain.ProProcess; import com.op.technology.domain.ProProcess;
@ -72,5 +73,5 @@ public interface IProProcessService
public Equipment selectEquipmentByEquipmentId(Long equipmentId); public Equipment selectEquipmentByEquipmentId(Long equipmentId);
public List<Bom> selectBomList(Bom bom); public List<BomComponent> selectBaseBomComponentList(BomComponent bomComponent);
} }

@ -7,10 +7,7 @@ import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.StringUtils; import com.op.common.core.utils.StringUtils;
import com.op.common.core.utils.uuid.IdUtils; import com.op.common.core.utils.uuid.IdUtils;
import com.op.common.security.utils.SecurityUtils; import com.op.common.security.utils.SecurityUtils;
import com.op.technology.domain.BaseFile; import com.op.technology.domain.*;
import com.op.technology.domain.Bom;
import com.op.technology.domain.Equipment;
import com.op.technology.domain.ProProcess;
import com.op.technology.mapper.BaseFileMapper; import com.op.technology.mapper.BaseFileMapper;
import com.op.technology.mapper.ProProcessMapper; import com.op.technology.mapper.ProProcessMapper;
import com.op.technology.service.IProProcessService; import com.op.technology.service.IProProcessService;
@ -216,13 +213,13 @@ public class ProProcessServiceImpl implements IProProcessService {
/** /**
* BOM * BOM
* *
* @param bom BOM * @param bomComponent BOM
* @return BOM * @return BOM
*/ */
@Override @Override
@DS("#header.poolName") @DS("#header.poolName")
public List<Bom> selectBomList(Bom bom) { public List<BomComponent> selectBaseBomComponentList(BomComponent bomComponent) {
return proProcessMapper.selectBomList(bom); return proProcessMapper.selectBaseBomComponentList(bomComponent);
} }
} }

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.technology.mapper.ProProcessMapper"> <mapper namespace="com.op.technology.mapper.ProProcessMapper">
<resultMap type="ProProcess" id="ProProcessResult"> <resultMap type="ProProcess" id="ProProcessResult">
@ -65,18 +65,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="hourlyUnitPrice" column="hourly_unit_price" /> <result property="hourlyUnitPrice" column="hourly_unit_price" />
</resultMap> </resultMap>
<resultMap type="Bom" id="BomResult"> <resultMap type="BomComponent" id="BomComponentResult">
<result property="factoryCode" column="factory_code" /> <result property="handle" column="handle" />
<result property="productionVersion" column="production_version" />
<result property="bomCode" column="bom_code" /> <result property="bomCode" column="bom_code" />
<result property="optionalBom" column="optional_bom" /> <result property="bomName" column="product_desc_zh" />
<result property="optionalBomText" column="optional_bom_text" /> <result property="site" column="site" />
<result property="pvvd" column="pvvd" /> <result property="productCode" column="product_code" />
<result property="pved" column="pved" /> <result property="cumc" column="cumc" />
<result property="bomCalculateNumber" column="bom_calculate_number" /> <result property="component" column="component" />
<result property="bomCalculateUnit" column="bom_calculate_unit" /> <result property="bomHierarchy" column="bom_hierarchy" />
<result property="bomBaseNumber" column="bom_base_number" /> <result property="projectNo" column="project_no" />
<result property="bomBaseUnit" column="bom_base_unit" /> <result property="standardDosage" column="standard_dosage" />
<result property="lossRate" column="loss_rate" />
<result property="lossAmount" column="loss_amount" />
<result property="cilosses" column="cilosses" />
<result property="componentUnit" column="component_unit" /> <result property="componentUnit" column="component_unit" />
<result property="componentProFlag" column="component_pro_flag" /> <result property="componentProFlag" column="component_pro_flag" />
<result property="msi" column="msi" /> <result property="msi" column="msi" />
@ -89,7 +91,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="currentVersion" column="current_version" />
</resultMap> </resultMap>
<sql id="selectBomVo"> <sql id="selectBomVo">
@ -123,7 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where process_id = #{processId} where process_id = #{processId}
</select> </select>
<select id="checkProcessCodeUnique" parameterType="ProProcess" resultMap="ProProcessResult"> <select id="checkProcessCodeUnique" parameterType="ProProcess" resultMap="ProProcessResult">
select top 1 process_id, process_code, process_name, attention, enable_flag, select top 1 process_id, process_code, process_name, attention, enable_flag,
remark, attr1, attr2, attr3, attr4, create_by, create_time, remark, attr1, attr2, attr3, attr4, create_by, create_time,
update_by, update_time from pro_process update_by, update_time from pro_process
@ -170,7 +171,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="param8 != null">param8,</if> <if test="param8 != null">param8,</if>
<if test="param9 != null">param9,</if> <if test="param9 != null">param9,</if>
<if test="param10 != null">param10,</if> <if test="param10 != null">param10,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{processId}, #{processId},
<if test="processCode != null and processCode != ''">#{processCode},</if> <if test="processCode != null and processCode != ''">#{processCode},</if>
@ -202,7 +203,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="param8 != null">#{param8},</if> <if test="param8 != null">#{param8},</if>
<if test="param9 != null">#{param9},</if> <if test="param9 != null">#{param9},</if>
<if test="param10 != null">#{param10},</if> <if test="param10 != null">#{param10},</if>
</trim> </trim>
</insert> </insert>
<update id="updateProProcess" parameterType="ProProcess"> <update id="updateProProcess" parameterType="ProProcess">
@ -267,29 +268,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where> </where>
</select> </select>
<select id="selectBomList" parameterType="Bom" resultMap="BomResult"> <select id="selectBaseBomComponentList" parameterType="BomComponent" resultMap="BomComponentResult">
<include refid="selectBomVo"/> -- select bbc.bom_code,bpc1.product_desc_zh
<where> -- from base_bom_component bbc,base_product_copy1 bpc1
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if> -- left join base_product_copy1 bpc1 on bbc.product_code = (right(bpc1.product_code,11))
<if test="productionVersion != null and productionVersion != ''"> and production_version = #{productionVersion}</if> -- Where
<if test="bomCode != null and bomCode != ''"> and bom_code = #{bomCode}</if> <!-- <if test="bomCode != null and bomCode != ''"> and bom_code = #{bomCode}</if>-->
<if test="optionalBom != null and optionalBom != ''"> and optional_bom = #{optionalBom}</if> -- bbc.product_code = right(bpc1.product_code,11)
<if test="optionalBomText != null and optionalBomText != ''"> and optional_bom_text = #{optionalBomText}</if> select distinct bbc.bom_code,bpc1.product_desc_zh,right(bpc1.product_code,11) as pc,bbc.product_code
<if test="pvvd != null "> and pvvd = #{pvvd}</if> from base_bom_component bbc,base_product_copy1 bpc1
<if test="pved != null "> and pved = #{pved}</if> Where
<if test="bomCalculateNumber != null "> and bom_calculate_number = #{bomCalculateNumber}</if> bbc.product_code = right(bpc1.product_code,11)
<if test="bomCalculateUnit != null and bomCalculateUnit != ''"> and bom_calculate_unit = #{bomCalculateUnit}</if> <if test="bomCode != null and bomCode != ''"> and bom_code = #{bomCode}</if>
<if test="bomBaseNumber != null "> and bom_base_number = #{bomBaseNumber}</if> </select>
<if test="bomBaseUnit != null and bomBaseUnit != ''"> and bom_base_unit = #{bomBaseUnit}</if>
<if test="componentUnit != null and componentUnit != ''"> and component_unit = #{componentUnit}</if>
<if test="componentProFlag != null and componentProFlag != ''"> and component_pro_flag = #{componentProFlag}</if>
<if test="msi != null and msi != ''"> and msi = #{msi}</if>
<if test="sanka != null and sanka != ''"> and sanka = #{sanka}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
<if test="currentVersion != null and currentVersion != ''"> and current_version = #{currentVersion}</if>
</where>
</select>
</mapper> </mapper>

Loading…
Cancel
Save