Merge remote-tracking branch 'origin/master'

orign^2
wws 1 year ago
commit 30599c33b6

@ -298,6 +298,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where
CONVERT(varchar(10),feedback_time, 120) >= #{productDateStart}
and #{productDateEnd} >= CONVERT(varchar(10),feedback_time, 120)
and parent_order = '0'
)mrw
group by mrw.nameDate,mrw.productCode,mrw.productName,mrw.feedbackTime
</select>
@ -308,6 +309,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where
CONVERT(varchar(10),mrw.feedback_time, 120) >= #{productDateStart}
and #{productDateEnd} >= CONVERT(varchar(10),mrw.feedback_time, 120)
and parent_order = '0'
</select>
<select id="getEquNames" resultType="com.op.mes.domain.MesHourReport">
select
@ -470,7 +472,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getReportWorkHzList" resultType="com.op.mes.domain.MesReportWork">
select mrw.workorderCode,mrw.productCode,mrw.productName,mrw.machineCode,mrw.machineName,
mrw.shiftCode,mrw.feedbackTime feedbackTimeStr,mrw.quantityFeedback,
mrw.workTime,mrw.useMan,mrw.uploadStatus,<!--mrw.uploadTime,mrw.unit,-->
mrw.workTime,mrw.useMan,mrw.uploadStatus,mrw.unit,<!--mrw.uploadTime,-->
pow.order_code orderCode,pow.quantity_split quantity
from (
select workorder_code workorderCode,
@ -483,10 +485,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sum(quantity_feedback) quantityFeedback,
sum(work_time) workTime,
sum(use_man) useMan,
upload_status uploadStatus
<!--,upload_time uploadTime,
,
unit-->
upload_status uploadStatus,
<!--,upload_time uploadTime,-->
unit
from mes_report_work
where del_flag = '0' and parent_order = '0'
<if test="workorderCode != null and workorderCode != ''"> and workorder_code like concat('%', #{workorderCode}, '%')</if>
@ -498,8 +499,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="feedbackTimeEnd != null "> and #{feedbackTimeEnd} >= CONVERT(varchar(19),feedback_time, 120)</if>
<if test="uploadStatus != null and uploadStatus != ''"> and upload_status = #{uploadStatus}</if>
group by workorder_code, product_code,product_name,CONVERT(varchar(10),feedback_time, 120),machine_code,machine_name,shift_code
,upload_status
<!--,upload_time,unit-->
,upload_status,unit
<!--,upload_time-->
) mrw
left join pro_order_workorder pow on mrw.workorderCode = pow.workorder_code
<where>

@ -23,7 +23,7 @@ import com.op.common.core.web.page.TableDataInfo;
/**
* Controller
*
*
* @author Open Platform
* @date 2023-10-13
*/
@ -44,6 +44,12 @@ public class QcCheckProjectController extends BaseController {
return getDataTable(list);
}
@GetMapping("/getProjectList")
public List<QcCheckProject> getProjectList(QcCheckProject qcCheckProject) {
List<QcCheckProject> list = qcCheckProjectService.selectQcCheckProjectList(qcCheckProject);
return list;
}
/**
*
*/

@ -229,4 +229,15 @@ public class QcCheckTaskIncomeController extends BaseController {
List<QcCheckTaskIncome> list = qcCheckTaskIncomeService.getLLWorkOrder(qcCheckTaskIncome);
return getDataTable(list);
}
/**获取生产工单列表**/
@GetMapping("/getWorkOrder")
public TableDataInfo getWorkOrder(QcCheckTaskIncome qcCheckTaskIncome) {
startPage();
List<QcCheckTaskIncome> list = qcCheckTaskIncomeService.getWorkOrder(qcCheckTaskIncome);
return getDataTable(list);
}
@PutMapping("/getBatchList")
public List<QcCheckTaskIncome> getBatchList(@RequestBody QcCheckTaskIncome qcCheckTaskIncome) {
return qcCheckTaskIncomeService.getBatchList(qcCheckTaskIncome);
}
}

@ -267,4 +267,18 @@ public class QuaController extends BaseController {
List<QcCheckTaskIncome> list = qcCheckTaskIncomeService.getLLWorkOrder(qcCheckTaskIncome);
return getDataTable(list);
}
/**获取生产工单列表**/
@GetMapping("/getWorkOrder")
public TableDataInfo getWorkOrder(QcCheckTaskIncome qcCheckTaskIncome) {
DynamicDataSourceContextHolder.push("ds_"+qcCheckTaskIncome.getFactoryCode());
startPage();
List<QcCheckTaskIncome> list = qcCheckTaskIncomeService.getWorkOrder(qcCheckTaskIncome);
return getDataTable(list);
}
@PutMapping("/getBatchList")
public List<QcCheckTaskIncome> getBatchList(@RequestBody QcCheckTaskIncome qcCheckTaskIncome) {
DynamicDataSourceContextHolder.push("ds_"+qcCheckTaskIncome.getFactoryCode());
return qcCheckTaskIncomeService.getBatchList(qcCheckTaskIncome);
}
}

@ -24,6 +24,8 @@ public class QcCheckTaskIncome extends BaseEntity {
@Excel(name = "检验任务编号")
private String checkNo;
private String workorderCode;
/** 来料批次号 */
@Excel(name = "批次号")
private String incomeBatchNo;
@ -123,6 +125,32 @@ public class QcCheckTaskIncome extends BaseEntity {
private String typeCode;
private String checkType;
private String qualityStatus;
private String batchCode;
private String batchId;
public String getBatchCode() {
return batchCode;
}
public void setBatchCode(String batchCode) {
this.batchCode = batchCode;
}
public String getBatchId() {
return batchId;
}
public void setBatchId(String batchId) {
this.batchId = batchId;
}
public String getWorkorderCode() {
return workorderCode;
}
public void setWorkorderCode(String workorderCode) {
this.workorderCode = workorderCode;
}
public String getQualityStatus() {
return qualityStatus;

@ -82,4 +82,6 @@ public interface QcCheckTaskIncomeMapper {
int updateQcCheckTaskDetails(@Param("list") List<QcCheckTaskDetail> details);
List<SysDictData> getQcUnitList(SysDictData sysDictData);
List<QcCheckTaskIncome> getBatchList(QcCheckTaskIncome qcCheckTaskIncome);
}

@ -76,4 +76,8 @@ public interface QcCheckUnqualifiedMapper {
public List<QcCheckTaskIncome> getLLWorkOrder(QcCheckTaskIncome qcCheckTaskIncome);
void updateQualityStatus(QcCheckTaskIncome qcCheckTaskIncome);
List<QcCheckTaskIncome> getWorkOrder(QcCheckTaskIncome qcCheckTaskIncome);
int updateWorkOrderStatus(QcCheckTaskIncome qcCheckTaskIncome);
}

@ -81,4 +81,8 @@ public interface IQcCheckTaskIncomeService {
List<QcDefectType> getDefectList(QcDefectType qcDefectType);
List<QcCheckTaskIncome> getLLWorkOrder(QcCheckTaskIncome qcCheckTaskIncome);
List<QcCheckTaskIncome> getWorkOrder(QcCheckTaskIncome qcCheckTaskIncome);
List<QcCheckTaskIncome> getBatchList(QcCheckTaskIncome qcCheckTaskIncome);
}

@ -254,6 +254,10 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
qcCheckTaskIncome.setCheckResult(result);
qcCheckTaskIncome.setCheckTime(DateUtils.getNowDate());
n = qcCheckTaskIncomeMapper.updateQcCheckTaskIncome(qcCheckTaskIncome);
/**wms_raw_order_in-->quality_status->**/
qcCheckTaskIncome.setCheckResult(result.equals("Y")?"1":"0");
qcCheckUnqualifiedMapper.updateQualityStatus(qcCheckTaskIncome);
}else if("produce".equals(qcCheckTaskIncome.getTypeCode())){
QcCheckTaskProduce qcCheckTaskProduce = new QcCheckTaskProduce();
qcCheckTaskProduce.setCheckStatus("2");
@ -261,6 +265,11 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
qcCheckTaskProduce.setCheckResult(result);
qcCheckTaskProduce.setCheckTime(DateUtils.getNowDate());
n = qcCheckTaskProduceMapper.updateQcCheckTaskProduce(qcCheckTaskProduce);
/**pro_order_workorder-->status->w5**/
qcCheckTaskIncome.setStatus("w5");
qcCheckUnqualifiedMapper.updateWorkOrderStatus(qcCheckTaskIncome);
}else if("product".equals(qcCheckTaskIncome.getTypeCode())){
QcCheckTaskWarehousing warehousing = new QcCheckTaskWarehousing();
warehousing.setCheckStatus("2");
@ -283,10 +292,6 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
qcCheckUnqualifiedMapper.insertQcCheckUnqualified(unqualified);
}
/**wms_raw_order_in-->quality_status->**/
qcCheckTaskIncome.setCheckResult(result.equals("Y")?"1":"0");
qcCheckUnqualifiedMapper.updateQualityStatus(qcCheckTaskIncome);
return n ;
}
@ -302,6 +307,18 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
return qcCheckUnqualifiedMapper.getLLWorkOrder(qcCheckTaskIncome);
}
@Override
@DS("#header.poolName")
public List<QcCheckTaskIncome> getWorkOrder(QcCheckTaskIncome qcCheckTaskIncome) {
return qcCheckUnqualifiedMapper.getWorkOrder(qcCheckTaskIncome);
}
@Override
@DS("#header.poolName")
public List<QcCheckTaskIncome> getBatchList(QcCheckTaskIncome qcCheckTaskIncome) {
return qcCheckTaskIncomeMapper.getBatchList(qcCheckTaskIncome);
}
@Override
public int commitCheckResults(List<QcCheckTaskDetail> details) {
DynamicDataSourceContextHolder.push("ds_"+details.get(0).getFactoryCode());

@ -146,6 +146,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where dict_type = 'unit'
and status = '0'
</select>
<select id="getBatchList" resultType="com.op.quality.domain.QcCheckTaskIncome">
select powb.batch_id batchId,
powb.batch_code batchCode
from pro_order_workorder_batch powb
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 = #{workorderCode}
</select>
<insert id="insertQcCheckTaskIncome" parameterType="QcCheckTaskIncome">
insert into qc_check_task

@ -32,7 +32,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="typeCode != null and typeCode != ''"> and type_code = #{typeCode}</if>
<if test="typeName != null and typeName != ''"> and type_name like concat('%', #{typeName}, '%')</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
and del_flag = '0'
</where>
order by create_time

@ -103,6 +103,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where wroi.active_flag = '1' and wroi.quality_status = '0'
<if test="orderNo != null">and wroi.order_no like contact like ('%',#{orderNo})</if>
</select>
<select id="getWorkOrder" resultType="com.op.quality.domain.QcCheckTaskIncome">
select
workorder_code workorderCode,
workorder_code_sap orderNo,
product_code materialCode,
product_name materialName,
quantity_split quality,
unit,
product_date incomeTime
from pro_order_workorder
where status != 'w5' and parent_order != '0' and workorder_code_sap is not null
<if test="orderNo != null">and workorder_code_sap like contact like ('%',#{orderNo})</if>
order by product_date desc
</select>
<insert id="insertQcCheckUnqualified" parameterType="QcCheckUnqualified">
insert into qc_check_unqualified
@ -171,6 +185,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update wms_raw_order_in set quality_status = #{checkResult}
where order_no = #{orderNo}
</update>
<update id="updateWorkOrderStatus">
update pro_order_workorder set status = #{status} where workorder_code_sap = #{orderNo}
</update>
<delete id="deleteQcCheckUnqualifiedById" parameterType="String">
delete from qc_check_unqualified where id = #{id}

Loading…
Cancel
Save