Merge remote-tracking branch 'origin/master'

master
mengjiao 8 months ago
commit 761e5b97aa

@ -79,8 +79,8 @@ public class H5ApiServiceImpl implements H5ApiService {
Collectors.collectingAndThen(
Collectors.toList(),
list -> {
double averageActualEmployment = list.stream()
.collect(Collectors.averagingDouble(H5::getActualEmployment));
double averageActualEmployment =Math.round(list.stream()
.collect(Collectors.averagingDouble(H5::getActualEmployment)));
H5 resultH5 = new H5();
resultH5.setWorkOrderCode(list.get(0).getWorkOrderCode()); // 设置 workOrderCode
resultH5.setActualEmployment(averageActualEmployment);

@ -436,6 +436,7 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
}else if(workOrders.size()>=3){
BigDecimal gamng = null;
BigDecimal bottomQua = BigDecimal.ZERO;
for(int n=0;n<workOrders.size();n++){
MesReportWork workOrder = workOrders.get(n);
mesReportWork.setUploadStatus("1");//除了1报工成功的都需要报工
@ -444,6 +445,10 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
mesReportWork.setMachineCode(mesReportWork.getMachineCode());
MesReportWork sHzWorks = mesReportWorkMapper.getReportWorkHz(mesReportWork);
if(n == 0){
bottomQua = sHzWorks.getQuantityFeedback();
}
if(sHzWorks==null){//再去查预报工的一条数带出基本数据其它全部赋值0
sHzWorks = mesReportWorkMapper.getReportWorkHzAttr1(mesReportWork);
}
@ -459,6 +464,16 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
}
//三层以上工单报工
logger.info("==========================三层(第"+n+"层)以上工单("+sHzWorks.getWorkorderCodeSap()+")报工开始");
if(n > 1){
//查询base_product的report_rate//箱子-大盒-小盒
BigDecimal reportRate = mesReportWorkMapper.getReportRate(workOrders.get(n).getProductCode());
if(reportRate != null){
BigDecimal newQuantity = bottomQua.divide(reportRate,2, RoundingMode.HALF_UP);
sHzWorks.setQuantityFeedback(newQuantity);
}else{
sHzWorks.setQuantityFeedback(sHzWorks.getQuantityFeedback());
}
}
sHzWorks.setMachineCode(mesReportWork.getMachineCode());
sapRson = this.reportHzToSap3(sHzWorks);
logger.info("==========================三层(第"+n+"层)以上工单("+sHzWorks.getWorkorderCodeSap()+")报工结束:"
@ -668,6 +683,7 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
SapRFW sapRFW = new SapRFW();
sapRFW.setAufnr(workOrder.getWorkorderCodeSap());//虚拟工单号
sapRFW.setGamng(workOrder.getQuantityFeedback().toString());//报工数量
SapRFW.lt_gs ltgs = new SapRFW.lt_gs();//生产订单报工工时修改
ltgs.setConf_activity1(workOrder.getSac1());//机器
ltgs.setConf_activity2(workOrder.getSac2());//人工

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

@ -199,7 +199,7 @@
WHERE
be.equipment_type_code = 'equ_type_hf'
AND del_flag = '0'
) AS SourceTable PIVOT ( MAX ( isvalue ) FOR property IN ( [dollyNumber], [Intheoven], [temperature] ) ) AS PivotTable LEFT JOIN base_equipment_attached T2 ON PivotTable.equipment_code=T2.device_code WHERE T2.property='dollyNumber'
) AS SourceTable PIVOT ( MAX ( isvalue ) FOR property IN ( [dollyNumber], [Intheoven], [temperature],,[humidity] ) ) AS PivotTable LEFT JOIN base_equipment_attached T2 ON PivotTable.equipment_code=T2.device_code WHERE T2.property='dollyNumber'
ORDER BY i asc
</select>

@ -1496,8 +1496,8 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
for(ProOrderWorkorder data:workorderList){
mapData = new HashMap();
mapData.put("xh", xh);
mapData.put("orderCode",data.getOrderCode().substring(4));
mapData.put("workorderSap", data.getWorkorderCodeSap().substring(4));
mapData.put("orderCode",data.getOrderCode().substring(3));
mapData.put("workorderSap", data.getWorkorderCodeSap().substring(3));
mapData.put("materialCode", data.getProductCode().substring(7));
mapData.put("materialDesc", data.getProductName());
mapData.put("quality", data.getQuantitySplit());
@ -1754,11 +1754,7 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
}
public static void main(String args[]) {
List<String> wcodes = new ArrayList<>();
wcodes.add("aaa");
wcodes.add("bbb");
wcodes.add("ccc");
Collections.reverse(wcodes);
System.out.println(StringUtils.join(wcodes, ","));
String s = "000800003044";
System.out.println(s.substring(3));
}
}

@ -900,7 +900,7 @@
<select id="getBatchList" resultType="java.lang.String">
select batch_code
from pro_order_workorder_batch powb
where powb.del_flag = '0' and workorder_id = '127e2fd8c21d492297f3316a3879a43b'
where powb.del_flag = '0' and workorder_id = #{workorderId}
order by batch_code
</select>

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

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

@ -1,6 +1,8 @@
package com.op.quality.controller;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.bean.BeanUtils;
import com.op.common.core.utils.poi.ExcelUtil;
import com.op.common.core.web.controller.BaseController;
import com.op.common.core.web.domain.AjaxResult;
@ -9,10 +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.common.security.utils.SecurityUtils;
import com.op.quality.domain.QcBomComponent;
import com.op.quality.domain.QcCheckReportIncome;
import com.op.quality.domain.QcCheckTaskDetail;
import com.op.quality.domain.QcSupplier;
import com.op.quality.domain.*;
import com.op.quality.service.IQcCheckReportProductService;
import com.op.system.api.domain.SysUser;
import org.apache.commons.lang.StringUtils;
@ -22,6 +21,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
/**
@ -67,7 +67,7 @@ public class QcCheckReportProductController extends BaseController {
*
*/
@RequiresPermissions("quality:productReport:export")
@Log(title = "来料检验", businessType = BusinessType.EXPORT)
@Log(title = "成品检验报告明细数据", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, QcCheckReportIncome qcCheckReportIncome) {
@ -86,9 +86,15 @@ public class QcCheckReportProductController extends BaseController {
// qcCheckReportIncome.setCheckTimeEnd(qcCheckReportIncome.getIncomeTimeStart());//end
// }
List<QcCheckReportIncome> list = qcCheckReportProductService.selectQcCheckReportIncomeList(qcCheckReportIncome);
ExcelUtil<QcCheckReportIncome> util = new ExcelUtil<QcCheckReportIncome>(QcCheckReportIncome.class);
util.exportExcel(response, list, "来料检验数据");
List<QcCheckReportIncome> list0 = qcCheckReportProductService.selectQcCheckReportIncomeList(qcCheckReportIncome);
List<ProductReportDTO> list = new ArrayList<>();
for(QcCheckReportIncome idto:list0){
ProductReportDTO pdto = new ProductReportDTO();
BeanUtils.copyProperties(idto,pdto);
list.add(pdto);
}
ExcelUtil<ProductReportDTO> util = new ExcelUtil<ProductReportDTO>(ProductReportDTO.class);
util.exportExcel(response, list, "成品检验报告明细数据");
}
/**

@ -7,6 +7,7 @@ import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
@ -597,6 +598,89 @@ public class QcStaticTableController extends BaseController {
public List<HashMap> getTableHzDataSC(@RequestBody QcStaticTable qcStaticTable) {
return qcStaticTableService.getTableHzDataSC(qcStaticTable);
}
@Log(title = "首检分析报表统计", businessType = BusinessType.EXPORT)
@PostMapping("/exportSCTable")
public void exportSCTable(HttpServletResponse response, QcStaticTable qcStaticTable) {
QcStaticTable titledto = qcStaticTableService.getTableHzTitle(qcStaticTable);
List<HashMap> list0 = qcStaticTableService.getTableHzDataSC(qcStaticTable);
List<HashMap> list = list0.stream()
.filter(hmap -> !hmap.get("sampleQuality").equals("0"))
.collect(Collectors.toList());
List<String> title2Cols = titledto.getColumns1();
//String titleRow1 = String.join(",", title2Cols);
String titleRow1 = "首检分析报表";
//表格结构数据
ArrayList<ExcelCol> excelCols = new ArrayList<>();
excelCols.add(new ExcelCol("时间", "timeCol", 15));
excelCols.add(new ExcelCol("抽检数", "sampleQuality", 10));
for (int n = 0; n < title2Cols.size(); n++) {
excelCols.add(new ExcelCol(title2Cols.get(n), "col" + (n), 15));
}
excelCols.add(new ExcelCol("不良数", "noOkQua", 10));
excelCols.add(new ExcelCol("不良率(%)", "noOkRate", 10));
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();
}
}
}
@Log(title = "来料分析报表统计", businessType = BusinessType.EXPORT)
@PostMapping("/exportIncomeTable")
public void exportIncomeTable(HttpServletResponse response, QcStaticTable qcStaticTable) {
QcStaticTable titledto = qcStaticTableService.getTableHzTitle(qcStaticTable);
List<HashMap> list = qcStaticTableService.getTableHzDataSC(qcStaticTable);
List<String> title2Cols = titledto.getColumns1();
//String titleRow1 = String.join(",", title2Cols);
String titleRow1 = "巡检分析报表";
//表格结构数据
ArrayList<ExcelCol> excelCols = new ArrayList<>();
excelCols.add(new ExcelCol("时间", "timeCol", 15));
excelCols.add(new ExcelCol("抽检批次", "sampleQuality", 10));
for (int n = 0; n < title2Cols.size(); n++) {
excelCols.add(new ExcelCol(title2Cols.get(n), "col" + (n), 15));
}
excelCols.add(new ExcelCol("不良数", "noOkQua", 10));
excelCols.add(new ExcelCol("不良率(%)", "noOkRate", 10));
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();
}
}
}
@PostMapping("/getTableHzNoOkDataSC")
public List<QcStaticTable> getTableHzNoOkDataSC(@RequestBody QcStaticTable qcStaticTable) {
return qcStaticTableService.getTableHzNoOkDataSC(qcStaticTable);
@ -619,6 +703,46 @@ public class QcStaticTableController extends BaseController {
util.exportExcel(response, list, "巡检检验结果明细");
}
@Log(title = "巡检检验结果统计", businessType = BusinessType.EXPORT)
@PostMapping("/exportXJTable")
public void exportXJTable(HttpServletResponse response, QcStaticTable qcStaticTable) {
QcStaticTable titledto = qcStaticTableService.getTableHzTitle(qcStaticTable);
List<HashMap> list = qcStaticTableService.getTableHzData(qcStaticTable);
List<String> title2Cols = titledto.getColumns1();
//String titleRow1 = String.join(",", title2Cols);
String titleRow1 = "巡检分析报表";
//表格结构数据
ArrayList<ExcelCol> excelCols = new ArrayList<>();
excelCols.add(new ExcelCol("时间", "timeCol", 15));
excelCols.add(new ExcelCol("抽样数", "sampleQuality", 10));
for (int n = 0; n < title2Cols.size(); n++) {
excelCols.add(new ExcelCol(title2Cols.get(n), "col" + (n), 15));
}
excelCols.add(new ExcelCol("不良数", "noOkQua", 10));
excelCols.add(new ExcelCol("不良率(%)", "noOkRate", 10));
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();
}
}
}
/**
* ----
**/
@ -714,6 +838,9 @@ public class QcStaticTableController extends BaseController {
//表格结构数据
ArrayList<ExcelCol> excelCols = new ArrayList<>();
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++) {
excelCols.add(new ExcelCol(title2Cols.get(n), "date" + (n+1), 20));
}

@ -0,0 +1,340 @@
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 org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
*
* @author Open Platform
* @date 2023-10-19
*/
public class ProductReportDTO extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
@Excel(name = "检验任务编号")
private String checkNo;
/**
*
*/
@Excel(name = "来料批次号")
private String incomeBatchNo;
/**
*
*/
@Excel(name = "工单号")
private String orderNo;
@Excel(name = "订单号")
private String workorderCodeSap;
/**
*
*/
@Excel(name = "物料号")
private String materialCode;
/**
*
*/
@Excel(name = "物料名称")
private String materialName;
/**
*
*/
@Excel(name = "收货数量")
private BigDecimal quality;
/**
*
*/
@Excel(name = "单位")
private String unit;
/**
*
*/
@Excel(name = "供应商/车间编码")
private String supplierCode;
/**
*
*/
@Excel(name = "供应商/车间名称")
private String supplierName;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "任务时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date incomeTime;
/**
*
*/
@Excel(name = "检测地点")
private String checkLoc;
/**
*
*/
@Excel(name = "检测状态")
private String checkStatus;
/**
*
*/
@Excel(name = "检测人工号")
private String checkManCode;
/**
*
*/
@Excel(name = "检测人姓名")
private String checkManName;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "检验时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date checkTime;
/**
* Y
*/
@Excel(name = "检验结果Y合格")
private String checkResult;
/**
* 10
*/
@Excel(name = "是否启用1启用0停用")
private String status;
/**
*
*/
@Excel(name = "工厂编码")
private String factoryCode;
/**
* 10
*/
private String delFlag;
@Excel(name = "抽样数量ST")
private BigDecimal sampleQuality;
public String getWorkorderCodeSap() {
return workorderCodeSap;
}
public void setWorkorderCodeSap(String workorderCodeSap) {
this.workorderCodeSap = workorderCodeSap;
}
public BigDecimal getSampleQuality() {
return sampleQuality;
}
public void setSampleQuality(BigDecimal sampleQuality) {
this.sampleQuality = sampleQuality;
}
public void setCheckNo(String checkNo) {
this.checkNo = checkNo;
}
public String getCheckNo() {
return checkNo;
}
public void setIncomeBatchNo(String incomeBatchNo) {
this.incomeBatchNo = incomeBatchNo;
}
public String getIncomeBatchNo() {
return incomeBatchNo;
}
public void setOrderNo(String orderNo) {
this.orderNo = orderNo;
}
public String getOrderNo() {
return orderNo;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
public String getMaterialCode() {
return materialCode;
}
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
public String getMaterialName() {
return materialName;
}
public void setQuality(BigDecimal quality) {
this.quality = quality;
}
public BigDecimal getQuality() {
return quality;
}
public void setUnit(String unit) {
this.unit = unit;
}
public String getUnit() {
return unit;
}
public void setSupplierCode(String supplierCode) {
this.supplierCode = supplierCode;
}
public String getSupplierCode() {
return supplierCode;
}
public void setSupplierName(String supplierName) {
this.supplierName = supplierName;
}
public String getSupplierName() {
return supplierName;
}
public void setIncomeTime(Date incomeTime) {
this.incomeTime = incomeTime;
}
public Date getIncomeTime() {
return incomeTime;
}
public void setCheckLoc(String checkLoc) {
this.checkLoc = checkLoc;
}
public String getCheckLoc() {
return checkLoc;
}
public void setCheckStatus(String checkStatus) {
this.checkStatus = checkStatus;
}
public String getCheckStatus() {
return checkStatus;
}
public void setCheckManCode(String checkManCode) {
this.checkManCode = checkManCode;
}
public String getCheckManCode() {
return checkManCode;
}
public void setCheckManName(String checkManName) {
this.checkManName = checkManName;
}
public String getCheckManName() {
return checkManName;
}
public void setCheckTime(Date checkTime) {
this.checkTime = checkTime;
}
public Date getCheckTime() {
return checkTime;
}
public void setCheckResult(String checkResult) {
this.checkResult = checkResult;
}
public String getCheckResult() {
return checkResult;
}
public void setStatus(String status) {
this.status = status;
}
public String getStatus() {
return status;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryCode() {
return factoryCode;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getDelFlag() {
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("checkNo", getCheckNo())
.append("incomeBatchNo", getIncomeBatchNo())
.append("orderNo", getOrderNo())
.append("materialCode", getMaterialCode())
.append("materialName", getMaterialName())
.append("quality", getQuality())
.append("unit", getUnit())
.append("supplierCode", getSupplierCode())
.append("supplierName", getSupplierName())
.append("incomeTime", getIncomeTime())
.append("checkLoc", getCheckLoc())
.append("checkStatus", getCheckStatus())
.append("checkManCode", getCheckManCode())
.append("checkManName", getCheckManName())
.append("checkTime", getCheckTime())
.append("checkResult", getCheckResult())
.append("status", getStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("factoryCode", getFactoryCode())
.append("delFlag", getDelFlag())
.toString();
}
}

@ -29,13 +29,13 @@ public class QcCheckReportIncome extends BaseEntity {
*/
@Excel(name = "检验任务编号")
private String checkNo;
private String modelType;
/**
*
*/
@Excel(name = "来料批次号")
private String incomeBatchNo;
private int xh;
/**
*
*/
@ -70,13 +70,13 @@ public class QcCheckReportIncome extends BaseEntity {
/**
*
*/
@Excel(name = "供应商编码")
@Excel(name = "供应商/车间编码")
private String supplierCode;
/**
*
*/
@Excel(name = "供应商名称")
@Excel(name = "供应商/车间名称")
private String supplierName;
/**
@ -194,6 +194,22 @@ public class QcCheckReportIncome extends BaseEntity {
private String cxzz;
private String pgy;
public String getModelType() {
return modelType;
}
public void setModelType(String modelType) {
this.modelType = modelType;
}
public int getXh() {
return xh;
}
public void setXh(int xh) {
this.xh = xh;
}
public String getWorkorderCodeSap() {
return workorderCodeSap;
}

@ -118,6 +118,33 @@ public class QcStaticTable extends BaseEntity {
private List<String> columns2;
private String incomeTimeStart;
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() {
return equipmentName;

@ -89,4 +89,7 @@ public interface QcCheckReportIncomeMapper {
QcCheckTaskProduce getLastXJ(QcCheckTaskProduce qcCheckTaskProduce);
String getStandardNo(QcCheckReportIncome dto);
public List<QcCheckReportIncome> getPrintXJList(QcCheckReportIncome qcCheckReportIncome);
}

@ -73,6 +73,5 @@ public interface IQcCheckReportInventoryService {
List<QcCheckTaskDetail> getCkeckProjectList(QcCheckTaskDetail qcCheckTaskDetail);
public List<QcCheckReportIncome> getPrintData(QcCheckReportIncome qcCheckReportIncome);
List<QcCheckReportIncome> printXJRecordList(QcCheckReportIncome qcCheckReportIncome);
}

@ -6,10 +6,7 @@ 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.quality.domain.*;
import com.op.quality.mapper.QcCheckReportIncomeMapper;
import com.op.quality.mapper.QcCheckTaskDetailMapper;
import com.op.quality.mapper.QcCheckTypeProjectMapper;
import com.op.quality.mapper.QcMaterialGroupDetailMapper;
import com.op.quality.mapper.*;
import com.op.quality.service.IQcCheckReportIncomeService;
import com.op.quality.service.IQcCheckReportInventoryService;
import com.op.system.api.domain.SysUser;
@ -20,6 +17,8 @@ import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@ -42,7 +41,8 @@ public class QcCheckReportInventoryServiceImpl implements IQcCheckReportInventor
@Autowired
private QcCheckTaskDetailMapper qcCheckTaskDetailMapper;
@Autowired
private QcStaticTableMapper qcStaticTableMapper;
/**
*
*
@ -206,8 +206,51 @@ public class QcCheckReportInventoryServiceImpl implements IQcCheckReportInventor
@Override
@DS("#header.poolName")
public List<QcCheckReportIncome> getPrintData(QcCheckReportIncome qcCheckReportIncome) {
return null;
public List<QcCheckReportIncome> printXJRecordList(QcCheckReportIncome qcCheckReportIncome) {
qcCheckReportIncome.setDelFlag("0");
qcCheckReportIncome.setTypeCode("inventory");
List<QcCheckReportIncome> dtos = qcCheckReportIncomeMapper.getPrintXJList(qcCheckReportIncome);
if(!CollectionUtils.isEmpty(dtos)){
//查找受控文件--fileNo
qcCheckReportIncome.setCheckType("checkTypeCC");
try {
String dateFormatPattern = "yyyy-MM-dd HH:mm:ss";
SimpleDateFormat dateFormat = new SimpleDateFormat(dateFormatPattern);
Date date = dateFormat.parse(qcCheckReportIncome.getCheckTimeStart());
qcCheckReportIncome.setIncomeTime(date);
} catch (ParseException e) {
System.err.println("日期格式不正确: " + e.getMessage());
}
String fileNo = qcCheckReportIncomeMapper.getStandardNo(qcCheckReportIncome);
if(com.op.common.core.utils.StringUtils.isNotBlank(fileNo)){
dtos.get(0).setFileNo(fileNo);
}
}
int n = 1;
String checkManName = "";
for(QcCheckReportIncome dto:dtos){
dto.setXh(n++);
List<String> batchnos = qcStaticTableMapper.getBatchnos(dto.getOrderNo());
String ordernoStr = "";
for (String batchno : batchnos) {
ordernoStr += batchno + ";";
};
dto.setIncomeBatchNo(ordernoStr);
if(dto.getCheckResult().equals("Y")){
dto.setCheckResult("无质量问题");
}else{
dto.setRemark(dto.getRemark()+";"+dto.getAttr3());
}
checkManName+=dto.getCheckManName()+";";
dto.setCheckManName(checkManName);
}
return dtos;
}
}

@ -64,6 +64,7 @@ public class QcCheckReportProduceServiceImpl implements IQcCheckReportProduceSer
if(com.op.common.core.utils.StringUtils.isNotBlank(fileNo)){
dto.setFileNo(fileNo);
}
dto.setMaterialCode(dto.getMaterialCode().substring(7));
return dto;
}

@ -5,10 +5,7 @@ import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.uuid.IdUtils;
import com.op.common.security.utils.SecurityUtils;
import com.op.quality.domain.*;
import com.op.quality.mapper.QcCheckReportIncomeMapper;
import com.op.quality.mapper.QcCheckTaskDetailMapper;
import com.op.quality.mapper.QcCheckTypeProjectMapper;
import com.op.quality.mapper.QcMaterialGroupDetailMapper;
import com.op.quality.mapper.*;
import com.op.quality.service.IQcCheckReportProductService;
import com.op.system.api.domain.SysUser;
import org.apache.commons.lang.StringUtils;
@ -41,7 +38,8 @@ public class QcCheckReportProductServiceImpl implements IQcCheckReportProductSer
@Autowired
private QcCheckTaskDetailMapper qcCheckTaskDetailMapper;
@Autowired
private QcStaticTableMapper qcStaticTableMapper;
/**
*
*
@ -75,7 +73,17 @@ public class QcCheckReportProductServiceImpl implements IQcCheckReportProductSer
qcCheckReportIncome.setDelFlag("0");
qcCheckReportIncome.setTypeCode("product");
qcCheckReportIncome.setCheckType("checkTypeCP");
return qcCheckReportIncomeMapper.selectQcCheckReportIncomeList(qcCheckReportIncome);
List<QcCheckReportIncome> dtos = qcCheckReportIncomeMapper.selectQcCheckReportIncomeList(qcCheckReportIncome);
for(QcCheckReportIncome dto:dtos){
List<String> batchnos = qcStaticTableMapper.getBatchnos(dto.getOrderNo());
String ordernoStr = "";
for (String batchno : batchnos) {
ordernoStr += batchno + ";";
}
;
dto.setIncomeBatchNo(ordernoStr);
}
return dtos;
}
/**

@ -731,6 +731,7 @@ public class QcCheckTaskIncomeServiceImpl<QcCheckUnqualifiedService> implements
sampleQuality = sampleQuality.add(new BigDecimal(detail.getSampleQuality()==null?"0":detail.getSampleQuality()));
//上传附件
if (StringUtils.isNotEmpty(detail.getFileListStr())) {
qmsFileMapper.clearBaseFileBatch(detail.getRecordId());//清理
String[] ids = detail.getFileListStr().split(",");
List<BaseFileData> files = new ArrayList<>();
BaseFileData file = null;

@ -95,6 +95,9 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService
@Autowired
private RemoteOpenService remoteOpenService;
@Autowired
private QcStaticTableMapper qcStaticTableMapper;
private static Pattern p2= Pattern.compile("<[^>]+>");
/**
@ -135,7 +138,17 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService
public List<QcCheckTaskProduce> selectQcCheckTaskProduceList(QcCheckTaskProduce qcCheckTaskProduce) {
qcCheckTaskProduce.setDelFlag("0");
qcCheckTaskProduce.setTypeCode("produce");
return qcCheckTaskProduceMapper.selectQcCheckTaskProduceList(qcCheckTaskProduce);
List<QcCheckTaskProduce> dtos = qcCheckTaskProduceMapper.selectQcCheckTaskProduceList(qcCheckTaskProduce);
for(QcCheckTaskProduce dto:dtos){
List<String> batchnos = qcStaticTableMapper.getBatchnos(dto.getOrderNo());
String ordernoStr = "";
for (String batchno : batchnos) {
ordernoStr += batchno + ";";
}
;
dto.setIncomeBatchNo(ordernoStr);
}
return dtos;
}
/**

@ -1056,8 +1056,10 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
colMap.put("sampleQuality",sampl.getSampleQuality().replaceAll("\\..*", ""));
BigDecimal noOkRate = new BigDecimal(noOkNumR.getNoOkQuality()).multiply(new BigDecimal("100.00"))
.divide(new BigDecimal(sampl.getSampleQuality()),2, BigDecimal.ROUND_HALF_UP);
colMap.put("noOkQua",noOkNumR.getNoOkQuality());
colMap.put("noOkRate",noOkRate);
}else{
colMap.put("noOkQua","0");
colMap.put("sampleQuality","0");
colMap.put("noOkRate","0");
}
@ -1281,11 +1283,15 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
colNameArray = this.getMonthByMonth(qcCPKInfo.getYmArrayStart(),qcCPKInfo.getYmArrayEnd());
mxMapData = qcStaticTableMapper.getDLData(qcCPKInfo);
}
// List<ProLineDTO> lines = qcStaticTableMapper.getProdLineList()
List<HashMap> mapData = new ArrayList<HashMap>();
List<ChartDTO> echartData = new ArrayList<>();
HashMap dmap = null;
ChartDTO edata = null;
for(QcCPKInfo cpkT:cpkTypeList){
dmap = new HashMap();
edata = new ChartDTO();
@ -1296,54 +1302,67 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
double USL = cpkT.getUpperDiff().doubleValue();
double LSL = cpkT.getDownDiff().doubleValue();
dmap.put("cpkTypeName",cpkT.getCpkTypeName());
int monthNum = 0;//有数据的月份
BigDecimal monthSum = BigDecimal.ZERO;
for(int m=0;m<colNameArray.size();m++){
String key = cpkT.getCpkType() + "-" + colNameArray.get(m);
QcStaticTable act = mxMapData.get(key);
if(act!=null){
String actArrayStr = act.getQuality().replace("[", "")
.replace("]", "")
.replace("\"", "");
List<String> actArray0 = Arrays.asList(actArrayStr.split(","));
List<String> actArray = new ArrayList<>();
for(String avg:actArray0){
if(avg.matches(".*\\..*\\..*")){
actArray.add(avg.substring(2));
}else{
actArray.add(avg);
//for(ProLineDTO proLineDTO:lines){
int monthNum = 0;//有数据的月份
BigDecimal monthSum = BigDecimal.ZERO;
for(int m=0;m<colNameArray.size();m++){
String key = cpkT.getCpkType() + "-" + colNameArray.get(m);
QcStaticTable act = mxMapData.get(key);
if(act!=null){
String actArrayStr = act.getQuality().replace("[", "")
.replace("]", "")
.replace("\"", "");
List<String> actArray0 = Arrays.asList(actArrayStr.split(","));
List<String> actArray = new ArrayList<>();
for(String avg:actArray0){
if(avg.matches(".*\\..*\\..*")){
actArray.add(avg.substring(2));
}else{
actArray.add(avg);
}
}
double[] data = actArray.stream()
.mapToDouble(Double::parseDouble) // 将String转换为double
.toArray(); // 转换为double数组 ;
double cpk = calculateCpk(data,USL,LSL);
BigDecimal cpkVal = new BigDecimal(Double.toString(cpk)).setScale(2, BigDecimal.ROUND_HALF_UP);
String index = (m+1)+"";
dmap.put("date"+index,cpkVal);
monthSum = monthSum.add(cpkVal);
++monthNum;
serisedata.add(cpkVal.doubleValue());
dmap.put("lineName",act.getLineName());
dmap.put("checkTypeName",act.getCheckTypeName());
dmap.put("ruleName",act.getRuleName());
}else{
String index = (m+1)+"";
dmap.put("date"+index,"0");
dmap.put("cpkAvg","0");
dmap.put("lineName","");
dmap.put("checkTypeName","");
dmap.put("ruleName","");
serisedata.add(0.0);
}
double[] data = actArray.stream()
.mapToDouble(Double::parseDouble) // 将String转换为double
.toArray(); // 转换为double数组 ;
double cpk = calculateCpk(data,USL,LSL);
BigDecimal cpkVal = new BigDecimal(Double.toString(cpk)).setScale(2, BigDecimal.ROUND_HALF_UP);
String index = (m+1)+"";
dmap.put("date"+index,cpkVal);
monthSum = monthSum.add(cpkVal);
++monthNum;
serisedata.add(cpkVal.doubleValue());
}else{
String index = (m+1)+"";
dmap.put("date"+index,"0");
dmap.put("cpkAvg","0");
serisedata.add(0.0);
}
}
edata.setData(serisedata);
edata.setData(serisedata);
if(monthNum>0){
BigDecimal avgBD = monthSum.divide(new BigDecimal(monthNum),2,RoundingMode.HALF_UP);
dmap.put("cpkAvg",avgBD.toString());
}
if(monthNum>0){
BigDecimal avgBD = monthSum.divide(new BigDecimal(monthNum),2,RoundingMode.HALF_UP);
dmap.put("cpkAvg",avgBD.toString());
}
mapData.add(dmap);
echartData.add(edata);
mapData.add(dmap);
echartData.add(edata);
//}
}
resultDto.setTableData(mapData);
resultDto.setEchartData(echartData);

@ -44,7 +44,8 @@
<result property="pgy" column="pgy"/>
<result property="cxzz" column="cxzz"/>
<result property="workorderCodeSap" column="workorder_code_sap"/>
<result property="modelType" column="modelType"/>
<result property="remark" column="remark"/>
</resultMap>
<sql id="selectQcCheckReportIncomeVo">
@ -65,7 +66,7 @@
q.type_code,q.check_name,pow.workorder_code_sap
from qc_check_task qct
left join qc_check_type q on q.id = qct.check_type
left join pro_order_workorder pow on pow.workorder_code = qct.order_no
left join pro_order_workorder pow on pow.workorder_code = qct.order_no and pow.del_flag = '0'
<where>
<if test="checkNo != null and checkNo != ''">and qct.check_no = #{checkNo}</if>
<if test="incomeBatchNo != null and incomeBatchNo != ''">and qct.income_batch_no = #{incomeBatchNo}</if>
@ -78,7 +79,7 @@
<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="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="status != null and status != ''">and qct.status = #{status}</if>
<if test="delFlag != null and delFlag != ''">and qct.del_flag = #{delFlag}</if>
@ -278,8 +279,41 @@
where qctf.del_flag = '0' and qctf.check_type = #{checkType}
and CONVERT(varchar(10),#{incomeTime}, 120) BETWEEN qctf.start_time and qctf.end_time
order by create_time desc
</select>
<select id="getPrintXJList" parameterType="QcCheckReportIncome"
resultMap="QcCheckReportIncomeResult">
select qct.order_no,qct.material_code, qct.material_name, qct.check_no, qct.income_batch_no,
qct.check_result, CONVERT(varchar(10),qct.income_time, 120),concat(bp.umrez,'装') modelType,
qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_loc, qct.check_status,
qct.check_man_code, qct.check_man_name,qct.check_time, qct.check_result, qct.status,qct.sample_quality,
qct.remark,qct.attr3,qct.check_type
from qc_check_task qct
left join base_product bp on qct.material_code = bp.product_code and bp.del_flag = '0'
<where>
<if test="checkNo != null and checkNo != ''">and qct.check_no = #{checkNo}</if>
<if test="incomeBatchNo != null and incomeBatchNo != ''">and qct.income_batch_no = #{incomeBatchNo}</if>
<if test="orderNo != null and orderNo != ''">and qct.order_no = #{orderNo}</if>
<if test="materialCode != null and materialCode != ''">and qct.material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''">and qct.material_name like concat('%',#{materialName}, '%')</if>
<if test="supplierCode != null and supplierCode != ''">and qct.supplier_code = #{supplierCode}</if>
<if test="supplierName != null and supplierName != ''">and qct.supplier_name like concat('%',#{supplierName}, '%')</if>
<if test="checkLoc != null and checkLoc != ''">and qct.check_loc = #{checkLoc}</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="checkManName != null and checkManName != ''">and qct.check_man_name like concat('%',#{checkManName}, '%')</if>
and qct.del_flag = '0'
<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="delFlag != null and delFlag != ''">and qct.del_flag = #{delFlag}</if>
<if test="incomeTimeStart != null ">and CONVERT(varchar(30),qct.income_time, 120) >= #{incomeTimeStart}</if>
<if test="incomeTimeEnd != null ">and #{incomeTimeEnd} > CONVERT(varchar(30),qct.income_time, 120)</if>
<if test="checkTimeStart != null ">and CONVERT(varchar(30),qct.check_time, 120) >= #{checkTimeStart}</if>
<if test="checkTimeEnd != null ">and #{checkTimeEnd} > CONVERT(varchar(30),qct.check_time, 120)</if>
<if test="typeCode != null ">and qct.type_code = #{typeCode}</if>
</where>
</select>
<insert id="insertQcCheckReportIncome" parameterType="QcCheckReportIncome">
insert into qc_check_task
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -404,4 +438,6 @@
#{recordId}
</foreach>
</delete>
</mapper>

@ -145,6 +145,8 @@
<if test="checkTimeEnd != null ">and #{checkTimeEnd} > CONVERT(varchar(30),qct.check_time, 120)</if>
<if test="checkType != null ">and qct.check_type = #{checkType}</if>
<if test="typeCode != null ">and q.type_code = #{typeCode}</if>
<if test="cpkType != null ">and bpa.cpk_type = #{cpkType}</if>
and pow.del_flag = '0'
</where>
order by qct.create_time desc
@ -357,7 +359,7 @@
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,
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
<where>
<if test="checkNo != null and checkNo != ''">and qct.check_no = #{checkNo}</if>
@ -390,7 +392,7 @@
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,'','',
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
<where>
<if test="checkNo != null and checkNo != ''">and qct.check_no = #{checkNo}</if>

@ -276,6 +276,11 @@
<if test="checkTimeStart != null and checkTimeStart != ''">and CONVERT(varchar(10),qct.check_time, 120) = #{checkTimeStart}</if>
<if test="checkManCode != null and checkManCode != ''">and qctu.check_man_code = #{checkManCode}</if>
<if test="checkStatus != null and checkStatus != ''">and qct.check_status in (${checkStatus})</if>
<if test="materialCode != null and materialCode != ''">
and (
qct.material_code like concat('%', #{materialCode},'%') or qct.material_name like concat('%', #{materialCode},'%')
)
</if>
<if test='delFlag == "0"'>
and (CONVERT(varchar(10),qct.create_time, 120) >= CONVERT(varchar(10),DATEADD(DAY, -1, GETDATE()), 120))
</if>

@ -25,7 +25,12 @@
from qc_check_task qct
where qct.type_code = 'material' and qct.del_flag = '0'
and CONVERT(varchar(7),qct.income_time, 120) = #{yearMonth}
<if test="supplierCodes != null and supplierCodes.size()>0">
and qct.supplier_code in
<foreach collection="supplierCodes" item="supplierCode" index="index" separator="," open="(" close=")">
#{supplierCode}
</foreach>
</if>
</select>
<select id="selectPcMap" resultType="com.op.quality.domain.QcStaticTable">
SELECT
@ -280,6 +285,7 @@
left join pro_order_workorder pow on powb.workorder_id = pow.workorder_id
where powb.del_flag = '0' and pow.del_flag = '0'
and pow.workorder_code = #{orderNo}
order by powb.batch_code
</select>
<select id="getLegendData" resultType="com.op.quality.domain.QcStaticTable">
select DISTINCT supplier_code supplierCode,
@ -467,7 +473,7 @@
<select id="getDLData" resultType="com.op.quality.domain.QcStaticTable">
SELECT
concat(q.cpkType,'-',q.ymdms) yearMonth,
ymdms,rule_name ruleName,
ymdms,rule_name ruleName,q.lineName,q.checkTypeName,
project_no projectNo,
STUFF(
(SELECT ',' + t.actual_value
@ -492,17 +498,22 @@
select
bpa.cpk_type cpkType,
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
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_equipment be on be.equipment_type_code = 'equ_type_bzx'
and be.del_flag = '0'
and be.equipment_code = qct.check_loc
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
<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="checkLoc != null ">and qct.check_loc = #{checkLoc}</if>
and qctd.project_id = #{projectId} and bpa.cpk_type = #{cpkType}
) 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>
@ -947,7 +958,7 @@
<select id="getDLDataDay" resultType="com.op.quality.domain.QcStaticTable">
SELECT
concat(q.cpkType,'-',q.ymdms) yearMonth,
ymdms,rule_name ruleName,
ymdms,rule_name ruleName,q.lineName,q.checkTypeName,
project_no projectNo,
STUFF(
(SELECT ',' + t.actual_value
@ -972,17 +983,22 @@
select
bpa.cpk_type cpkType,
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
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_equipment be on be.equipment_type_code = 'equ_type_bzx'
and be.del_flag = '0'
and be.equipment_code = qct.check_loc
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
<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="checkLoc != null ">and qct.check_loc = #{checkLoc}</if>
and qctd.project_id = #{projectId} and bpa.cpk_type = #{cpkType}
) 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 id="getXJCheckTableDetailList" resultType="com.op.quality.domain.CheckTypeXJDetail">
select

@ -543,14 +543,14 @@ public class SysUserServiceImpl implements ISysUserService {
//Date maxTime0 = userMapper.getMaxTime();
//if(maxTime0 != null){
// Calendar calendar = Calendar.getInstance();
// calendar.setTime(maxTime0);
// calendar.add(Calendar.DAY_OF_YEAR, 1);
// Date maxTime = calendar.getTime();
Date maxTime = DateUtils.getNowDate();
Calendar calendar = Calendar.getInstance();
//calendar.setTime(maxTime0);
calendar.add(Calendar.DAY_OF_YEAR, -1);
Date maxTime = calendar.getTime();
//Date maxTime = DateUtils.getNowDate();
String ymd = DateFormatUtils.format(maxTime, "yyyy-MM-dd");//yyyy-MM-dd
log.info("更新人力-参数:"+ ymd);
//AjaxResult hrR = remoteOpenService.GetHrUserInfo(ymd);
//AjaxResult hrR = remoteOpenService.GetHrUserInfo("2024-05-01");
AjaxResult hrR = remoteOpenService.GetHrUserInfo(ymd);
List<HRInfo> infoList = new ArrayList<>();
@ -592,7 +592,9 @@ public class SysUserServiceImpl implements ISysUserService {
}
dto.setPhonenumber(dto.getPeMobilePhone());
dto.setPost(dto.getPoscd());
dto.setDeptId(Long.parseLong(dto.getOucod()));
if(StringUtils.isNotBlank(dto.getOucod())){
dto.setDeptId(Long.parseLong(dto.getOucod()));
}
}
//sap返回的编码

Loading…
Cancel
Save