Merge remote-tracking branch 'origin/master'

master
mengjiao 9 months ago
commit eda3150b06

@ -277,7 +277,7 @@ public class MesReportWorkController extends BaseController {
@RequiresPermissions("mes:dailyReportNew:exportBP")
@PostMapping("/getDailyReportNewBPExport")
public void getDailyReportNewBPExport(HttpServletResponse response,MesDailyReportVo mesDailyReportVo) {
List<MesDailyReportVo> list0 = mesReportWorkService.getDailyReportNew(mesDailyReportVo);
List<MesDailyReportVo> list0 = mesReportWorkService.getDailyReportExportNew(mesDailyReportVo);
List<MesDailyReportBPVo> list = new ArrayList<>();
MesDailyReportBPVo bpVo = null;
for(MesDailyReportVo vo:list0){

@ -178,6 +178,7 @@ public interface MesReportWorkMapper {
MesReportWork getReportWorkHzAttr1(MesReportWork mesReportWork);
List<MesDailyReportVo> getDailyReportUp(MesDailyReportVo mesDailyReportVo);
List<MesDailyReportVo> getDailyReportUpBP(MesDailyReportVo mesDailyReportVo);
QuantityDto getRealQuantity(QuantityDto quantityDto);

@ -136,6 +136,8 @@ public interface IMesReportWorkService {
R preReportRow(MesReportWork mesReportWork);
List<MesDailyReportVo> getDailyReportNew(MesDailyReportVo mesDailyReportVo);
List<MesDailyReportVo> getDailyReportExportNew(MesDailyReportVo mesDailyReportVo);
Map getmonthProductionSut(MesMonthReportVo mesMonthReportVo);
}

@ -507,7 +507,56 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService {
return dtos;
}
@Override
@DS("#header.poolName")
public List<MesDailyReportVo> getDailyReportExportNew(MesDailyReportVo mesDailyReportVo){
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String key = "#header.poolName";
List<MesDailyReportVo> dtos = mesReportWorkMapper.getDailyReportUpBP(mesDailyReportVo);
for (MesDailyReportVo dto : dtos) {
//品类
String typeName = mesReportWorkMapper.getTypeName(dto.getProductCode().replace("0000000",""));
if(StringUtils.isNotBlank(typeName)){
dto.setProdType(typeName);
}else {
dto.setProdType("蚊香");
}
QuantityDto quantityDto = new QuantityDto();
String workorderCode = dto.getWorkorderCode();
String machineCode = dto.getEquipmentCode();
quantityDto.setWorkorderCode(workorderCode);
quantityDto.setMachineCode(machineCode);
QuantityDto parentMesReport = mesReportWorkMapper.getRealQuantity(quantityDto);
QuantityDto sonMesReport = mesReportWorkMapper.getSumQuantity(quantityDto);
if(sonMesReport == null){//单层工单的情况
sonMesReport = mesReportWorkMapper.getSumQuantityOne(quantityDto);
}
// 产量
Long sumQua = 0L;
// 实际产量
Long realQua = 0L;
if (sonMesReport != null && sonMesReport != null) {
sumQua = sonMesReport.getQuantityFeedbackSum();
realQua = parentMesReport.getQuantityFeedbackSum();
dto.setQuantityAct(String.valueOf(sumQua));
dto.setQuantityFeedback(String.valueOf(realQua));
sumQua = sonMesReport.getQuantityFeedbackSum();
dto.setQuantityAct(String.valueOf(sumQua));
}
}
return dtos;
}
@Override
@DS("#header.poolName")

@ -705,6 +705,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productCode != null and productCode != ''">and pow.product_code like concat('%', #{productCode}, '%')</if>
order by be.equipment_code
</select>
<select id="getDailyReportUpBP" resultType="com.op.mes.domain.vo.MesDailyReportVo">
select be.workshop_code workshopCode,
be.workshop_name workshopName,
pow.product_date productDate,
be.sap_code sapCode,
be.sap_name sapName,
be.equipment_code equipmentCode,
be.equipment_name equipmentName,
pow.workorder_code_sap workorderCodeSap,
pow.product_code productCode,
pow.product_name productName,
pow.unit unit,
pow.quantity_split quantitySplit,
pow.attr3 teamLeaderName,
pow.workorder_code workorderCode,
pow.workorder_name workorderName,
bp.umrez spec,
bp.report_rate reportRate
from base_equipment be
left join pro_order_workorder pow on be.equipment_code = pow.workorder_name
left join base_product bp on bp.product_code = pow.product_code
where be.del_flag = '0' and be.sap_code is not null and pow.status = 'w3'
and pow.parent_order = '0' and pow.del_flag='0'
<if test="sapName != null and sapName != ''">and be.sap_name like concat('%', #{sapName}, '%')</if>
<if test="workCenter != null and workCenter != ''">and be.workshop_code = #{workCenter}</if>
<if test="equipmentTypeCode != null and equipmentTypeCode != ''">and be.equipment_type_code = #{equipmentTypeCode}</if>
<if test="productDateStart != null and productDateStart != ''">
and CONVERT(varchar(10),pow.product_date, 23) >= CONVERT(varchar(10), #{productDateStart}, 23)
</if>
<if test="productDateEnd != null and productDateEnd != ''">
and CONVERT(varchar(10), #{productDateEnd}, 23) >= CONVERT(varchar(10),pow.product_date, 23)
</if>
<if test="productCode != null and productCode != ''">and pow.product_code like concat('%', #{productCode}, '%')</if>
order by be.equipment_code
</select>
<select id="getRealQuantity" resultType="com.op.mes.domain.dto.QuantityDto">
select sum(quantity_feedback) quantityFeedbackSum

@ -590,11 +590,65 @@ public class QcStaticTableController extends BaseController {
}
/**
* ----
* ----
**/
@GetMapping("/getDLTableMXTitle")
@Log(title = "定量值分析明细", businessType = BusinessType.QUERY)
public QcCPKInfo getDLTableMXTitle(QcCPKInfo qcCPKInfo) {
return qcStaticTableService.getDLTableMXTitle(qcCPKInfo);
}
/**
* --
**/
@GetMapping("/getDLTableMXList")
@Log(title = "定量值分析明细", businessType = BusinessType.QUERY)
public QcStaticTable getDLTableMXList(QcStaticTable qcStaticTable) {
return qcStaticTableService.getDLTableMXList(qcStaticTable);
public List<HashMap> getDLTableMXList(QcCPKInfo qcCPKInfo) {
//startPage();
//List<QcCPKInfo> list = qcStaticTableService.getDLTableMXList(qcCPKInfo);
//return getDataTable(list);
return qcStaticTableService.getDLTableMXList(qcCPKInfo);
}
@PostMapping("/exportDLTableMXList")
public void exportDLTableMXList(HttpServletResponse response,QcCPKInfo qcCPKInfo) {
List<HashMap> list = qcStaticTableService.getDLTableMXList(qcCPKInfo);
QcCPKInfo titleCols = qcStaticTableService.getDLTableMXTitle(qcCPKInfo);
List<String> title2Cols = titleCols.getTitleCol1();
//String titleRow1 = String.join(",", title2Cols);
String titleRow1 = "定量检测项测量值明细";
//表格结构数据
ArrayList<ExcelCol> excelCols = new ArrayList<>();
excelCols.add(new ExcelCol("日期", "incomeTime", 30));
excelCols.add(new ExcelCol("线体编码", "checkLoc", 30));
excelCols.add(new ExcelCol("线体名称", "equipmentName", 30));
excelCols.add(new ExcelCol("产品编码", "materialCode", 30));
excelCols.add(new ExcelCol("产品名称", "materialName", 30));
excelCols.add(new ExcelCol("CPK品类", "packTypeName", 30));
excelCols.add(new ExcelCol("工单编码", "workorderCode", 30));
excelCols.add(new ExcelCol("批次", "batchNo", 30));
excelCols.add(new ExcelCol("订单编码", "workorderCodeSap", 30));
excelCols.add(new ExcelCol("检测项", "ruleName", 30));
for (int n = 0; n < title2Cols.size(); n++) {
excelCols.add(new ExcelCol("测量值"+title2Cols.get(n), "act" + (n+1), 20));
}
String titleName = "定量检测项测量值明细";
SXSSFWorkbook workbook = null;
try {
//设置响应头
response.setHeader("Content-disposition",
"attachment; filename=" + titleName);
response.setContentType("application/octet-stream;charset=UTF-8");
ServletOutputStream outputStream = response.getOutputStream();
//调用工具类
workbook = ExcelMapUtil.initWorkbook(titleName, titleRow1, excelCols, list);
workbook.write(outputStream);
} catch (Exception e) {
e.printStackTrace();
} finally {
if (workbook != null) {
workbook.dispose();
}
}
}
}

@ -0,0 +1,185 @@
package com.op.quality.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.op.common.core.annotation.Excel;
import com.op.common.core.web.domain.BaseEntity;
import com.op.system.api.domain.quality.ChartDTO;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
/**
*
* @author Open Platform
* @date 2024-10-08
*/
public class QcCPKInfo extends BaseEntity {
private static final long serialVersionUID = 1L;
private List<String> titleCol1;
private String checkType;
private String projectId;
private String ymArrayStart;
private String ymArrayEnd;
private String incomeTime;
private String checkLoc;
private String equipmentName;
private String materialCode;
private String materialName;
private String cpkType;
private String cpkTypeName;
private String workorderCode;
private String batchNo;
private String workorderCodeSap;
private String ruleName;
private String actualValue;
List<HashMap> mxData;
public String getIncomeTime() {
return incomeTime;
}
public void setIncomeTime(String incomeTime) {
this.incomeTime = incomeTime;
}
public String getCheckLoc() {
return checkLoc;
}
public void setCheckLoc(String checkLoc) {
this.checkLoc = checkLoc;
}
public String getEquipmentName() {
return equipmentName;
}
public void setEquipmentName(String equipmentName) {
this.equipmentName = equipmentName;
}
public String getMaterialCode() {
return materialCode;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
public String getMaterialName() {
return materialName;
}
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
public String getCpkType() {
return cpkType;
}
public void setCpkType(String cpkType) {
this.cpkType = cpkType;
}
public String getCpkTypeName() {
return cpkTypeName;
}
public void setCpkTypeName(String cpkTypeName) {
this.cpkTypeName = cpkTypeName;
}
public String getWorkorderCode() {
return workorderCode;
}
public void setWorkorderCode(String workorderCode) {
this.workorderCode = workorderCode;
}
public String getBatchNo() {
return batchNo;
}
public void setBatchNo(String batchNo) {
this.batchNo = batchNo;
}
public String getWorkorderCodeSap() {
return workorderCodeSap;
}
public void setWorkorderCodeSap(String workorderCodeSap) {
this.workorderCodeSap = workorderCodeSap;
}
public String getRuleName() {
return ruleName;
}
public void setRuleName(String ruleName) {
this.ruleName = ruleName;
}
public String getActualValue() {
return actualValue;
}
public void setActualValue(String actualValue) {
this.actualValue = actualValue;
}
public List<String> getTitleCol1() {
return titleCol1;
}
public void setTitleCol1(List<String> titleCol1) {
this.titleCol1 = titleCol1;
}
public String getCheckType() {
return checkType;
}
public void setCheckType(String checkType) {
this.checkType = checkType;
}
public String getProjectId() {
return projectId;
}
public void setProjectId(String projectId) {
this.projectId = projectId;
}
public String getYmArrayStart() {
return ymArrayStart;
}
public void setYmArrayStart(String ymArrayStart) {
this.ymArrayStart = ymArrayStart;
}
public String getYmArrayEnd() {
return ymArrayEnd;
}
public void setYmArrayEnd(String ymArrayEnd) {
this.ymArrayEnd = ymArrayEnd;
}
public List<HashMap> getMxData() {
return mxData;
}
public void setMxData(List<HashMap> mxData) {
this.mxData = mxData;
}
}

@ -20,7 +20,7 @@ public class QcCheckTaskIncome extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* id
* idactual_value
*/
private String recordId;

@ -1,11 +1,10 @@
package com.op.quality.mapper;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.op.quality.domain.QcCheckDetail;
import com.op.quality.domain.QcCheckType;
import com.op.quality.domain.QcStaticTable;
import com.op.quality.domain.*;
import com.op.system.api.domain.quality.FactoryDto;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
@ -104,4 +103,8 @@ public interface QcStaticTableMapper {
List<QcCheckDetail> getIncomeDetail(QcStaticTable qcStaticTable);
List<QcCheckDetail> getXJDetail(QcStaticTable qcStaticTable);
String getActualValues(QcCPKInfo qcCPKInfo);
List<QcCPKInfo> getDlMxList(QcCPKInfo qcCPKInfo);
}

@ -4,6 +4,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.op.quality.domain.QcCPKInfo;
import com.op.quality.domain.QcCheckDetail;
import com.op.quality.domain.QcCheckType;
import com.op.quality.domain.QcStaticTable;
@ -68,5 +69,7 @@ public interface IQcStaticTableService {
List<QcCheckDetail> exportXJDetail(QcStaticTable qcStaticTable);
QcStaticTable getDLTableMXList(QcStaticTable qcStaticTable);
QcCPKInfo getDLTableMXTitle(QcCPKInfo qcCPKInfo);
List<HashMap> getDLTableMXList(QcCPKInfo qcCPKInfo);
}

@ -12,6 +12,7 @@ import java.time.format.TextStyle;
import java.util.*;
import java.util.stream.Collectors;
import com.alibaba.fastjson2.JSONArray;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.utils.StringUtils;
import com.op.quality.domain.*;
@ -188,25 +189,69 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
return qcStaticTableMapper.getXJDetail(qcStaticTable);
}
/**
* ["1.0.389","2.0.397","3.0.385","4.0.402"]
* @param qcCPKInfo
* @return
*/
@Override
@DS("#header.poolName")
public QcStaticTable getDLTableMXList(QcStaticTable qcStaticTable) {
QcStaticTable dto = new QcStaticTable();
//第一列日期
List<String> days = this.getDays(qcStaticTable.getYmArrayStart(),
qcStaticTable.getYmArrayEnd(), "ymd");
qcStaticTable.setDataType("ymd");
// List<QcCheckTaskIncome> titleList = qcStaticTableMapper.getDLTableTitle(qcStaticTable);
// //表头:第一行
// List<String> colName1 = titleList.stream().map(QcStaticTable::getMaterialName).distinct().collect(Collectors.toList());
// dto.setTitleCol1(colName1);
public List<HashMap> getDLTableMXList(QcCPKInfo qcCPKInfo) {
List<HashMap> mapData = new ArrayList<HashMap>();
//列表数据
List<HashMap> dxData = new ArrayList<>();
List<QcCPKInfo> dxData = qcStaticTableMapper.getDlMxList(qcCPKInfo);
dto.setDxData(dxData);
HashMap dmap = null;
for(QcCPKInfo cpkInfo:dxData){
dmap = new HashMap();
dmap.put("incomeTime",cpkInfo.getIncomeTime());
dmap.put("checkLoc",cpkInfo.getCheckLoc());
dmap.put("equipmentName",cpkInfo.getEquipmentName());
dmap.put("materialCode",cpkInfo.getMaterialCode());
dmap.put("materialName",cpkInfo.getMaterialName());
dmap.put("cpkTypeName",cpkInfo.getCpkTypeName());
dmap.put("workorderCode",cpkInfo.getWorkorderCode());
dmap.put("batchNo",cpkInfo.getBatchNo());
dmap.put("workorderCodeSap",cpkInfo.getWorkorderCodeSap());
dmap.put("ruleName",cpkInfo.getRuleName());
String actStr = cpkInfo.getActualValue();
JSONArray actArray = JSONArray.parseArray(actStr);
if(!actArray.getString(0).equals("/")){
JSONArray actArray0 = JSONArray.parseArray(cpkInfo.getActualValue());
for(int m=0;m<actArray0.size();m++){
String index = (m+1)+"";
if(actArray0.getString(m).split("\\.").length == 3){
index = actArray0.getString(m).substring(0, 1);
String actVal = actArray0.getString(m).substring(2);
dmap.put("act"+index,actVal);
}else{
dmap.put("act"+index,actArray0.getString(m));
};
}
}
mapData.add(dmap);
}
//List<QcCPKInfo> myObjectList = convertList(mapData);
return mapData;
}
@Override
@DS("#header.poolName")
public QcCPKInfo getDLTableMXTitle(QcCPKInfo qcCPKInfo) {
QcCPKInfo dto = new QcCPKInfo();
//表头:第一行
String actualValues = qcStaticTableMapper.getActualValues(qcCPKInfo);
JSONArray codeArray = JSONArray.parseArray(actualValues);
if(codeArray == null){
return dto;
}
List<String> colName1 = new ArrayList<>();
for(int n=0;n<codeArray.size();n++){
colName1.add(codeArray.getString(n).substring(0, 1));
}
dto.setTitleCol1(colName1);
return dto;
}
/**
@ -1186,7 +1231,21 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
return days;
}
// public static List<QcCPKInfo> convertList(List<HashMap> list) {
// List<QcCPKInfo> myObjectList = new ArrayList<>();
//
// for (HashMap<String, Object> map : list) {
// // 从 HashMap 中提取数据
// String attribute1 = (String) map.get("key1"); // 替换 "key1" 为实际的键
// int attribute2 = (Integer) map.get("key2"); // 替换 "key2" 为实际的键,并注意类型转换
//
// // 创建 MyObject 实例并添加到列表中
// QcCPKInfo myObject = new QcCPKInfo(attribute1, attribute2);
// myObjectList.add(myObject);
// }
//
// return myObjectList;
// }
public static void main(String args[]){
String ymd = "1、0.4016";

@ -847,4 +847,42 @@
and be.del_flag = '0'
order by qct.order_no,qct.income_time
</select>
<select id="getActualValues" resultType="String">
select top 1
qctd.actual_value actualValue
from qc_check_task qct
left join qc_check_task_detail qctd on qct.record_id = qctd.belong_to
where qctd.project_id = #{projectId} and qct.check_type = #{checkType} and qct.del_flag = '0'
and qctd.actual_value is not null
and qctd.del_flag = '0'
<if test="ymArrayStart != null ">and CONVERT(varchar(10),qct.income_time, 120) >= #{ymArrayStart}</if>
<if test="ymArrayEnd != null ">and #{ymArrayEnd} >= CONVERT(varchar(10),qct.income_time, 120)</if>
order by LEN(qctd.actual_value) desc
</select>
<select id="getDlMxList" resultType="com.op.quality.domain.QcCPKInfo">
select qct.income_time incomeTime,
qct.check_loc checkLoc,be.equipment_name equipmentName,
qct.material_code materialCode,qct.material_name materialName,
bpa.cpk_type cpkType,sdd.dict_label cpkTypeName,
qct.order_no workorderCode,qct.income_batch_no batchNo,pow.workorder_code_sap workorderCodeSap,
qctd.rule_name ruleName,
qctd.actual_value actualValue
from qc_check_task qct
left join qc_check_task_detail qctd on qct.record_id = qctd.belong_to
left join base_equipment be on be.equipment_code = qct.check_loc
left join base_product_attached bpa on concat('0000000',bpa.product_code) = qct.material_code
left join pro_order_workorder pow on pow.workorder_code = qct.order_no
left join lanju_op_cloud.dbo.sys_dict_data sdd on sdd.dict_value = bpa.cpk_type and sdd.dict_type= 'qms_category'
where qctd.project_id = #{projectId} and qct.check_type = #{checkType}
and qctd.actual_value is not null
and qctd.del_flag = '0' and qct.del_flag = '0' and be.del_flag = '0' and pow.del_flag = '0'
<if test="checkLoc != null ">and qct.check_loc = #{checkLoc}</if>
<if test="cpkType != null ">and bpa.cpk_type = #{cpkType}</if>
<if test="workorderCodeSap != null ">and pow.workorder_code_sap like concat('%',#{workorderCodeSap},'%')</if>
<if test="workorderCode != null ">and pow.workorder_code like concat('%',#{workorderCode},'%')</if>
<if test="materialCode != null ">and qct.material_code like concat('%',#{materialCode},'%')</if>
<if test="ymArrayStart != null ">and CONVERT(varchar(10),qct.income_time, 120) >= #{ymArrayStart}</if>
<if test="ymArrayEnd != null ">and #{ymArrayEnd} >= CONVERT(varchar(10),qct.income_time, 120)</if>
order by qct.income_time
</select>
</mapper>

@ -347,8 +347,8 @@ public class BaseProduct extends BaseEntity {
private String other;
@Excel(name = "CPK品类")
private String otherName;
private String cpkTypeName;
private String cpkType;
/**
*
*/
@ -361,12 +361,20 @@ public class BaseProduct extends BaseEntity {
private String warehouseCycle;
private String packType;
public String getOtherName() {
return otherName;
public String getCpkType() {
return cpkType;
}
public void setOtherName(String otherName) {
this.otherName = otherName;
public void setCpkType(String cpkType) {
this.cpkType = cpkType;
}
public String getCpkTypeName() {
return cpkTypeName;
}
public void setCpkTypeName(String cpkTypeName) {
this.cpkTypeName = cpkTypeName;
}
public String getPackType() {

@ -125,6 +125,24 @@ public class BaseProductAttached extends BaseEntity {
private String warehouseCycle;
private String palletNum;
private String packType;
private String cpkType;
private String cpkTypeName;
public String getCpkType() {
return cpkType;
}
public void setCpkType(String cpkType) {
this.cpkType = cpkType;
}
public String getCpkTypeName() {
return cpkTypeName;
}
public void setCpkTypeName(String cpkTypeName) {
this.cpkTypeName = cpkTypeName;
}
public String getPackType() {
return packType;

@ -24,6 +24,8 @@
<result property="supportPlate" column="support_plate"/>
<result property="other" column="other"/>
<result property="palletNum" column="pallet_num"/>
<result property="cpkType" column="cpk_type"/>
</resultMap>
<sql id="selectBaseProductAttachedVo">
@ -73,7 +75,8 @@
bpa.support_no,
bpa.pvc,
bpa.support_plate,
bpa.other
bpa.other,
bpa.cpk_type,
from base_product_attached bpa
where id = #{id}
</select>
@ -89,6 +92,7 @@
man_standar,
warehouse_cycle,
pallet_num,
cpk_type,
<if test="packType != null">pack_type,</if>
<if test="sprayWay != null">spray_way,</if>
<if test="blankDiameter != null">blank_diameter,</if>
@ -112,6 +116,7 @@
#{manStandar},
#{warehouseCycle},
#{palletNum},
#{cpkType},
<if test="packType != null">#{packType},</if>
<if test="sprayWay != null">#{sprayWay},</if>
<if test="blankDiameter != null">#{blankDiameter},</if>
@ -161,7 +166,8 @@
pallet_num = #{palletNum},
pack_type = #{packType},
category=#{category},
other=#{other}
other=#{other},
cpk_type=#{cpkType}
where id = #{id}
</update>

@ -64,14 +64,15 @@
<result property="pvc" column="pvc"/>
<result property="supportPlate" column="support_plate"/>
<result property="other" column="other"/>
<result property="otherName" column="otherName"/>
<result property="cpkType" column="cpk_type"/>
<result property="cpkTypeName" column="cpkTypeName"/>
<result property="reportRate" column="report_rate"/>
<result property="mvgr5" column="mvgr5"/>
<result property="mvgr5Nm" column="mvgr5_nm"/>
<result property="palletNum" column="palletNum"/>
<result property="warehouseCycle" column="warehouse_cycle"/>
<result property="packType" column="pack_type"/>
<!--附属属性-->
<result property="id" column="id"/>
</resultMap>
@ -99,12 +100,13 @@
bpa.support_no,
bpa.pvc,
bpa.support_plate,
bpa.other,sdd.dict_label otherName,
bpa.other,
bpa.cpk_type, sdd.dict_label cpkTypeName,
bpa.warehouse_cycle,bpa.pallet_num palletNum,
bpa.pack_type
from base_product bp
left join base_product_attached bpa on bpa.product_code = right(bp.product_code,11)
left join lanju_op_cloud.dbo.sys_dict_data sdd on sdd.dict_value = bpa.other and sdd.dict_type= 'qms_category'
left join lanju_op_cloud.dbo.sys_dict_data sdd on sdd.dict_value = bpa.cpk_type and sdd.dict_type= 'qms_category'
</sql>
<select id="selectBaseProductList" parameterType="BaseProduct" resultMap="BaseProductResult">
@ -149,6 +151,7 @@
<if test="mtart != null and mtart != ''">and bp.mtart = #{mtart}</if>
<if test="reportRate != null and reportRate != ''">and bp.report_rate = #{reportRate}</if>
<if test="mvgr5 != null and mvgr5 != ''">and bp.mvgr5 like concat('%', #{mvgr5},'%') </if>
<if test="cpkType != null and cpkType != ''">and bpa.cpk_type =#{cpkType} </if>
and bp.del_flag = '0'
</where>
order by bp.product_code asc
@ -217,7 +220,7 @@
bpa.pvc,
bpa.support_plate,
bpa.other,bpa.warehouse_cycle,bpa.pallet_num palletNum,
bpa.pack_type
bpa.pack_type,bpa.cpk_type
from base_product bp
left join base_product_attached bpa on bpa.product_code = right(bp.product_code,11)
where product_id = #{productId}

Loading…
Cancel
Save