Compare commits

..

No commits in common. 'b631b84543e961bcd1992d69d4175626f9e9f1a7' and 'ca48a459e0e58ddfac3915476e2ee760269d1dce' have entirely different histories.

@ -266,9 +266,9 @@ public class MesReportWorkConsumeServiceImpl implements IMesReportWorkConsumeSer
mesReportWorkMapper.updateAttr2AndRspos(params);
}
//attr2 0->1组件完成修改
// int f = mesReportWorkMapper.updateAttr2(workorder);
logger.info("组件修改完成:");
}
int f = mesReportWorkMapper.updateAttr2(workorder);
logger.info("组件修改完成:");
}
}

@ -313,11 +313,4 @@ public class OpenController extends BaseController {
}
/**
*
* **/
@GetMapping("/getClassInfoListByCheckType")
public AjaxResult getClassInfoListByCheckType(String checkType) {
return openService.getClassInfoListByCheckType(checkType);
}
}

@ -11,13 +11,11 @@ import com.op.system.api.domain.device.EquEquipmentDTO;
import com.op.system.api.domain.dto.WCSDTO;
import com.op.system.api.domain.mes.*;
import com.op.system.api.domain.quality.*;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* rfidMapper
@ -111,10 +109,6 @@ public interface OpenMapper {
void updateEquipmentStatuss(EquEquipmentBo equEquipment);
EquEquipmentBo selectEquEquipmentByEquEquipmentCode(String equipmentCode);
@MapKey("id")
List<Map<String,Object>> getClassInfoListByCheckType(@Param(value = "checkType") String checkType);
//
// int updateEquBatchs(@Param("list") List<EquEquipmentDTO> updates);
//

@ -59,6 +59,4 @@ public interface OpenService {
AjaxResult getFrozenElectricity(NhQuery paramMap);
AjaxResult getAttRecord(HrQuery paramMap);
AjaxResult getClassInfoListByCheckType(String checkType);
}

@ -1059,24 +1059,4 @@ public class OpenServiceImpl implements OpenService {
public AjaxResult getAttRecord(HrQuery paramMap) {
return AjaxResult.success(hrApi.getAttRecord(paramMap));
}
@Override
public AjaxResult getClassInfoListByCheckType(String checkType) {
if (StringUtils.isBlank(checkType)){
return error("缺陷类型不能为空");
}
DynamicDataSourceContextHolder.push("ds_1000" );
try {
return success(openMapper.getClassInfoListByCheckType(checkType)) ;
}catch(Exception e){
logger.info(e.getMessage());
e.printStackTrace();
return error(e.getMessage());
}
finally {
DynamicDataSourceContextHolder.poll();
}
}
}

@ -626,13 +626,4 @@
and del_flag = '0'
</select>
<select id="getClassInfoListByCheckType" resultType="java.util.Map" parameterType="String">
select id,
class_name className
from qc_defect_type_class
where defect_code in(select defect_code from qc_defect_type where del_flag='0' and defect_type = #{checkType})
and del_flag = '0'
order by sort
</select>
</mapper>

@ -155,15 +155,4 @@ public class QcInterfaceController {
return qcInterfaceService.getLineQcData(qcInterface);
}
/**
*
*
* @param queryDate
* @return
*/
@GetMapping("/getBpMonthNoOk")
public Map<String, List<String>> getBpMonthNoOk(String queryDate) {
return qcInterfaceService.getBpMonthNoOk(queryDate);
}
}

@ -968,16 +968,16 @@ public class QcStaticTableController extends BaseController {
@Log(title = "白坯缺陷排列报表导出", businessType = BusinessType.EXPORT)
@PostMapping("/getMonthOfDataDefectExport")
public void getMonthOfDataDefectExport(HttpServletResponse response, QcStaticTable qcStaticTable) {
List<Map<String,String>> list = qcStaticTableService.getMonthOfDataDefectV2(qcStaticTable);
List<Map<String,String>> list = qcStaticTableService.getMonthOfDataDefect(qcStaticTable);
//表格结构数据
List<String> titils = qcStaticTableService.getDaysOfMonth(qcStaticTable);
ArrayList<ExcelCol> excelCols = new ArrayList<>();
excelCols.add(new ExcelCol("不良项目", "defect", 30));
excelCols.add(new ExcelCol("不良项目", "dataType", 30));
for(int m=0;m<titils.size();m++){
excelCols.add(new ExcelCol(titils.get(m), titils.get(m), 30));
excelCols.add(new ExcelCol(titils.get(m), "monthNum"+m, 30));
}
excelCols.add(new ExcelCol("累计", "count", 30));
excelCols.add(new ExcelCol("累计", "rowSum", 30));
String sheetName = "白坯缺陷排列报表";
SXSSFWorkbook workbook = null;
@ -1017,7 +1017,7 @@ public class QcStaticTableController extends BaseController {
@Log(title = "白坯不良项目报表导出", businessType = BusinessType.EXPORT)
@PostMapping("/getDefectItemDataExport")
public void getDefectItemDataExport(HttpServletResponse response, QcStaticTable qcStaticTable) {
List<Map<String,String>> list = qcStaticTableService.getDefectItemDataV2(qcStaticTable);
List<Map<String,String>> list = qcStaticTableService.getDefectItemData(qcStaticTable);
//表格结构数据
List<String> titils = qcStaticTableService.getDefectItemTitle(qcStaticTable);
@ -1060,11 +1060,10 @@ public class QcStaticTableController extends BaseController {
@Log(title = "白坯性能报表导出", businessType = BusinessType.EXPORT)
@PostMapping("/getDefectItemDataPCExport")
public void getDefectItemDataPCExport(HttpServletResponse response, QcStaticTable qcStaticTable) {
List<Map<String,String>> list = qcStaticTableService.getDefectItemDataPCV2(qcStaticTable);
List<Map<String,String>> list = qcStaticTableService.getDefectItemDataPC(qcStaticTable);
//表格结构数据
List<String> titils = qcStaticTableService.getDefectItemTitle(qcStaticTable);
titils.add("其他");
ArrayList<ExcelCol> excelCols = new ArrayList<>();
excelCols.add(new ExcelCol("项目", "dataType", 30));
for(int m=0;m<titils.size();m++){

@ -57,7 +57,4 @@ public interface QcInterfaceMapper {
List<QcInterface> getProduceNoOkList1(QcInterface qcInterface);
List<QcInterface> getCheckProjectsPie1(QcInterface qcInterface);
@MapKey("ymd")
Map<String, QcInterface> getBpMonthNoOk(String queryDate);
}

@ -39,6 +39,4 @@ public interface IQcInterfaceService {
QcLineChartDto getLineQcData(QcInterface qcInterface);
List<QcInterface> getCheckProjectsPieLL(QcInterface qcInterface);
Map<String, List<String>> getBpMonthNoOk(String queryDate);
}

@ -495,33 +495,4 @@ public class QcInterfaceServiceImpl implements IQcInterfaceService {
}
@Override
@DS("#header.poolName")
public Map<String, List<String>> getBpMonthNoOk(String queryDate) {
Map<String, List<String>> dtoMap = new HashMap<>();
String nowYMD = DateUtils.getDate();
String[] nowYMDs = nowYMD.split("-");
int nowMonth = Integer.parseInt(nowYMDs[1]);
List<String> monthNames = new ArrayList<>();
Map<String, QcInterface> noOkHzs = qcInterfaceMapper.getBpMonthNoOk(queryDate);
List<String> monthData = new ArrayList<>();
for (int mh = 1; mh <= nowMonth; mh++) {
String yyyymm = nowYMDs[0] + "-" + String.format("%02d", mh);
monthNames.add(yyyymm);
if (!CollectionUtils.isEmpty(noOkHzs)&&noOkHzs.get(yyyymm)!=null) {
monthData.add(noOkHzs.get(yyyymm).getNoOkQuality());
} else {
monthData.add("0");
}
}
dtoMap.put("month", monthNames);
dtoMap.put("monthData", monthData);
return dtoMap;
}
}

@ -1787,8 +1787,6 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
if (StringUtils.isNotBlank(data.getAttr2())){
count = count + Integer.parseInt(data.getAttr2());
}
}else {
map.put(data.getAttr1(), "0");
}
}
map.put("count", Integer.toString(count));
@ -1802,7 +1800,7 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
map2.put("defect","抽样数");
for (QcCheckTaskDefect data : list){
if ("合计".equals(data.getDefectSubclass())){
map1.put(data.getAttr1(),StringUtils.isEmpty(data.getAttr2()) ? "0" : data.getAttr2());
map1.put(data.getAttr1(),data.getAttr2());
map2.put(data.getAttr1(),data.getAttr3());
if (StringUtils.isNotBlank(data.getAttr2())){
count1 = count1 + Integer.parseInt(data.getAttr2());
@ -2083,7 +2081,6 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
List<Map<String, String>> dtos = new ArrayList<>();
//获取不良种类
List<String> bpDefects = qcStaticTableMapper.getBpDefects(qcStaticTable);
bpDefects.add("其他");
List<QcCheckTaskDefect> monthList = qcStaticTableMapper.getBPDefectMothPCMapV2(qcStaticTable);
qcStaticTable.setYearMonth(null);
List<QcCheckTaskDefect> totalList = qcStaticTableMapper.getBPDefectMothPCMapV2(qcStaticTable);
@ -2102,16 +2099,21 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
for (String defect : bpDefects) {
for (QcCheckTaskDefect item : list){
if (defect.equals(item.getDefectSubclass())){
if (StringUtils.isNotBlank(item.getAttr2()) && StringUtils.isNotBlank(item.getAttr3())){
BigDecimal itemNoOkRate = new BigDecimal(0);
itemNoOkRate = new BigDecimal(item.getAttr2()).divide(new BigDecimal(item.getAttr3()),4,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100));
result.put("item"+i,itemNoOkRate.toString());
if (StringUtils.isNotBlank(item.getAttr1())){
if ("rate".equals(type)){
result.put("item"+i, item.getAttr1());
}else {
if (StringUtils.isNotBlank(item.getAttr2())){
result.put("item"+i,new BigDecimal(item.getAttr1()).divide(new BigDecimal(item.getAttr2()),2,RoundingMode.HALF_UP).toString());
}else {
result.put("item"+i,"100");
}
}
}else {
result.put("item"+i,"0");
}
break;
}else {
result.put("item"+i,"0");
}
}
i++;
@ -2195,7 +2197,6 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
//获取不良种类
List<String> bpDefects = qcStaticTableMapper.getBpDefects(qcStaticTable);
bpDefects.add("其他");
result.put("xData",bpDefects);
//当前查询月份的不良率
@ -2230,14 +2231,7 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
boolean flag = true;
for (QcCheckTaskDefect item : monthList){
if (defect.equals(item.getDefectSubclass())){
if (StringUtils.isNotBlank(item.getAttr2()) && StringUtils.isNotBlank(item.getAttr3())){
//不良率
BigDecimal itemNoOkRate = new BigDecimal(0);
itemNoOkRate = new BigDecimal(item.getAttr2()).divide(new BigDecimal(item.getAttr3()),4,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100));
yDataLeft.add(itemNoOkRate.toString());
}else {
yDataLeft.add("0");
}
yDataLeft.add(item.getAttr1());
flag = false;
break;
}
@ -2257,14 +2251,7 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
boolean flag = true;
for (QcCheckTaskDefect item : totalList){
if (defect.equals(item.getDefectSubclass())){
if (StringUtils.isNotBlank(item.getAttr2()) && StringUtils.isNotBlank(item.getAttr3())){
//不良率
BigDecimal itemNoOkRate = new BigDecimal(0);
itemNoOkRate = new BigDecimal(item.getAttr2()).divide(new BigDecimal(item.getAttr3()),4,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100));
yDataRight.add(itemNoOkRate.toString());
}else {
yDataRight.add("0");
}
yDataRight.add(item.getAttr1());
flag = false;
break;
}

@ -360,20 +360,4 @@
order by qctd.update_time desc
</select>
<select id="getBpMonthNoOk" parameterType="String" resultType="com.op.quality.domain.QcInterface" >
select
t.ymd,
sum(t.noOk_quality) noOkQuality
from(
select CONVERT(varchar(7),qct.income_time, 120) ymd,
qct.noOk_quality
from qc_check_task qct
where qct.order_type = 'bp'
and qct.del_flag='0'
and CONVERT(varchar(4),qct.income_time, 120) = CONVERT ( VARCHAR ( 4 ), GETDATE() , 120 )
) t
group by t.ymd
</select>
</mapper>

@ -1422,6 +1422,7 @@
LEFT JOIN qc_check_task_defect td ON qct.record_id = td.belong_to
LEFT JOIN qc_defect_type_class tc ON td.class_id = tc.id
WHERE qct.del_flag = '0'
AND tc.class_name IS NOT NULL
AND FORMAT ( qct.create_time, 'yyyy-MM' ) = #{yearMonth}
AND qct.order_type = 'bp'
GROUP BY tc.class_name, FORMAT ( qct.create_time, 'yyyy-MM-dd' )
@ -1435,6 +1436,7 @@
LEFT JOIN qc_check_task_defect td ON qct.record_id = td.belong_to
LEFT JOIN qc_defect_type_class tc ON td.class_id = tc.id
WHERE qct.del_flag = '0'
AND tc.class_name IS NOT NULL
AND FORMAT ( qct.create_time, 'yyyy-MM' ) = #{yearMonth}
AND qct.order_type = 'bp'
GROUP BY FORMAT ( qct.create_time, 'yyyy-MM-dd' )
@ -1450,6 +1452,7 @@
LEFT JOIN qc_check_task_defect td ON qct.record_id = td.belong_to
LEFT JOIN qc_defect_type_class tc ON td.class_id = tc.id
WHERE qct.del_flag = '0'
AND tc.class_name IS NOT NULL
AND qct.order_type = 'bp'
<if test="yearMonth !=null and yearMonth != ''">
AND FORMAT ( qct.create_time, 'yyyy-MM' ) = #{yearMonth}
@ -1465,14 +1468,15 @@
FROM
(
SELECT
ISNULL(tc.class_name,'其他') defectSubclass,
SUM (CASE WHEN qct.check_result = 'N' THEN 1 ELSE 0 END) attr2,
tc.class_name defectSubclass,
SUM (CASE WHEN qct.check_status = 'N' THEN 1 ELSE 0 END) attr2,
COUNT ( 0 ) attr3,
qct.income_batch_no
FROM qc_check_task qct
LEFT JOIN qc_check_task_defect td ON qct.record_id = td.belong_to
LEFT JOIN qc_defect_type_class tc ON td.class_id = tc.id
WHERE qct.del_flag = '0'
AND tc.class_name IS NOT NULL
AND qct.order_type = 'bp'
<if test="yearMonth !=null and yearMonth != ''">
AND FORMAT ( qct.create_time, 'yyyy-MM' ) = #{yearMonth}

Loading…
Cancel
Save