问题修复

master
zhaoxiaolin 8 months ago
parent 991307491a
commit bed8f9a353

@ -750,7 +750,7 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService {
return 0; return 0;
} }
int reportNum = mesReportWorkMapper.deleteReport(reportCode); int reportNum = mesReportWorkMapper.deleteReport(reportCode);
int consumeNum = mesReportWorkMapper.deleteReportConsume(reportCode); //int consumeNum = mesReportWorkMapper.deleteReportConsume(reportCode);
return reportNum; return reportNum;
} }

@ -67,18 +67,18 @@ public class QcCheckReportInventoryController extends BaseController {
* *
*/ */
@RequiresPermissions("quality:inventoryReport:export") @RequiresPermissions("quality:inventoryReport:export")
@Log(title = "来料检验", businessType = BusinessType.EXPORT) @Log(title = "库存检验报告明细", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, QcCheckReportIncome qcCheckReportIncome) { public void export(HttpServletResponse response, QcCheckReportIncome qcCheckReportIncome) {
//默认时间范围T 00:00:00~T+1 00:00:00 //默认时间范围T 00:00:00~T+1 00:00:00
if (StringUtils.isEmpty(qcCheckReportIncome.getIncomeTimeStart())) { if (StringUtils.isEmpty(qcCheckReportIncome.getCheckTimeStart())) {
qcCheckReportIncome.setIncomeTimeStart(DateUtils.getDate() + " 00:00:00");//start qcCheckReportIncome.setCheckTimeStart(DateUtils.getDate() + " 00:00:00");//start
LocalDate date = LocalDate.now(); LocalDate date = LocalDate.now();
LocalDate dateEnd = date.plusDays(1); LocalDate dateEnd = date.plusDays(1);
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd"); DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
String dateEndStr = dtf.format(dateEnd) + " 00:00:00"; String dateEndStr = dtf.format(dateEnd) + " 23:59:59";
qcCheckReportIncome.setIncomeTimeEnd(dateEndStr);//end qcCheckReportIncome.setCheckTimeEnd(dateEndStr);//end
} }
// if(StringUtils.isEmpty(qcCheckReportIncome.getCheckTimeStart())){ // if(StringUtils.isEmpty(qcCheckReportIncome.getCheckTimeStart())){
@ -88,7 +88,7 @@ public class QcCheckReportInventoryController extends BaseController {
List<QcCheckReportIncome> list = qcCheckReportInventoryService.selectQcCheckReportIncomeList(qcCheckReportIncome); List<QcCheckReportIncome> list = qcCheckReportInventoryService.selectQcCheckReportIncomeList(qcCheckReportIncome);
ExcelUtil<QcCheckReportIncome> util = new ExcelUtil<QcCheckReportIncome>(QcCheckReportIncome.class); ExcelUtil<QcCheckReportIncome> util = new ExcelUtil<QcCheckReportIncome>(QcCheckReportIncome.class);
util.exportExcel(response, list, "来料检验数据"); util.exportExcel(response, list, "库存检验报告明细");
} }
/** /**

@ -59,7 +59,7 @@ public class QcCheckReportProduceController extends BaseController {
* *
*/ */
@RequiresPermissions("quality:produceReport:export") @RequiresPermissions("quality:produceReport:export")
@Log(title = "来料检验", businessType = BusinessType.EXPORT) @Log(title = "生产过程检验报告明细导出", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, QcCheckReportIncome qcCheckReportIncome) { public void export(HttpServletResponse response, QcCheckReportIncome qcCheckReportIncome) {
@ -80,7 +80,7 @@ public class QcCheckReportProduceController extends BaseController {
List<QcCheckReportIncome> list = qcCheckReportProduceService.selectQcCheckReportIncomeList(qcCheckReportIncome); List<QcCheckReportIncome> list = qcCheckReportProduceService.selectQcCheckReportIncomeList(qcCheckReportIncome);
ExcelUtil<QcCheckReportIncome> util = new ExcelUtil<QcCheckReportIncome>(QcCheckReportIncome.class); ExcelUtil<QcCheckReportIncome> util = new ExcelUtil<QcCheckReportIncome>(QcCheckReportIncome.class);
util.exportExcel(response, list, "来料检验数据"); util.exportExcel(response, list, "生产过程检验报告明细");
} }
/** /**

@ -714,6 +714,9 @@ public class QcStaticTableController extends BaseController {
//表格结构数据 //表格结构数据
ArrayList<ExcelCol> excelCols = new ArrayList<>(); ArrayList<ExcelCol> excelCols = new ArrayList<>();
excelCols.add(new ExcelCol("CPK品类", "cpkTypeName", 30)); excelCols.add(new ExcelCol("CPK品类", "cpkTypeName", 30));
excelCols.add(new ExcelCol("线体名称", "lineName", 30));
excelCols.add(new ExcelCol("检验节点", "checkTypeName", 30));
excelCols.add(new ExcelCol("检测项", "ruleName", 30));
for (int n = 0; n < title2Cols.size(); n++) { for (int n = 0; n < title2Cols.size(); n++) {
excelCols.add(new ExcelCol(title2Cols.get(n), "date" + (n+1), 20)); excelCols.add(new ExcelCol(title2Cols.get(n), "date" + (n+1), 20));
} }

@ -70,13 +70,13 @@ public class QcCheckReportIncome extends BaseEntity {
/** /**
* *
*/ */
@Excel(name = "供应商编码") @Excel(name = "供应商/车间编码")
private String supplierCode; private String supplierCode;
/** /**
* *
*/ */
@Excel(name = "供应商名称") @Excel(name = "供应商/车间名称")
private String supplierName; private String supplierName;
/** /**

@ -118,6 +118,33 @@ public class QcStaticTable extends BaseEntity {
private List<String> columns2; private List<String> columns2;
private String incomeTimeStart; private String incomeTimeStart;
private String incomeTimeEnd; private String incomeTimeEnd;
private String lineCode;
private String lineName;
private String checkTypeName;
public String getCheckTypeName() {
return checkTypeName;
}
public void setCheckTypeName(String checkTypeName) {
this.checkTypeName = checkTypeName;
}
public String getLineCode() {
return lineCode;
}
public void setLineCode(String lineCode) {
this.lineCode = lineCode;
}
public String getLineName() {
return lineName;
}
public void setLineName(String lineName) {
this.lineName = lineName;
}
public String getEquipmentName() { public String getEquipmentName() {
return equipmentName; return equipmentName;

@ -1281,11 +1281,15 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
colNameArray = this.getMonthByMonth(qcCPKInfo.getYmArrayStart(),qcCPKInfo.getYmArrayEnd()); colNameArray = this.getMonthByMonth(qcCPKInfo.getYmArrayStart(),qcCPKInfo.getYmArrayEnd());
mxMapData = qcStaticTableMapper.getDLData(qcCPKInfo); mxMapData = qcStaticTableMapper.getDLData(qcCPKInfo);
} }
// List<ProLineDTO> lines = qcStaticTableMapper.getProdLineList()
List<HashMap> mapData = new ArrayList<HashMap>(); List<HashMap> mapData = new ArrayList<HashMap>();
List<ChartDTO> echartData = new ArrayList<>(); List<ChartDTO> echartData = new ArrayList<>();
HashMap dmap = null; HashMap dmap = null;
ChartDTO edata = null; ChartDTO edata = null;
for(QcCPKInfo cpkT:cpkTypeList){ for(QcCPKInfo cpkT:cpkTypeList){
dmap = new HashMap(); dmap = new HashMap();
edata = new ChartDTO(); edata = new ChartDTO();
@ -1296,6 +1300,8 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
double USL = cpkT.getUpperDiff().doubleValue(); double USL = cpkT.getUpperDiff().doubleValue();
double LSL = cpkT.getDownDiff().doubleValue(); double LSL = cpkT.getDownDiff().doubleValue();
dmap.put("cpkTypeName",cpkT.getCpkTypeName()); dmap.put("cpkTypeName",cpkT.getCpkTypeName());
//for(ProLineDTO proLineDTO:lines){
int monthNum = 0;//有数据的月份 int monthNum = 0;//有数据的月份
BigDecimal monthSum = BigDecimal.ZERO; BigDecimal monthSum = BigDecimal.ZERO;
for(int m=0;m<colNameArray.size();m++){ for(int m=0;m<colNameArray.size();m++){
@ -1326,13 +1332,23 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
++monthNum; ++monthNum;
serisedata.add(cpkVal.doubleValue()); serisedata.add(cpkVal.doubleValue());
dmap.put("lineName",act.getLineName());
dmap.put("checkTypeName",act.getCheckTypeName());
dmap.put("ruleName",act.getRuleName());
}else{ }else{
String index = (m+1)+""; String index = (m+1)+"";
dmap.put("date"+index,"0"); dmap.put("date"+index,"0");
dmap.put("cpkAvg","0"); dmap.put("cpkAvg","0");
dmap.put("lineName","");
dmap.put("checkTypeName","");
dmap.put("ruleName","");
serisedata.add(0.0); serisedata.add(0.0);
} }
} }
edata.setData(serisedata); edata.setData(serisedata);
@ -1344,6 +1360,7 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
mapData.add(dmap); mapData.add(dmap);
echartData.add(edata); echartData.add(edata);
//}
} }
resultDto.setTableData(mapData); resultDto.setTableData(mapData);
resultDto.setEchartData(echartData); resultDto.setEchartData(echartData);

@ -78,7 +78,7 @@
<if test="checkStatus != null and checkStatus != ''">and qct.check_status = #{checkStatus}</if> <if test="checkStatus != null and checkStatus != ''">and qct.check_status = #{checkStatus}</if>
<if test="checkManCode != null and checkManCode != ''">and qct.check_man_code = #{checkManCode}</if> <if test="checkManCode != null and checkManCode != ''">and qct.check_man_code = #{checkManCode}</if>
<if test="checkManName != null and checkManName != ''">and qct.check_man_name like concat('%',#{checkManName}, '%')</if> <if test="checkManName != null and checkManName != ''">and qct.check_man_name like concat('%',#{checkManName}, '%')</if>
and qct.del_flag = '0' and pow.del_flag = '0' and qct.del_flag = '0'
<if test="checkResult != null and checkResult != ''">and qct.check_result = #{checkResult}</if> <if test="checkResult != null and checkResult != ''">and qct.check_result = #{checkResult}</if>
<if test="status != null and status != ''">and qct.status = #{status}</if> <if test="status != null and status != ''">and qct.status = #{status}</if>
<if test="delFlag != null and delFlag != ''">and qct.del_flag = #{delFlag}</if> <if test="delFlag != null and delFlag != ''">and qct.del_flag = #{delFlag}</if>
@ -88,6 +88,7 @@
<if test="checkTimeEnd != null ">and #{checkTimeEnd} > CONVERT(varchar(30),qct.check_time, 120)</if> <if test="checkTimeEnd != null ">and #{checkTimeEnd} > CONVERT(varchar(30),qct.check_time, 120)</if>
<if test="typeCode != null ">and q.type_code = #{typeCode}</if> <if test="typeCode != null ">and q.type_code = #{typeCode}</if>
<if test="checkType != null ">and qct.check_type = #{checkType}</if> <if test="checkType != null ">and qct.check_type = #{checkType}</if>
<if test='typeCode != "material" '>and pow.del_flag = '0'</if>
</where> </where>
</select> </select>

@ -357,7 +357,7 @@
qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_loc, qct.check_status, qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_loc, qct.check_status,
qct.check_time, qct.check_result, qct.check_type,'首件检验' check_name, qct.check_time, qct.check_result, qct.check_type,'首件检验' check_name,
CONVERT(varchar(10),qct.create_time, 120) createTimeStr, CONVERT(varchar(10),qct.create_time, 120) createTimeStr,
qct.confirm,qct.confirm_man_name qct.confirm,qct.confirm_man_name,qct.check_man_code ,qct.check_man_name
from qc_check_task qct from qc_check_task qct
<where> <where>
<if test="checkNo != null and checkNo != ''">and qct.check_no = #{checkNo}</if> <if test="checkNo != null and checkNo != ''">and qct.check_no = #{checkNo}</if>
@ -390,7 +390,7 @@
qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit, qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit,
qct.supplier_code, qct.supplier_name,CONVERT(varchar(10), qct.income_time, 120) income_time,'','', qct.supplier_code, qct.supplier_name,CONVERT(varchar(10), qct.income_time, 120) income_time,'','',
null,'', qct.check_type,'巡检检验' check_name,CONVERT(varchar(10),qct.create_time, 120) createTimeStr, null,'', qct.check_type,'巡检检验' check_name,CONVERT(varchar(10),qct.create_time, 120) createTimeStr,
qct.confirm,qct.confirm_man_name qct.confirm,qct.confirm_man_name,'',''
from qc_check_task qct from qc_check_task qct
<where> <where>
<if test="checkNo != null and checkNo != ''">and qct.check_no = #{checkNo}</if> <if test="checkNo != null and checkNo != ''">and qct.check_no = #{checkNo}</if>

@ -467,7 +467,7 @@
<select id="getDLData" resultType="com.op.quality.domain.QcStaticTable"> <select id="getDLData" resultType="com.op.quality.domain.QcStaticTable">
SELECT SELECT
concat(q.cpkType,'-',q.ymdms) yearMonth, concat(q.cpkType,'-',q.ymdms) yearMonth,
ymdms,rule_name ruleName, ymdms,rule_name ruleName,q.lineName,q.checkTypeName,
project_no projectNo, project_no projectNo,
STUFF( STUFF(
(SELECT ',' + t.actual_value (SELECT ',' + t.actual_value
@ -492,17 +492,20 @@
select select
bpa.cpk_type cpkType, bpa.cpk_type cpkType,
CONVERT(varchar(7),qct.income_time, 120) ymdms, CONVERT(varchar(7),qct.income_time, 120) ymdms,
qctd.rule_name,qctd.project_no,qctd.actual_value qctd.rule_name,qctd.project_no,qctd.actual_value,
be.equipment_name lineName,qt.check_name checkTypeName
from qc_check_task qct from qc_check_task qct
left join qc_check_task_detail qctd on qct.record_id = qctd.belong_to left join qc_check_task_detail qctd on qct.record_id = qctd.belong_to
left join base_product_attached bpa on concat('0000000',bpa.product_code) = qct.material_code left join base_product_attached bpa on concat('0000000',bpa.product_code) = qct.material_code
left join base_equipment be on be.equipment_type_code = 'equ_type_bzx' and be.del_flag = '0'
left join qc_check_type qt on qt.order_code = qct.check_type
where qct.check_type = #{checkType} and qctd.property_code = '1' and qct.check_time is not null where qct.check_type = #{checkType} and qctd.property_code = '1' and qct.check_time is not null
<if test="ymArrayStart != null ">and CONVERT(varchar(7),qct.income_time, 120) >= #{ymArrayStart}</if> <if test="ymArrayStart != null ">and CONVERT(varchar(7),qct.income_time, 120) >= #{ymArrayStart}</if>
<if test="ymArrayEnd != null ">and #{ymArrayEnd}>=CONVERT(varchar(7),qct.income_time,120) </if> <if test="ymArrayEnd != null ">and #{ymArrayEnd}>=CONVERT(varchar(7),qct.income_time,120) </if>
<if test="checkLoc != null ">and qct.check_loc = #{checkLoc}</if> <if test="checkLoc != null ">and qct.check_loc = #{checkLoc}</if>
and qctd.project_id = #{projectId} and bpa.cpk_type = #{cpkType} and qctd.project_id = #{projectId} and bpa.cpk_type = #{cpkType}
) q ) q
GROUP BY q.cpkType, q.ymdms,q.rule_name,q.project_no GROUP BY q.cpkType, q.ymdms,q.rule_name,q.project_no,q.lineName,q.checkTypeName
</select> </select>
@ -947,7 +950,7 @@
<select id="getDLDataDay" resultType="com.op.quality.domain.QcStaticTable"> <select id="getDLDataDay" resultType="com.op.quality.domain.QcStaticTable">
SELECT SELECT
concat(q.cpkType,'-',q.ymdms) yearMonth, concat(q.cpkType,'-',q.ymdms) yearMonth,
ymdms,rule_name ruleName, ymdms,rule_name ruleName,q.lineName,q.checkTypeName,
project_no projectNo, project_no projectNo,
STUFF( STUFF(
(SELECT ',' + t.actual_value (SELECT ',' + t.actual_value
@ -972,17 +975,20 @@
select select
bpa.cpk_type cpkType, bpa.cpk_type cpkType,
CONVERT(varchar(10),qct.income_time, 120) ymdms, CONVERT(varchar(10),qct.income_time, 120) ymdms,
qctd.rule_name,qctd.project_no,qctd.actual_value qctd.rule_name,qctd.project_no,qctd.actual_value,
be.equipment_name lineName,qt.check_name checkTypeName
from qc_check_task qct from qc_check_task qct
left join qc_check_task_detail qctd on qct.record_id = qctd.belong_to left join qc_check_task_detail qctd on qct.record_id = qctd.belong_to
left join base_product_attached bpa on concat('0000000',bpa.product_code) = qct.material_code left join base_product_attached bpa on concat('0000000',bpa.product_code) = qct.material_code
left join base_equipment be on be.equipment_type_code = 'equ_type_bzx' and be.del_flag = '0'
left join qc_check_type qt on qt.order_code = qct.check_type
where qct.check_type = #{checkType} and qctd.property_code = '1' and qct.check_time is not null where qct.check_type = #{checkType} and qctd.property_code = '1' and qct.check_time is not null
<if test="ymArrayStart != null ">and CONVERT(varchar(10),qct.income_time, 120) >= #{ymArrayStart}</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> <if test="ymArrayEnd != null ">and #{ymArrayEnd}>=CONVERT(varchar(10),qct.income_time,120) </if>
<if test="checkLoc != null ">and qct.check_loc = #{checkLoc}</if> <if test="checkLoc != null ">and qct.check_loc = #{checkLoc}</if>
and qctd.project_id = #{projectId} and bpa.cpk_type = #{cpkType} and qctd.project_id = #{projectId} and bpa.cpk_type = #{cpkType}
) q ) q
GROUP BY q.cpkType, q.ymdms,q.rule_name,q.project_no GROUP BY q.cpkType, q.ymdms,q.rule_name,q.project_no,q.lineName,q.checkTypeName
</select> </select>
<select id="getXJCheckTableDetailList" resultType="com.op.quality.domain.CheckTypeXJDetail"> <select id="getXJCheckTableDetailList" resultType="com.op.quality.domain.CheckTypeXJDetail">
select select

Loading…
Cancel
Save