来料去重修改+成品修改设备+看板bug修改

master
zhaoxiaolin 10 months ago
parent 2b7e105dff
commit b7bfb7b1ba

@ -127,8 +127,6 @@ public interface MesReportWorkMapper {
public MesReportWork getReportWorkHz(MesReportWork mesReportWork); public MesReportWork getReportWorkHz(MesReportWork mesReportWork);
MesReportWork getEndReport(MesReportWork pWork);
List<MesReportWork> selectMesReportWorkList_S(MesReportWork mesReportWork); List<MesReportWork> selectMesReportWorkList_S(MesReportWork mesReportWork);
int reportSapCancel(MesReportWork mesReportWork); int reportSapCancel(MesReportWork mesReportWork);

@ -424,8 +424,6 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
//最终报工标识且sap报工成功关闭子母工单
//MesReportWork endReport = mesReportWorkMapper.getEndReport(pHzWork);
}else{ }else{
//报工不成功跳出循环 //报工不成功跳出循环
break; break;

@ -316,7 +316,7 @@
pow.unit pow.unit
from pro_order_workorder pow from pro_order_workorder pow
left join base_equipment be on pow.workorder_name = be.equipment_code and be.equipment_type_code = 'equ_type_bzx' left join base_equipment be on pow.workorder_name = be.equipment_code and be.equipment_type_code = 'equ_type_bzx'
where pow.workorder_name = 'XL03' and pow.status = 'w2' where pow.workorder_name = #{equCode} and pow.status = 'w2'
and CONVERT ( DATE, pow.product_date ) = CONVERT ( DATE, GETDATE( ) ) and CONVERT ( DATE, pow.product_date ) = CONVERT ( DATE, GETDATE( ) )
and pow.parent_order = '0' and pow.parent_order = '0'
</select> </select>

@ -599,11 +599,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join pro_order_workorder ow on mrw.workorder_code = ow.workorder_code left join pro_order_workorder ow on mrw.workorder_code = ow.workorder_code
left join base_equipment equ on equ.equipment_code = ow.workorder_name left join base_equipment equ on equ.equipment_code = ow.workorder_name
</select> </select>
<select id="getEndReport" resultType="com.op.mes.domain.MesReportWork">
select end_report endReport
from mes_report_work
where end_report = '1' and workorder_code = #{workorderCode}
</select>
<select id="selectMesReportWorkList_S" parameterType="MesReportWork" resultMap="MesReportWorkResult"> <select id="selectMesReportWorkList_S" parameterType="MesReportWork" resultMap="MesReportWorkResult">
SELECT SELECT
mrw.machine_name, mrw.machine_name,

@ -1331,12 +1331,12 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
} else { } else {
proOrderWorkorderMapper.updateProOrderWorkorder(proWorkOrder); proOrderWorkorderMapper.updateProOrderWorkorder(proWorkOrder);
//pro_order_workorder //pro_order_workorder
ProOrderWorkorder topWorkOrder = proOrderWorkorderMapper.getWorkOrderByCode(proWorkOrder.getWorkorderCode()); ProOrderWorkorder sonWorkOrder = proOrderWorkorderMapper.getSonWorkOrder(proWorkOrder);
while (!"0".equals(topWorkOrder.getParentOrder()) && StringUtils.isNotEmpty(topWorkOrder.getParentOrder())) { while (sonWorkOrder != null) {
//pro_order_workorder //pro_order_workorder
topWorkOrder = proOrderWorkorderMapper.getWorkOrderByCode(topWorkOrder.getParentOrder()); sonWorkOrder.setProdLineCode(proWorkOrder.getProdLineCode());
proWorkOrder.setWorkorderId(topWorkOrder.getWorkorderId()); proOrderWorkorderMapper.updateProOrderWorkorderM(sonWorkOrder);
proOrderWorkorderMapper.updateProOrderWorkorderM(proWorkOrder); sonWorkOrder = proOrderWorkorderMapper.getSonWorkOrder(sonWorkOrder);
} }
} }
return success("变更成功"); return success("变更成功");

@ -195,14 +195,14 @@ public class QcCheckTaskIncomeController extends BaseController {
} }
logger.info("来料信息查询结果:" + JSONObject.toJSONString(incomeR)); logger.info("来料信息查询结果:" + JSONObject.toJSONString(incomeR));
List<QcCheckTaskIncomeDTO> incomeAll = JSONArray.parseArray(JSONObject.toJSONString(incomeR.getData()),QcCheckTaskIncomeDTO.class); List<QcCheckTaskIncomeDTO> incomeAll = JSONArray.parseArray(JSONObject.toJSONString(incomeR.getData()),QcCheckTaskIncomeDTO.class);
//已经生成过检验任务的采购订单 //已经生成过检验任务的采购订单-物料凭证编号
List<String> todayIncomeLists = qcCheckTaskIncomeService.getTodayIncomeLists(); List<String> todayIncomeLists = qcCheckTaskIncomeService.getTodayIncomeLists();
List<QcCheckTaskIncomeDTO> newIncomes= null; List<QcCheckTaskIncomeDTO> newIncomes= null;
if(CollectionUtils.isEmpty(todayIncomeLists)){ if(CollectionUtils.isEmpty(todayIncomeLists)){
newIncomes = incomeAll; newIncomes = incomeAll;
}else{ }else{
newIncomes = incomeAll.stream() newIncomes = incomeAll.stream()
.filter(item -> !todayIncomeLists.contains(item.getOrderNo())) .filter(item -> !todayIncomeLists.contains(item.getAttr1()))
.collect(Collectors.toList()); .collect(Collectors.toList());
} }

@ -41,7 +41,7 @@ import javax.servlet.http.HttpServletRequest;
* @date 2023-10-19 * @date 2023-10-19
*/ */
@Service @Service
public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { public class QcCheckTaskIncomeServiceImpl<QcCheckUnqualifiedService> implements IQcCheckTaskIncomeService {
protected Logger logger = LoggerFactory.getLogger(getClass()); protected Logger logger = LoggerFactory.getLogger(getClass());
@Autowired @Autowired
private QcCheckTaskIncomeMapper qcCheckTaskIncomeMapper; private QcCheckTaskIncomeMapper qcCheckTaskIncomeMapper;
@ -85,6 +85,9 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
@Autowired @Autowired
private QcCheckTaskDefectMapper qcCheckTaskDefectMapper; private QcCheckTaskDefectMapper qcCheckTaskDefectMapper;
// @Autowired
// private QcCheckUnqualifiedService qcCheckUnqualifiedService;
/** /**
* *
* *
@ -163,7 +166,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
return 0;//没有找到检测项目 return 0;//没有找到检测项目
} }
} }
List<QcCheckTaskDetail> itemsGG = null; List<QcCheckTaskDetail> itemsGG = new ArrayList<>();
if(StringUtils.isNotBlank(group.getGroupId())){ if(StringUtils.isNotBlank(group.getGroupId())){
qctp.setGroupId(group.getGroupId()); qctp.setGroupId(group.getGroupId());
itemsGG = qcCheckTypeProjectMapper.getTPByTypeGroup(qctp); itemsGG = qcCheckTypeProjectMapper.getTPByTypeGroup(qctp);
@ -729,6 +732,8 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
unqualified.setType(checkType); unqualified.setType(checkType);
n = qcCheckUnqualifiedMapper.insertQcCheckUnqualified(unqualified); n = qcCheckUnqualifiedMapper.insertQcCheckUnqualified(unqualified);
logger.info("qc_check_unqualified:" + n); logger.info("qc_check_unqualified:" + n);
//qcCheckUnqualifiedService.updateQcCheckUnqualified(qcCheckUnqualified);
} }
return 1 ; return 1 ;
} }

@ -1,6 +1,7 @@
package com.op.quality.service.impl; package com.op.quality.service.impl;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -388,10 +389,21 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService
Date nowTime = DateUtils.getNowDate(); Date nowTime = DateUtils.getNowDate();
Date startTime = productTask.getCreateTime(); Date startTime = productTask.getCreateTime();
long mins = DateUtil.between(startTime, nowTime, DateUnit.MINUTE);
if(mins>=60){ LocalTime startTime0 = LocalTime.parse("11:30");
int m = insertQcCheckTaskProduce(productTask); LocalTime endTime0 = LocalTime.parse("12:30");
logger.info("++++++++++++过程检验巡检任务生成" + m + "++++++++++++++"); LocalTime currentTime = LocalTime.now();
if (!currentTime.isAfter(startTime0.minusSeconds(1)) && !currentTime.isBefore(endTime0.plusSeconds(1))) {
// 当前时间在11:30到12:30之间不执行任务
logger.info("++++++++++++过程检验巡检任务生成午间休息++++++++++++++");
} else {
long mins = DateUtil.between(startTime, nowTime, DateUnit.MINUTE);
if(mins>=60){
int m = insertQcCheckTaskProduce(productTask);
logger.info("++++++++++++过程检验巡检任务生成" + m + "++++++++++++++");
}
} }
} }
logger.info("++++++++++++" + poolName + "++++过程检验巡检结束++++++++++"); logger.info("++++++++++++" + poolName + "++++过程检验巡检结束++++++++++");

@ -450,7 +450,7 @@
where equipment_type_code='equ_type_bzx' and status = '1' where equipment_type_code='equ_type_bzx' and status = '1'
</select> </select>
<select id="getTodayIncomeLists" resultType="java.lang.String"> <select id="getTodayIncomeLists" resultType="java.lang.String">
select order_no select attr1
from qc_check_task from qc_check_task
where check_type = 'checkTypeLL' where check_type = 'checkTypeLL'
and CONVERT(varchar(10),GETDATE(), 120) = CONVERT(varchar(10),create_time, 120) and CONVERT(varchar(10),GETDATE(), 120) = CONVERT(varchar(10),create_time, 120)

@ -330,7 +330,7 @@
qmg.id groupId qmg.id groupId
from base_product bp from base_product bp
left join qc_material_group qmg on qmg.group_code = bp.product_group left join qc_material_group qmg on qmg.group_code = bp.product_group
where bp.product_code = #{materialCode} where bp.product_code like concat('%',#{materialCode},'%')
and bp.del_flag = '0' and bp.del_flag = '0'
</select> </select>
</mapper> </mapper>

@ -428,7 +428,7 @@ public class SapItemSyncImpl implements SapItemSyncService {
Date date = inputFormat.parse(inputDateTime); Date date = inputFormat.parse(inputDateTime);
qcCheckTaskIncomeDTO.setIncomeTime(date); qcCheckTaskIncomeDTO.setIncomeTime(date);
qcCheckTaskIncomeDTO.setFactoryCode(maraTable.getString("WERKS")); qcCheckTaskIncomeDTO.setFactoryCode(maraTable.getString("WERKS"));
qcCheckTaskIncomeDTO.setAttr1(maraTable.getString("USNAM"));//收货人 qcCheckTaskIncomeDTO.setAttr3(maraTable.getString("USNAM"));//收货人
qcCheckTaskIncomeDTO.setCreateTime(nowTime); qcCheckTaskIncomeDTO.setCreateTime(nowTime);
qcCheckTaskIncomeDTO.setCreateBy(createBy); qcCheckTaskIncomeDTO.setCreateBy(createBy);
qcCheckTaskIncomeDTOList.add(qcCheckTaskIncomeDTO); qcCheckTaskIncomeDTOList.add(qcCheckTaskIncomeDTO);

Loading…
Cancel
Save