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

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

@ -1,6 +1,7 @@
package com.op.technology.service;
import com.op.technology.domain.Bom;
import com.op.technology.domain.BomComponent;
import com.op.technology.domain.Equipment;
import com.op.technology.domain.ProProcess;
@ -72,5 +73,5 @@ public interface IProProcessService
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.uuid.IdUtils;
import com.op.common.security.utils.SecurityUtils;
import com.op.technology.domain.BaseFile;
import com.op.technology.domain.Bom;
import com.op.technology.domain.Equipment;
import com.op.technology.domain.ProProcess;
import com.op.technology.domain.*;
import com.op.technology.mapper.BaseFileMapper;
import com.op.technology.mapper.ProProcessMapper;
import com.op.technology.service.IProProcessService;
@ -216,13 +213,13 @@ public class ProProcessServiceImpl implements IProProcessService {
/**
* BOM
*
* @param bom BOM
* @param bomComponent BOM
* @return BOM
*/
@Override
@DS("#header.poolName")
public List<Bom> selectBomList(Bom bom) {
return proProcessMapper.selectBomList(bom);
public List<BomComponent> selectBaseBomComponentList(BomComponent bomComponent) {
return proProcessMapper.selectBaseBomComponentList(bomComponent);
}
}

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

Loading…
Cancel
Save