问题修复6

master
zhaoxiaolin 4 months ago
parent 761e5b97aa
commit 21818265fc

@ -717,6 +717,7 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
sapRFW.setAnzma(workOrder.getSapCode());//产线编号
sapRFW.setRemark(workOrder.getRemark());//备注
logger.info(workOrder.getWorkorderCodeSap() + "sap工单报工请求" + JSONObject.toJSONString(sapRFW));
//R r= R.ok();
R r = remoteSapService.sapRFWOrder(sapRFW);
logger.info(workOrder.getWorkorderCodeSap() + "sap工单报工结果" + r.getCode() + "," + r.getData() + "," + r.getMsg());
//上传成功更改mes_report_work状态

@ -37,7 +37,7 @@ public class IncomeTableExport extends BaseEntity {
private int okNums;
@Excel(name = "不合格数量")
private int noOkNums;
@Excel(name = "数量比例")
@Excel(name = "数量不良率")
private String noOkNumRate;
public String getSupplierId() {

@ -45,6 +45,7 @@ public class QcCheckTaskProduce extends BaseEntity {
this.incomeBatchNo = incomeBatchNo;
}
private String cpkType;
/**
*
*/
@ -63,7 +64,8 @@ public class QcCheckTaskProduce extends BaseEntity {
*/
@Excel(name = "物料名称")
private String materialName;
@Excel(name = "CPK品类")
private String cpkTypeName;
/**
*
*/
@ -210,6 +212,14 @@ public class QcCheckTaskProduce extends BaseEntity {
private String shiftId;
private String bz;//备注
public String getCpkTypeName() {
return cpkTypeName;
}
public void setCpkTypeName(String cpkTypeName) {
this.cpkTypeName = cpkTypeName;
}
public String getCpkType() {
return cpkType;
}

@ -92,8 +92,7 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
//批次不良率
if (tabledto.getBatchs() != 0) {
BigDecimal noOkBatchRate = new BigDecimal(tabledto.getNoOkBatchs()).multiply(new BigDecimal("100.00"))
.divide(new BigDecimal(tabledto.getBatchs()), BigDecimal.ROUND_CEILING)
.setScale(2, BigDecimal.ROUND_HALF_UP);
.divide(new BigDecimal(tabledto.getBatchs()), 2,BigDecimal.ROUND_HALF_UP);
tabledto.setNoOkBatchRate(noOkBatchRate.toString() + "%");
} else {
tabledto.setNoOkBatchRate("0.00%");
@ -109,8 +108,7 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
//数量不良率
if (tabledto.getNums() != 0) {
BigDecimal noOkNumRate = new BigDecimal(tabledto.getNoOkNums()).multiply(new BigDecimal("100.00"))
.divide(new BigDecimal(tabledto.getNums()), BigDecimal.ROUND_CEILING)
.setScale(2, BigDecimal.ROUND_HALF_UP);
.divide(new BigDecimal(tabledto.getNums()), 4, BigDecimal.ROUND_HALF_UP);
tabledto.setNoOkNumRate(noOkNumRate.toString() + "%");
} else {
tabledto.setNoOkNumRate("0.00%");

@ -89,6 +89,9 @@
<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="checkType != null ">and qct.check_type = #{checkType}</if>
<if test="workorderCodeSap != null ">and pow.workorder_code_sap like concat('%',#{workorderCodeSap}, '%')</if>
</where>
</select>

@ -72,10 +72,8 @@
<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="supplierCode != null and supplierCode != ''">and qct.supplier_code like concat('%',#{supplierCode}, '%')</if>
<if test="supplierName != null and supplierName != ''">and qct.supplier_name like concat('%',#{supplierName}, '%')</if>
<if test="incomeTime != null ">and qct.income_time = #{incomeTime}</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>

@ -46,6 +46,7 @@
<result property="confirmTime" column="confirm_time"/>
<result property="workorderCodeSap" column="workorderCodeSap"/>
<result property="cpkType" column="cpk_type"/>
<result property="cpkTypeName" column="cpkTypeName"/>
</resultMap>
@ -108,12 +109,13 @@
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.create_by,qct.create_time, qct.update_by, qct.update_time,
qct.check_type,qct.sample_quality,qct.noOk_quality,bpa.cpk_type,
qct.check_type,qct.sample_quality,qct.noOk_quality,bpa.cpk_type,sdd.dict_label cpkTypeName,
q.type_code,q.check_name,SUBSTRING(pow.workorder_code_sap, 4, 12) workorderCodeSap
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 base_product_attached bpa on concat('0000000',bpa.product_code) = qct.material_code
left join lanju_op_cloud.dbo.sys_dict_data sdd on sdd.dict_type = 'qms_category' and sdd.dict_value = bpa.cpk_type
<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>

@ -206,7 +206,9 @@
left join base_equipment be on be.equipment_code = qct.check_loc
where qct.check_type = 'checkTypeSCXJ' and qct.del_flag = '0' and pow.del_flag = '0'
<if test="orderNo != null ">and qct.check_no like concat('%',#{orderNo},'%')</if>
<if test="materialCode != null ">and qct.material_code like concat('%',#{materialCode},'%')</if>
<if test="materialCode != null ">and (
qct.material_code like concat('%',#{materialCode},'%') or qct.material_name like concat('%',#{materialCode},'%')
)</if>
<if test="incomeBatchNo != null ">and qct.income_batch_no like concat('%',#{incomeBatchNo},'%')</if>
<if test="incomeTimeStr != null ">and CONVERT(varchar(10),pow.product_date, 120) = #{incomeTimeStr}</if>
<if test="incomeTimeStart != null ">and CONVERT(varchar(30),qct.income_time, 120) >= #{incomeTimeStart}</if>

Loading…
Cancel
Save