Merge remote-tracking branch 'origin/master'

master
Yangwl 1 year ago
commit 8b39a2d210

@ -20,6 +20,42 @@ public class BoardDTO {
private List<String> days;
private String startTime;
private String endTime;
private String productName;
private String productCode;
private String workorderCodeSap;
private String unit;
public String getWorkorderCodeSap() {
return workorderCodeSap;
}
public void setWorkorderCodeSap(String workorderCodeSap) {
this.workorderCodeSap = workorderCodeSap;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public String getProductCode() {
return productCode;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
public String getStartTime() {
return startTime;

@ -42,8 +42,7 @@ public class DeviceInterfaceController {
}
/**
* TOP10
* /
*
*
* @return
*/
@ -53,9 +52,7 @@ public class DeviceInterfaceController {
}
/**
* -MTBF top10
* /
* //
* -MTBF
*
* @param equOperation
* @return
@ -67,7 +64,6 @@ public class DeviceInterfaceController {
/**
*
* /
*
* @param equOperation
* @return

@ -1,5 +1,6 @@
package com.op.device.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.op.common.core.annotation.Excel;
@ -179,6 +180,16 @@ public class EquOperation extends BaseEntity {
//百分比
private String intactRate;
//设备看板时间范围——开始时间、结束时间
@JsonFormat(pattern = "yyyy-MM-dd")
private String startTime;
@JsonFormat(pattern = "yyyy-MM-dd")
private String endTime;
//设备看板维修质量 mttr
private String mttr;
public String getCreateTimeStart() {
return createTimeStart;
}
@ -462,6 +473,30 @@ public class EquOperation extends BaseEntity {
return timeDimension;
}
//开始时间、结束时间
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
//mttr
public void setMttr(String mttr) {
this.mttr = mttr;
}
public String getMttr() {
return mttr;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

@ -14,323 +14,166 @@ import com.op.common.core.web.domain.BaseEntity;
/**
* equ_repair_work_order
*
* @author Open Platform
* @author
* @date 2023-10-19
*/
public class EquRepairWorkOrder extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private String workId;
@Excel(name = "维修主键")
private String workId;//主键
/**
*
*/
@Excel(name = "报修主键")
private String orderId;
private String orderId;//报修主键
/**
*
*/
@Excel(name = "维修单号")
private String workCode;
private String workCode;//维修单号
/**
*
*/
@Excel(name = "报修单号")
private String orderCode;
private String orderCode;//报修单号
/**
*
*/
@Excel(name = "是否立即处理")
private String workHandle;
private String workHandle;//是否立即处理
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "计划维修时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date workPlanTime;
private Date workPlanTime;//计划维修时间
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "计划停机时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date workPlanDownTime;
private Date workPlanDownTime;//计划停机时间
/**
*
*/
@Excel(name = "关联计划")
private String orderRelevance;
private String orderRelevance;//关联计划
/**
*
*/
@Excel(name = "维修人员")
private String workPerson;
private String workPerson;//维修人员
/**
*
*/
@Excel(name = "维修组")
private String workTeam;
private String workTeam;//维修组
/**
*
*/
@Excel(name = "是否委外")
private String workOutsource;
private String workOutsource;//是否委外
/**
*
*/
@Excel(name = "是否停机维修")
private String workDownMachine;
private String workDownMachine;//是否停机维修
/**
*
*/
@Excel(name = "设备编码")
private String equipmentCode;
private String equipmentCode;//设备编码
/**
*
*/
@Excel(name = "原因分析")
private String workReason;
private String workReason;//原因分析
/**
*
*/
@Excel(name = "故障描述")
private String workFaultDesc;
private String workFaultDesc;//故障描述
/**
*
*/
@Excel(name = "维修用时")
private String workCostTime;
private String workCostTime;//维修用时
/**
*
*/
@Excel(name = "维修费用")
private String workCost;
private String workCost;//维修费用
/**
* id
*/
@Excel(name = "委外工单id")
private String outWorkId;
private String outWorkId;//委外工单id
/**
*
*/
@Excel(name = "委外工单编码")
private String outWorkCode;
private String outWorkCode;//委外工单编码
/**
* 1
*/
@Excel(name = "备用字段1")
private String attr1;
private String attr1;//备用字段1
/**
* 2
*/
@Excel(name = "备用字段2")
private String attr2;
private String attr2;//备用字段2
/**
* 3
*/
@Excel(name = "备用字段3")
private String attr3;
private String attr3;//备用字段3
/**
*
*/
private String delFlag;
@Excel(name = "删除标志")
private String delFlag;//删除标志
/**
*
*/
@Excel(name = "工厂编码")
private String factoryCode;
private String factoryCode;//工厂编码
/**
*
*/
@Excel(name = "维修状态")
private String workStatus;
private String workStatus;//维修状态
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "维修开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date workStartTime;
private Date workStartTime;//维修开始时间
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "维修结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date workEndTime;
private Date workEndTime;//维修结束时间
//维修停机真正开始时间
private Date actualDownStartTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "维修实际开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date actualDownStartTime;//维修停机真正开始时间
//维修停机真正结束时间
private Date actualDownEndTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "维修实际结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date actualDownEndTime;//维修停机真正开始时间
/**
*
*/
private String workConnection;
@Excel(name = "联系方式")
private String workConnection;//联系方式
/**
*
*/
private String equipmentStatusDescription;
@Excel(name = "故障类型")
private String faultType;//故障类型
/**
*
*/
private String repairMeasures;
@Excel(name = "设备状态描述")
private String equipmentStatusDescription;//设备状态描述
// 设备
/**
*
*/
@Excel(name = "维修措施")
private String repairMeasures;//设备维修措施
@Excel(name = "故障停机时间")
private String faultDownTime;//故障停机时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "故障开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date faultStartTime;//故障开始时间
/////////////////////////////////////////////////////////设备表字段
@Excel(name = "设备名称")
private String equipmentName;
private String equipmentName;//设备名称
private String equipmentSpec;//规格型号
private String equipmentTypeName;//设备类型名称
private String equipmentLocation;//设备位置
private String department;//部门
private String workshopCode;//所属工作中心编码
private String workshopName;//所属工作中心名称
/**
*
*/
@Excel(name = "规格型号")
private String equipmentSpec;
/**
*
*/
@Excel(name = "设备类型名称")
private String equipmentTypeName;
/**
*
*/
@Excel(name = "设备位置")
private String equipmentLocation;
/**
*
*/
@Excel(name = "部门")
private String department;
/**
*
*/
@Excel(name = "所属工作中心编码")
private String workshopCode;
/**
*
*/
@Excel(name = "所属工作中心名称")
private String workshopName;
//报修
/**
*
*/
@Excel(name = "故障描述")
private String orderDesc;
/**
*
*/
/////////////////////////////////////////////////////////////报修表
private String orderDesc;//故障描述
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "故障时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date orderBreakdownTime;
/**
*
*/
@Excel(name = "报修来源")
private String orderSource;
/**
*
*/
private Date orderBreakdownTime;//故障时间
private String orderSource;//报修来源
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "报修时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date orderTime;
private Date orderTime;//报修时间
private String orderRepairmanCode;//报修人
private String orderConnection;//报修人联系方式
/**
*
*/
private String orderRepairmanCode;
//////////////////////////////////////////////////////////////班组表
@Excel(name = "班组名称")
private String teamName;//班组名称
@Excel(name = "班组人员")
private String teamPerson;//班组人员
/**
*
*/
private String orderConnection;
//班组
/**
*
*/
private String teamName;
/**
*
*/
private String teamPerson;
//时间列表 虚拟字段
/////////////////////////////////////////////////////////////时间列表 虚拟字段
private List<Date> workPlanTimeArray;
private List<Date> workPlanDownTimeArray;
//计划开始时间、结束时间
private String workPlanTimeStart;
private String workPlanTimeStart;//计划开始时间、结束时间
private String workPlanTimeEnd;
//计划停机开始时间、结束时间
private String workPlanDownTimeStart;
private String workPlanDownTimeStart; //计划停机开始时间、结束时间
private String workPlanDownTimeEnd;
//委外虚拟字段
/**
*
*/
private String outSourcePerson;
/**
*
*/
private String outSourceReason;
/**
*
*/
private String workOutsourcingUnit;
/**
*
*/
private String outSourceConnection;
/**
*
*/
private String faultType;
///////////////////////////////////////////////////////////委外
private String outSourcePerson;//委外人员
private String outSourceReason;//委外维修原因
private String workOutsourcingUnit;//委外单位
private String outSourceConnection;//联系方式
//手持
//用户id
private String userId;
private String userId;//用户id
//检查项列表
private List<EquOrder> detailList;
@ -349,11 +192,14 @@ public class EquRepairWorkOrder extends BaseEntity {
//检查项列表
private List<EquOrderStandard> standardList;
//图片文件
private String fileList;
private List<BaseFileData> files;
//维修前 维修后
public String getAfterRepairFile() {
return afterRepairFile;
}
public void setAfterRepairFile(String afterRepairFile) {
this.afterRepairFile = afterRepairFile;
}
@ -361,7 +207,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public List<BaseFileData> getAfterRepairFiles() {
return afterRepairFiles;
}
public void setAfterRepairFiles(List<BaseFileData> afterRepairFiles) {
this.afterRepairFiles = afterRepairFiles;
}
@ -369,7 +214,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public String getBeforeRepairFile() {
return beforeRepairFile;
}
public void setBeforeRepairFile(String beforeRepairFile) {
this.beforeRepairFile = beforeRepairFile;
}
@ -377,16 +221,12 @@ public class EquRepairWorkOrder extends BaseEntity {
public List<BaseFileData> getBeforeRepairFiles() {
return beforeRepairFiles;
}
public void setBeforeRepairFiles(List<BaseFileData> beforeRepairFiles) {
this.beforeRepairFiles = beforeRepairFiles;
}
public void setBeforeRepairFiles(List<BaseFileData> beforeRepairFiles) { this.beforeRepairFiles = beforeRepairFiles; }
//detailList 检查项详情
public List<EquOrder> getDetailList() {
return detailList;
}
public void setDetailList(List<EquOrder> detailList) {
this.detailList = detailList;
}
@ -395,7 +235,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setOrderDesc(String orderDesc) {
this.orderDesc = orderDesc;
}
public String getOrderDesc() {
return orderDesc;
}
@ -403,7 +242,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setOrderBreakdownTime(Date orderBreakdownTime) {
this.orderBreakdownTime = orderBreakdownTime;
}
public Date getOrderBreakdownTime() {
return orderBreakdownTime;
}
@ -411,7 +249,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setOrderSource(String orderSource) {
this.orderSource = orderSource;
}
public String getOrderSource() {
return orderSource;
}
@ -419,7 +256,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setOrderTime(Date orderTime) {
this.orderTime = orderTime;
}
public Date getOrderTime() {
return orderTime;
}
@ -427,7 +263,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setOrderRepairmanCode(String orderRepairmanCode) {
this.orderRepairmanCode = orderRepairmanCode;
}
public String getOrderRepairmanCode() {
return orderRepairmanCode;
}
@ -435,7 +270,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setOrderConnection(String orderConnection) {
this.orderConnection = orderConnection;
}
public String getOrderConnection() {
return orderConnection;
}
@ -444,7 +278,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setEquipmentName(String equipmentName) {
this.equipmentName = equipmentName;
}
public String getEquipmentName() {
return equipmentName;
}
@ -452,7 +285,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setEquipmentSpec(String equipmentSpec) {
this.equipmentSpec = equipmentSpec;
}
public String getEquipmentSpec() {
return equipmentSpec;
}
@ -460,7 +292,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setEquipmentTypeName(String equipmentTypeName) {
this.equipmentTypeName = equipmentTypeName;
}
public String getEquipmentTypeName() {
return equipmentTypeName;
}
@ -468,7 +299,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setEquipmentLocation(String equipmentLocation) {
this.equipmentLocation = equipmentLocation;
}
public String getEquipmentLocation() {
return equipmentLocation;
}
@ -476,7 +306,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setDepartment(String department) {
this.department = department;
}
public String getDepartment() {
return department;
}
@ -484,7 +313,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setWorkshopCode(String workshopCode) {
this.workshopCode = workshopCode;
}
public String getWorkshopCode() {
return workshopCode;
}
@ -492,24 +320,22 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setWorkshopName(String workshopName) {
this.workshopName = workshopName;
}
public String getWorkshopName() {
return workshopName;
}
//维修工单
public void setWorkId(String workId) {
this.workId = workId;
}
public String getWorkId() {
return workId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getOrderId() {
return orderId;
}
@ -517,7 +343,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setWorkCode(String workCode) {
this.workCode = workCode;
}
public String getWorkCode() {
return workCode;
}
@ -525,7 +350,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setOrderCode(String orderCode) {
this.orderCode = orderCode;
}
public String getOrderCode() {
return orderCode;
}
@ -533,7 +357,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setWorkHandle(String workHandle) {
this.workHandle = workHandle;
}
public String getWorkHandle() {
return workHandle;
}
@ -541,7 +364,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setWorkPlanTime(Date workPlanTime) {
this.workPlanTime = workPlanTime;
}
public Date getWorkPlanTime() {
return workPlanTime;
}
@ -549,7 +371,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setWorkPlanDownTime(Date workPlanDownTime) {
this.workPlanDownTime = workPlanDownTime;
}
public Date getWorkPlanDownTime() {
return workPlanDownTime;
}
@ -557,7 +378,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setOrderRelevance(String orderRelevance) {
this.orderRelevance = orderRelevance;
}
public String getOrderRelevance() {
return orderRelevance;
}
@ -565,7 +385,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setWorkPerson(String workPerson) {
this.workPerson = workPerson;
}
public String getWorkPerson() {
return workPerson;
}
@ -573,7 +392,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setWorkTeam(String workTeam) {
this.workTeam = workTeam;
}
public String getWorkTeam() {
return workTeam;
}
@ -581,7 +399,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setWorkOutsource(String workOutsource) {
this.workOutsource = workOutsource;
}
public String getWorkOutsource() {
return workOutsource;
}
@ -589,7 +406,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setWorkDownMachine(String workDownMachine) {
this.workDownMachine = workDownMachine;
}
public String getWorkDownMachine() {
return workDownMachine;
}
@ -597,7 +413,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setEquipmentCode(String equipmentCode) {
this.equipmentCode = equipmentCode;
}
public String getEquipmentCode() {
return equipmentCode;
}
@ -605,7 +420,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setWorkReason(String workReason) {
this.workReason = workReason;
}
public String getWorkReason() {
return workReason;
}
@ -613,7 +427,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setWorkFaultDesc(String workFaultDesc) {
this.workFaultDesc = workFaultDesc;
}
public String getWorkFaultDesc() {
return workFaultDesc;
}
@ -621,7 +434,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setWorkCostTime(String workCostTime) {
this.workCostTime = workCostTime;
}
public String getWorkCostTime() {
return workCostTime;
}
@ -629,7 +441,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setWorkCost(String workCost) {
this.workCost = workCost;
}
public String getWorkCost() {
return workCost;
}
@ -637,7 +448,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setOutWorkId(String outWorkId) {
this.outWorkId = outWorkId;
}
public String getOutWorkId() {
return outWorkId;
}
@ -645,7 +455,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setOutWorkCode(String outWorkCode) {
this.outWorkCode = outWorkCode;
}
public String getOutWorkCode() {
return outWorkCode;
}
@ -653,7 +462,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setAttr1(String attr1) {
this.attr1 = attr1;
}
public String getAttr1() {
return attr1;
}
@ -661,7 +469,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setAttr2(String attr2) {
this.attr2 = attr2;
}
public String getAttr2() {
return attr2;
}
@ -669,7 +476,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setAttr3(String attr3) {
this.attr3 = attr3;
}
public String getAttr3() {
return attr3;
}
@ -677,7 +483,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getDelFlag() {
return delFlag;
}
@ -685,25 +490,20 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryCode() {
return factoryCode;
}
//维修工单 新增字段 维修状态
public void setWorkStatus(String workStatus) {
this.workStatus = workStatus;
}
public String getWorkStatus() {
return workStatus;
}
//维修工单 新增字段 维修开始结束时间
public void setWorkStartTime(Date workStartTime) {
this.workStartTime = workStartTime;
}
public Date getWorkStartTime() {
return workStartTime;
}
@ -711,7 +511,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setWorkEndTime(Date workEndTime) {
this.workEndTime = workEndTime;
}
public Date getWorkEndTime() {
return workEndTime;
}
@ -719,7 +518,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setWorkConnection(String workConnection) {
this.workConnection = workConnection;
}
public String getWorkConnection() {
return workConnection;
}
@ -728,7 +526,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setTeamName(String teamName) {
this.teamName = teamName;
}
public String getTeamName() {
return teamName;
}
@ -736,7 +533,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setTeamPerson(String teamPerson) {
this.teamPerson = teamPerson;
}
public String getTeamPerson() {
return teamPerson;
}
@ -745,7 +541,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public List<Date> getWorkPlanTimeArray() {
return workPlanTimeArray;
}
public void setWorkPlanTimeArray(List<Date> workPlanTimeArray) {
this.workPlanTimeArray = workPlanTimeArray;
}
@ -753,33 +548,25 @@ public class EquRepairWorkOrder extends BaseEntity {
public List<Date> getWorkPlanDownTimeArray() {
return workPlanDownTimeArray;
}
public void setWorkPlanDownTimeArray(List<Date> workPlanDownTimeArray) {
this.workPlanDownTimeArray = workPlanDownTimeArray;
}
public void setWorkPlanDownTimeArray(List<Date> workPlanDownTimeArray) { this.workPlanDownTimeArray = workPlanDownTimeArray; }
//计划开始时间、结束时间
public String getWorkPlanDownTimeStart() {
return workPlanDownTimeStart;
}
public void setWorkPlanDownTimeStart(String workPlanDownTimeStart) {
this.workPlanDownTimeStart = workPlanDownTimeStart;
}
public void setWorkPlanDownTimeStart(String workPlanDownTimeStart) { this.workPlanDownTimeStart = workPlanDownTimeStart; }
public String getWorkPlanDownTimeEnd() {
return workPlanDownTimeEnd;
}
public void setWorkPlanDownTimeEnd(String workPlanDownTimeEnd) {
this.workPlanDownTimeEnd = workPlanDownTimeEnd;
}
//计划停机开始时间、结束时间
//实际停机开始时间、结束时间
public Date getActualDownStartTime() {
return actualDownStartTime;
}
public void setActualDownStartTime(Date actualDownStartTime) {
this.actualDownStartTime = actualDownStartTime;
}
@ -787,16 +574,36 @@ public class EquRepairWorkOrder extends BaseEntity {
public Date getActualDownEndTime() {
return actualDownEndTime;
}
public void setActualDownEndTime(Date actualDownEndTime) {
this.actualDownEndTime = actualDownEndTime;
}
//委外维修人员/委外维修原因 虚拟字段
//停机开始时间、结束时间
public String getWorkPlanTimeStart() { return workPlanTimeStart; }
public void setWorkPlanTimeStart(String workPlanTimeStart) { this.workPlanTimeStart = workPlanTimeStart; }
public String getWorkPlanTimeEnd() { return workPlanTimeEnd; }
public void setWorkPlanTimeEnd(String workPlanTimeEnd) { this.workPlanTimeEnd = workPlanTimeEnd; }
public String getFaultType() { return faultType; }
public void setFaultType(String faultType) { this.faultType = faultType; }
public String getEquipmentStatusDescription() { return equipmentStatusDescription; }
public void setEquipmentStatusDescription(String equipmentStatusDescription) { this.equipmentStatusDescription = equipmentStatusDescription; }
public String getRepairMeasures() { return repairMeasures; }
public void setRepairMeasures(String repairMeasures) { this.repairMeasures = repairMeasures; }
public String getFaultDownTime() { return faultDownTime; }
public void setFaultDownTime(String faultDownTime) { this.faultDownTime = faultDownTime; }
public Date getFaultStartTime() { return faultStartTime; }
public void setFaultStartTime(Date faultStartTime) { this.faultStartTime = faultStartTime; }
//委外
public void setOutSourceReason(String outSourceReason) {
this.outSourceReason = outSourceReason;
}
public String getOutSourceReason() {
return outSourceReason;
}
@ -804,7 +611,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setOutSourcePerson(String outSourcePerson) {
this.outSourcePerson = outSourcePerson;
}
public String getOutSourcePerson() {
return outSourcePerson;
}
@ -812,7 +618,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setWorkOutsourcingUnit(String workOutsourcingUnit) {
this.workOutsourcingUnit = workOutsourcingUnit;
}
public String getWorkOutsourcingUnit() {
return workOutsourcingUnit;
}
@ -820,7 +625,6 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setOutSourceConnection(String outSourceConnection) {
this.outSourceConnection = outSourceConnection;
}
public String getOutSourceConnection() {
return outSourceConnection;
}
@ -829,92 +633,26 @@ public class EquRepairWorkOrder extends BaseEntity {
public void setUserId(String userId) {
this.userId = userId;
}
public String getUserId() {
return userId;
}
//申领单
public List<EquSpareApply> getApplyList() {
return applyList;
}
public void setApplyList(List<EquSpareApply> applyList) {
this.applyList = applyList;
}
//实际停机开始时间、结束时间
public String getWorkPlanTimeStart() {
return workPlanTimeStart;
}
public void setWorkPlanTimeStart(String workPlanTimeStart) {
this.workPlanTimeStart = workPlanTimeStart;
}
public String getWorkPlanTimeEnd() {
return workPlanTimeEnd;
}
public void setWorkPlanTimeEnd(String workPlanTimeEnd) {
this.workPlanTimeEnd = workPlanTimeEnd;
}
public void setApplyList(List<EquSpareApply> applyList) { this.applyList = applyList; }
//图片文件
private String fileList;
private List<BaseFileData> files;
public String getFileList() { return fileList; }
public void setFileList(String fileList) { this.fileList = fileList; }
//图片文件
public String getFileList() {
return fileList;
}
public void setFileList(String fileList) {
this.fileList = fileList;
}
public List<BaseFileData> getFiles() {
return files;
}
public void setFiles(List<BaseFileData> files) {
this.files = files;
}
public List<BaseFileData> getFiles() { return files; }
public void setFiles(List<BaseFileData> files) { this.files = files; }
//标准列表
public List<EquOrderStandard> getStandardList() {
return standardList;
}
public void setStandardList(List<EquOrderStandard> standardList) {
this.standardList = standardList;
}
//故障类型
public String getFaultType() {
return faultType;
}
public void setFaultType(String faultType) {
this.faultType = faultType;
}
//设备状态描述
public String getEquipmentStatusDescription() {
return equipmentStatusDescription;
}
public void setEquipmentStatusDescription(String equipmentStatusDescription) {
this.equipmentStatusDescription = equipmentStatusDescription;
}
//维修措施
public String getRepairMeasures() {
return repairMeasures;
}
public void setRepairMeasures(String repairMeasures) {
this.repairMeasures = repairMeasures;
}
public List<EquOrderStandard> getStandardList() { return standardList; }
public void setStandardList(List<EquOrderStandard> standardList) { this.standardList = standardList; }
@Override
public String toString() {

@ -54,9 +54,11 @@ public interface DeviceInterfaceMapper {
//设备稳定性 MTBF设备平均故障间隔
List<EquOperation> getMTBFList(EquOperation equOperation);
//设备维修质量 MTTR
List<EquOperation> getMTTRList(EquOperation equOperation);
//设备完好率
EquOperation getEquipmentIntactRate(EquOperation equOperation);
List<EquOperation> getEquipmentIntactRate(EquOperation equOperation);
String getDeviceRefreshTime(EquOperationRecord equOperationRecord);
@ -77,4 +79,7 @@ public interface DeviceInterfaceMapper {
// 通过设备编码获取设备运行记录
Map<String, Double> selectSumEquipmentOperation(String equipmentCode);
//设备总数
String getTotalEquipment();
}

@ -28,7 +28,8 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
private DeviceInterfaceMapper deviceInterfaceMapper;
/**
*
*
*
*
* @return
*/
@ -51,80 +52,62 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
}
/**
*
* :/
* //*24
*
*
* :/
* /*24
* 11
*
* /
* @return
*/
@Override
@DS("#header.poolName")
public AjaxResult getEquipmentInfo(EquOperation equOperation) {
if (equOperation.getTimeDimension() == null) {
equOperation.setTimeDimension("yyyy");
if((equOperation.getStartTime() == null) && (equOperation.getEndTime() == null)){
//默认时间
if (equOperation.getTimeDimension() == null) {
equOperation.setTimeDimension("yyyy");
}
}
// 获取所有设备信息
List<IEquipmentVO> equipmentVOList = deviceInterfaceMapper.selectEquipmentVOList(equOperation);
return success(equipmentVOList);
}
/**
* TOP10
* /
*
*
* MTTR:/
*
*
* @return
*/
@Override
@DS("#header.poolName")
public AjaxResult getRepairQuantity(EquOperation equOperation) {
equOperation.setTimeDimension("yyyy");
// 获取维修工单中的设备列表
List<IEquipmentVO> equipmentVOList = deviceInterfaceMapper.selectEquipmentList(equOperation);
for (IEquipmentVO equipmentVO : equipmentVOList) {
// 通过该设备code获取设备维修记录(只获取开始时间、结束时间)
List<EquRepairWorkOrder> workOrderList = deviceInterfaceMapper.selectRepairRecordByEquipmentCode(equipmentVO.getEquipmentCode());
if (workOrderList.size() != 0) {
double runTime = 0;
for (EquRepairWorkOrder workOrder : workOrderList) {
// 维修时间差值
long diffTime = workOrder.getWorkEndTime().getTime() - workOrder.getWorkStartTime().getTime();
// 累加时间
runTime += diffTime;
}
// 计算维修质量(故障时间(小时)/故障次数)
Double rapairQuantity = runTime / 3600000 / workOrderList.size();
String douStr = String.format("%.2f", rapairQuantity);
equipmentVO.setRapairQuantity(douStr);
} else {
// 没有该记录则默认为0
equipmentVO.setRapairQuantity("0.00");
equOperation.setCreateTime(DateUtils.getNowDate());
if((equOperation.getStartTime() == null) && (equOperation.getEndTime() == null)){
if (equOperation.getTimeDimension() == null) {
equOperation.setTimeDimension("dd");
}
}
// 按照raparQuantity字段进行排序并使用subList获取前10个结果
List<IEquipmentVO> top10 = equipmentVOList.stream()
.sorted(Comparator.comparing(IEquipmentVO::getRapairQuantity).reversed())// 由正序改为 反转排序 倒序
.limit(10) // 限制结果数量为10 改为不限制结果数量
.collect(Collectors.toList()); //将结果收集到List中
return success(top10);
List<EquOperation> equipmentList = deviceInterfaceMapper.getMTTRList(equOperation);
return success(equipmentList);
}
/**
* -MTBF
* /
*
* MTBF/
*
*
*/
@Override
@DS("#header.poolName")
public AjaxResult getEquipmentStabilityList(EquOperation equOperation) {
//查询所有设备(设备停用的除外)
//判断查询年/月/日
equOperation.setCreateTime(DateUtils.getNowDate());
if (equOperation.getTimeDimension() == null) {
equOperation.setTimeDimension("dd");
if((equOperation.getStartTime() == null) && (equOperation.getEndTime() == null)){
if (equOperation.getTimeDimension() == null) {
equOperation.setTimeDimension("dd");
}
}
List<EquOperation> equipmentList = deviceInterfaceMapper.getMTBFList(equOperation);
return success(equipmentList);
@ -133,17 +116,32 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
/**
*
* -/
*
*/
@Override
@DS("#header.poolName")
public AjaxResult getEquipmentIntactRate(EquOperation equOperation) {
//查询所有设备(设备停用的除外)
EquOperation equipmentIntactRate = deviceInterfaceMapper.getEquipmentIntactRate(equOperation);
equOperation.setCreateTime(DateUtils.getNowDate());
if((equOperation.getStartTime() == null) && (equOperation.getEndTime() == null)){
if (equOperation.getTimeDimension() == null) {
equOperation.setTimeDimension("dd");
}
}
List<EquOperation> example = deviceInterfaceMapper.getEquipmentIntactRate(equOperation);
Integer fault = 0;
for(EquOperation equOperation1 :example){
fault = fault + Integer.valueOf(equOperation1.getFaultEquipment());
}
EquOperation equipmentIntactRate = new EquOperation();
equipmentIntactRate.setTotalEquipment(deviceInterfaceMapper.getTotalEquipment());
Double totalEquipment = new Double(equipmentIntactRate.getTotalEquipment());
Double operationEquipment = new Double(equipmentIntactRate.getOperationEquipment());
Double operationEquipment = new Double(Integer.valueOf(equipmentIntactRate.getTotalEquipment()) - fault);
Double intactRate = operationEquipment*100/totalEquipment;
String douStr = String.format("%.2f", intactRate);
equipmentIntactRate.setIntactRate(douStr);
equipmentIntactRate.setOperationEquipment(String.valueOf(operationEquipment));
equipmentIntactRate.setFaultEquipment(String.valueOf(fault));
return success(equipmentIntactRate);
}

@ -751,7 +751,7 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
@DS("#header.poolName")
public AjaxResult updateMaintenanceRecords(EquRepairWorkOrder equRepairWorkOrder) {
try {
//1.判断是否停机
////1.判断是否停机
EquRepairWorkOrder list = equRepairWorkOrderMapper.selectEquRepairWorkOrderByWorkId(equRepairWorkOrder.getWorkId());
if (list.getWorkDownMachine().equals("1")) {
//维修真正停机时间
@ -760,48 +760,58 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
//维修工单结束时间
equRepairWorkOrder.setWorkEndTime(DateUtils.getNowDate());
//2.计算维修工单用时
////2.计算维修工单用时 + 故障停机时间
if (list.getWorkStartTime() != null && equRepairWorkOrder.getWorkEndTime() != null) {
//2.1计算日期差值
////2.1计算维修日期差值
ZoneId zoneId = ZoneId.systemDefault();
LocalDateTime start = LocalDateTime.ofInstant(list.getWorkStartTime().toInstant(), zoneId);
LocalDateTime end = LocalDateTime.ofInstant(equRepairWorkOrder.getWorkEndTime().toInstant(), zoneId);
LocalDateTime tempDateTime = LocalDateTime.from(start);
LocalDateTime workStart = LocalDateTime.ofInstant(list.getWorkStartTime().toInstant(), zoneId);
LocalDateTime workEnd = LocalDateTime.ofInstant(equRepairWorkOrder.getWorkEndTime().toInstant(), zoneId);
LocalDateTime workDateTime = LocalDateTime.from(workStart);
// long years = tempDateTime.until(end, ChronoUnit.YEARS);
// tempDateTime = tempDateTime.plusYears(years);
// long months = tempDateTime.until(end, ChronoUnit.MONTHS);
// tempDateTime = tempDateTime.plusMonths(months);
// long days = tempDateTime.until(end, ChronoUnit.DAYS);
// tempDateTime = tempDateTime.plusDays(days);
double workHours = workDateTime.until(workEnd, ChronoUnit.HOURS);
double workMinutes = ((workDateTime.until(workEnd, ChronoUnit.MINUTES) * 1.0) % 60) / 60;
double workSeconds = ((workDateTime.until(workEnd, ChronoUnit.SECONDS) * 1.0) % 3600) / 3600;
double workHour = BigDecimal.valueOf(workHours + workMinutes + workSeconds).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
//塞入维修用时
equRepairWorkOrder.setWorkCostTime(String.valueOf(workHour)+"小时");
double hours = tempDateTime.until(end, ChronoUnit.HOURS);
// tempDateTime = tempDateTime.plusHours(hours);
double minutes = ((tempDateTime.until(end, ChronoUnit.MINUTES) * 1.0) % 60) / 60;
// tempDateTime = tempDateTime.plusMinutes(minutes);
double seconds = ((tempDateTime.until(end, ChronoUnit.SECONDS) * 1.0) % 3600) / 3600;
double hour = BigDecimal.valueOf(hours + minutes + seconds).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
////2.2 计算故障停机时间差值
//报修的故障时间 和 快速工单的故障开始时间
Date downStartTime = new Date();
if(list.getOrderBreakdownTime() != null){
downStartTime = list.getOrderBreakdownTime();
}else if(list.getFaultStartTime() != null){
downStartTime = list.getFaultStartTime();
}
LocalDateTime downStart = LocalDateTime.ofInstant(downStartTime.toInstant(), zoneId);
LocalDateTime downEnd = LocalDateTime.ofInstant(equRepairWorkOrder.getWorkEndTime().toInstant(), zoneId);
LocalDateTime downDateTime = LocalDateTime.from(downStart);
//2.2查询完好率报表
double downHours = downDateTime.until(downEnd, ChronoUnit.HOURS);
double downMinutes = ((downDateTime.until(downEnd, ChronoUnit.MINUTES) * 1.0) % 60) / 60;
double downSeconds = ((downDateTime.until(downEnd, ChronoUnit.SECONDS) * 1.0) % 3600) / 3600;
double downHour = BigDecimal.valueOf(downHours + downMinutes + downSeconds).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
equRepairWorkOrder.setFaultDownTime(String.valueOf(downHour)+"小时");
////2.2查询当日完好率报表
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String time = sdf.format(equRepairWorkOrder.getWorkEndTime());
EquOperation equOperation = equOperationMapper.selectEquipmentIntegrityRate(time, equRepairWorkOrder.getEquipmentCode());
//2.3修改完好率报表
////2.3修改完好率报表
if (equOperation != null) {
if (list.getWorkDownMachine().equals("1")) {
DecimalFormat df = new DecimalFormat("#.##");
//实际运行时间 = 实际运行时间 - 故障时间
double result = Double.parseDouble(equOperation.getActualOperationTime()) - hour;
//故障时间 = 原来的故障时间 + 这次的故障时间
double faultTime = Double.parseDouble(equOperation.getFaultTime()) + hour;
BigDecimal faultTimeBD = new BigDecimal(faultTime);// 故障时间
//实际运行时间 = 实际运行时间 - 故障停机时间
double result = Double.parseDouble(equOperation.getActualOperationTime()) - downHour;
//故障时间 = 原来的故障停机时间 + 这次的故障停机时间
double faultTime = Double.parseDouble(equOperation.getFaultTime()) + downHour;
BigDecimal faultTimeBD = new BigDecimal(faultTime);// 故障停机时间
BigDecimal operationTimeBD = new BigDecimal(equOperation.getOperationTime());//运行时间
equOperation.setActualOperationTime(String.valueOf(df.format(result)));//实际运行时间
equOperation.setFaultTime(String.valueOf(faultTime));//故障时间
equOperation.setFaultTime(String.valueOf(faultTime));//故障停机时间
equOperation.setFailureRate(faultTimeBD.multiply(new BigDecimal(100)).divide(operationTimeBD, 2, RoundingMode.HALF_UP).toString() + "%");
equOperation.setShutdownTimes(equOperation.getShutdownTimes() + 1);//停机次数加1
equOperation.setShutdownTimes(equOperation.getShutdownTimes() + 1);//故障停机次数加1
}
equOperation.setFailureTimes(equOperation.getFailureTimes() + 1);//故障次数加1
equOperation.setUpdateBy(SecurityUtils.getUsername());
@ -811,7 +821,6 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
}
////3.更新每一项点检/巡检检查项信息
//判空
if (StringUtils.isNotEmpty(equRepairWorkOrder.getDetailList())) {
List<EquOrder> checkLists = equRepairWorkOrder.getDetailList();
for (EquOrder checkList : checkLists) {
@ -852,7 +861,6 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
}
////4.新建申领单
//判空
if (StringUtils.isNotEmpty(equRepairWorkOrder.getApplyList())) {
List<EquSpareApply> equSpareApplies = equRepairWorkOrder.getApplyList();
for (EquSpareApply equSpareApply : equSpareApplies) {
@ -936,12 +944,11 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
// BigDecimal orderCost = BigDecimal.valueOf(Double.valueOf(equRepairWorkOrder.getWorkCost()));
// equRepairWorkOrder.setWorkCost(String.valueOf(sparePartsCost.add(orderCost)));
//7.修改设备状态 由维修中改为正常运行
////7.修改设备状态 由维修中改为正常运行
EquEquipment equEquipment = new EquEquipment();
equEquipment.setEquipmentCode(example.getEquipmentCode());
equEquipment.setEquipmentStatus("1");
equRepairWorkOrderMapper.updateEquipmentStatus(equEquipment);
return success("提交成功,维修完成!");
} catch (Exception e) {
return error("提交失败!");

@ -460,10 +460,9 @@ public class DeviceTaskServiceImpl implements IDeviceTaskService {
for (EquOperation operation : operationList) {
operation.setId(IdUtils.fastSimpleUUID());// id
operation.setFactoryCode(poolName.replace("ds_", ""));// 工厂
operation.setOperationTime(DateUtils.getTime());// 日期
operation.setOperationTime(operationTime);// 运行时间(默认运行时间)
operation.setActualOperationTime(operationTime);// 实际运行时间(默认运行时间)
operation.setCreateBy("jod");
operation.setCreateBy("job");
operation.setCreateTime(DateUtils.getNowDate());
}

@ -506,6 +506,7 @@ public class EquPlanServiceImpl implements IEquPlanService {
* @return
*/
private AjaxResult formatEquItemCommon(List<EquPlanEqu> equPlanEquList, String planType, String message) {
String equipmentList = "";
for (EquPlanEqu data : equPlanEquList) {
// 检查项名称临时对象
@ -552,10 +553,16 @@ public class EquPlanServiceImpl implements IEquPlanService {
data.setItemTempName(itemTempName.toString());//处理好的检查项名称置入检查项名称(用于前端信息回显)
} else {
// 未查询到对应检查项信息
return error(500, message);
equipmentList = equipmentList + '[' + data.getEquipmentCode() + "]";
}
}
return success(equPlanEquList);
if(!equipmentList.equals("")){
equipmentList = equipmentList + "设备未查询到对应检查项信息!";
message = equipmentList;
return error(500, message);
}else{
return success(equPlanEquList);
}
}
/**

@ -169,12 +169,15 @@ public class EquRepairWorkOrderServiceImpl implements IEquRepairWorkOrderService
@Override
@DS("#header.poolName")
public int updateEquRepairWorkOrder(EquRepairWorkOrder equRepairWorkOrder) {
Date date = DateUtils.getNowDate();
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String formattedDate = dateFormat.format(date);
//1.是否停机
if (equRepairWorkOrder.getWorkDownMachine().equals("0")) {
equRepairWorkOrder.setWorkPlanDownTime(null);
}
equRepairWorkOrder.setUpdateBy(SecurityUtils.getUsername());
equRepairWorkOrder.setUpdateTime(DateUtils.getNowDate());
equRepairWorkOrder.setUpdateTime(date);
//2.先删除每个维修工单对应图片,再新增照片
equRepairWorkOrderMapper.deleteBaseFileBySourceId(equRepairWorkOrder.getWorkId());
@ -236,7 +239,7 @@ public class EquRepairWorkOrderServiceImpl implements IEquRepairWorkOrderService
equRepairWorkOrderMapper.updateEquipmentStatus(equEquipment);
//5.2维修完成后 相应的设备完好率重新计算 小时计算 保留一位小数 实际故障时间 换算成小时
String hours = equRepairWorkOrder.getWorkCostTime().substring(0, equRepairWorkOrder.getWorkCostTime().length() - 2); //截掉后两位
String hours = equRepairWorkOrder.getFaultDownTime().substring(0, equRepairWorkOrder.getFaultDownTime().length() - 2); //截掉后两位
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String time = sdf.format(equRepairWorkOrder.getWorkEndTime());
EquOperation equOperation = equOperationMapper.selectEquipmentIntegrityRate(time, equRepairWorkOrder.getEquipmentCode());
@ -249,17 +252,40 @@ public class EquRepairWorkOrderServiceImpl implements IEquRepairWorkOrderService
//故障时间 = 原来的故障时间 + 这次的故障时间
double faultTime = Double.parseDouble(equOperation.getFaultTime()) + Double.parseDouble(hours);
BigDecimal faultTimeBD = new BigDecimal(faultTime);// 故障时间
BigDecimal operationTimeBD = new BigDecimal(equOperation.getOperationTime());// 运行时间
BigDecimal operationTimeBD = new BigDecimal(equOperation.getOperationTime());//运行时间
equOperation.setFaultTime(String.valueOf(faultTime));//故障时间
equOperation.setActualOperationTime(String.valueOf(df.format(result)));//实际运行时间
// 故障率计算(故障时间/运行时间)
//故障率计算(故障时间/运行时间)
equOperation.setFailureRate(faultTimeBD.multiply(new BigDecimal(100)).divide(operationTimeBD, 2, RoundingMode.HALF_UP).toString() + "%");
equOperation.setShutdownTimes(equOperation.getShutdownTimes() + 1);//停机次数加1
}
equOperation.setUpdateBy(SecurityUtils.getUsername());
equOperation.setUpdateTime(DateUtils.getNowDate());
//5.3更新
equOperation.setUpdateBy(SecurityUtils.getUsername());//更新人
equOperation.setUpdateTime(DateUtils.getNowDate());//更新时间
//故障次数增加,但是停机次数可能不增加
equOperation.setFailureTimes(equOperation.getFailureTimes() + 1);//故障次数加1
//取当天的
String GZMS = equOperation.getFailureDescription();
String GZYY = equOperation.getReasonAnalyze();
String GZCS = equOperation.getHandlingMethod();
if(GZMS != null){
equOperation.setFailureDescription(GZMS + formattedDate + ":"+ equRepairWorkOrder.getWorkFaultDesc() + ";");//故障描述
}else{
equOperation.setFailureDescription(formattedDate + ":"+ equRepairWorkOrder.getWorkFaultDesc() + ";");//故障描述
}
if(GZYY != null){
equOperation.setReasonAnalyze(GZYY + formattedDate + ":"+ equRepairWorkOrder.getWorkReason() + ";");//故障原因
}else{
equOperation.setReasonAnalyze(formattedDate + ":"+ equRepairWorkOrder.getWorkReason() + ";");//故障原因
}
if(GZCS != null){
equOperation.setHandlingMethod(GZCS + formattedDate + ":"+ equRepairWorkOrder.getRepairMeasures() + ";");//维修措施
}else{
equOperation.setHandlingMethod(formattedDate + ":"+ equRepairWorkOrder.getRepairMeasures() + ";");//维修措施
}
equOperationMapper.updateEquOperation(equOperation);
}
}

@ -177,8 +177,9 @@ public class EquSpotCheckServiceImpl implements IEquSpotCheckService {
equipmentList = equipmentList + "设备未查询到对应检查项信息!";
message = equipmentList;
return error(500, message);
}else{
return success(equPlanEquList);
}
return success(equPlanEquList);
}
}

@ -56,6 +56,7 @@
<if test="timeDimension == 'dd' ">and convert(char(10),eo.create_time,120) = convert(char(10),getdate(),120)</if>
<if test="timeDimension == 'mm' ">and month(eo.create_time) = month(getdate())</if>
<if test="timeDimension == 'yyyy' ">and year(eo.create_time) = year(getdate())</if>
<if test="startTime != null and endTime != null ">and eo.create_time between #{startTime} and #{endTime} </if>
AND eo.del_flag = '0'
AND be.del_flag = '0'
AND be.equipment_category = '0'
@ -101,38 +102,74 @@
<!--设备稳定性 MTBF 年月日-->
<select id="getMTBFList" parameterType="EquOperation" resultType="com.op.device.domain.EquOperation">
select
row_number() over (order by sum(
row_number() over (order by cast(
case
when eo.shutdown_times > 0 THEN cast(cast(eo.actual_operation_time as decimal(18,2))/eo.shutdown_times as
decimal(18,2))
when sum(eo.shutdown_times) > 0 THEN sum(cast(eo.actual_operation_time as decimal(18,2)))/sum(eo.shutdown_times)
else 0
end
) desc) as serialNumber,
as decimal(18,2)) desc) as serialNumber,
eo.equipment_code as equipmentCode,
eo.equipment_name as equipmentName,
cast(sum(
cast(
case
when eo.shutdown_times > 0 THEN cast(eo.actual_operation_time as decimal(18,2))/eo.shutdown_times
when sum(eo.shutdown_times) > 0 THEN sum(cast(eo.actual_operation_time as decimal(18,2)))/sum(eo.shutdown_times)
else 0
end
)/COUNT(equipment_code) as decimal(18,2))as mtbf
as decimal(18,2))as mtbf
from equ_operation eo
<where>
<if test="timeDimension == 'dd' ">and convert(char(10),eo.create_time,120) = convert(char(10),getdate(),120)</if>
<if test="timeDimension == 'mm' ">and month(eo.create_time) = month(getdate())</if>
<if test="timeDimension == 'yyyy' ">and year(eo.create_time) = year(getdate())</if>
<if test="startTime != null and endTime != null ">and eo.create_time between #{startTime} and #{endTime} </if>
</where>
GROUP BY equipment_code,equipment_name
</select>
<!--设备维修质量 MTTR 年月日-->
<select id="getMTTRList" parameterType="EquOperation" resultType="com.op.device.domain.EquOperation">
select
row_number() over (order by cast(
case
when sum(eo.shutdown_times) > 0 THEN sum(cast(eo.fault_time as decimal(18,2)))/sum(eo.shutdown_times)
else 0
end
as decimal(18,2)) desc) as serialNumber,
eo.equipment_code as equipmentCode,
eo.equipment_name as equipmentName,
cast(
case
when sum(eo.shutdown_times) > 0 THEN sum(cast(eo.fault_time as decimal(18,2)))/sum(eo.shutdown_times)
else 0
end
as decimal(18,2))as mttr
from equ_operation eo
<where>
<if test="timeDimension == 'dd' ">and convert(char(10),eo.create_time,120) = convert(char(10),getdate(),120)</if>
<if test="timeDimension == 'mm' ">and month(eo.create_time) = month(getdate())</if>
<if test="timeDimension == 'yyyy' ">and year(eo.create_time) = year(getdate())</if>
<if test="startTime != null and endTime != null ">and eo.create_time between #{startTime} and #{endTime} </if>
</where>
group by equipment_code,equipment_name
</select>
<!--完好设备占比-->
<select id="getEquipmentIntactRate" parameterType="EquOperation" resultType="com.op.device.domain.EquOperation">
SELECT
SUM(CASE WHEN equipment_status = '1' or equipment_status = '3' THEN 1 Else 0 END) AS operationEquipment,
SUM(CASE WHEN equipment_status = '0' or equipment_status = '2' THEN 1 Else 0 END) AS faultEquipment,
COUNT(*) AS totalEquipment
FROM base_equipment
WHERE del_flag = '0' AND status = '1'
select
case when (sum(cast(eo.fault_time as decimal(18,2)))/sum(cast(eo.operation_time as decimal(18,2)))) > 0.04 then 1 else 0 end as faultEquipment
from equ_operation eo
<where>
<if test="timeDimension == 'dd' ">and convert(char(10),eo.create_time,120) = convert(char(10),getdate(),120)</if>
<if test="timeDimension == 'mm' ">and month(eo.create_time) = month(getdate())</if>
<if test="timeDimension == 'yyyy' ">and year(eo.create_time) = year(getdate())</if>
<if test="startTime != null and endTime != null ">and eo.create_time between #{startTime} and #{endTime} </if>
</where>
group by eo.equipment_code,eo.equipment_name
</select>
<!--设备总数-->
<select id="getTotalEquipment" resultType="java.lang.String">
select count(*) from base_equipment be where be.del_flag = '0' and be.status = '1'
</select>
<select id="selectGroups" resultType="com.op.device.domain.vo.IEquFaultVO">

@ -83,7 +83,10 @@
</select>
<select id="selectAllEquipmentList" resultType="com.op.device.domain.vo.EquCheckItemVO">
select equipment_name AS 'equipmentName',equipment_code AS 'equipmentCode' from base_equipment where del_flag = '0' and equipment_category = '0'
select equipment_name AS 'equipmentName',equipment_code AS 'equipmentCode'
from base_equipment
where del_flag = '0'
and equipment_category != '1'
</select>
<select id="selectCheckItemByEquipmentCode" parameterType="String" resultMap="EquCheckItemResult">

@ -118,12 +118,10 @@
zx.equipment_name AS 'groupLine',
be.workshop_name AS 'workshop'
from base_equipment be
left join equ_bind_auxiliary_equipment bae
on bae.auxiliary_equipment_code = be.equipment_code
left join base_equipment zx
on bae.equipment_code = zx.equipment_code
left join equ_bind_auxiliary_equipment bae on bae.auxiliary_equipment_code = be.equipment_code
left join base_equipment zx on bae.equipment_code = zx.equipment_code
where be.del_flag = '0'
and be.equipment_category = '0'
and be.equipment_category != '1'
</select>
<select id="checkInsertOperation" resultType="java.lang.Integer">

@ -43,6 +43,8 @@
<result property="faultType" column="fault_type"/>
<result property="equipmentStatusDescription" column="equipment_status_description"/>
<result property="repairMeasures" column="repair_measures"/>
<result property="faultDownTime" column="fault_down_time"/>
<result property="faultStartTime" column="fault_start_time"/>
<!--设备-->
<result property="equipmentName" column="equipment_name"/>
@ -88,7 +90,7 @@
</sql>
<sql id="selectEquRepairWorkOrderVo">
select work_id, order_id, order_code, work_code,work_handle, work_plan_time, work_plan_down_time, order_relevance, work_person, work_team, work_outsource, work_down_machine, equipment_code, work_reason, work_fault_desc, work_start_time,work_end_time,work_cost_time, work_cost, work_status,out_work_id, out_work_code, attr1, attr2, attr3, create_by, create_time, update_time, update_by, del_flag, factory_code ,fault_type,equipment_status_description,repair_measures from equ_repair_work_order
select work_id, order_id, order_code, work_code,work_handle, work_plan_time, work_plan_down_time, order_relevance, work_person, work_team, work_outsource, work_down_machine, equipment_code, work_reason, work_fault_desc, work_start_time,work_end_time,work_cost_time, work_cost, work_status,out_work_id, out_work_code, attr1, attr2, attr3, create_by, create_time, update_time, update_by, del_flag, factory_code , fault_type , equipment_status_description , repair_measures , fault_down_time , fault_start_time from equ_repair_work_order
</sql>
<select id="selectEquRepairWorkOrderList" parameterType="EquRepairWorkOrder" resultMap="EquRepairWorkOrderResult">
@ -130,6 +132,8 @@
erwo.fault_type,
erwo.equipment_status_description,
erwo.repair_measures,
erwo.fault_down_time,
erwo.fault_start_time,
be.equipment_name,
et.team_name,
et.team_person
@ -185,7 +189,7 @@
ORDER BY erwo.create_time DESC
</select>
<!-- 除了待维修-->
<!--除了待维修-->
<select id="selectRepairWorkOrderList" parameterType="EquRepairWorkOrder" resultMap="EquRepairWorkOrderResult">
select
erwo.work_id,
@ -225,6 +229,8 @@
erwo.fault_type,
erwo.equipment_status_description,
erwo.repair_measures,
erwo.fault_down_time,
erwo.fault_start_time,
be.equipment_name,
et.team_name,
et.team_person
@ -275,6 +281,8 @@
erwo.fault_type,
erwo.equipment_status_description,
erwo.repair_measures,
erwo.fault_down_time,
erwo.fault_start_time,
be.equipment_name,
be.equipment_spec,
be.equipment_type_name,
@ -341,6 +349,8 @@
<if test="faultType != null">fault_type,</if>
<if test="equipmentStatusDescription != null">equipment_status_description,</if>
<if test="repairMeasures != null">repair_measures,</if>
<if test="faultDownTime != null">fault_down_time,</if>
<if test="faultStartTime != null">fault_start_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="workId != null">#{workId},</if>
@ -378,8 +388,10 @@
<if test="delFlag != null">#{delFlag},</if>
<if test="factoryCode != null">#{factoryCode},</if>
<if test="faultType != null">#{fault_type},</if>
<if test="equipmentStatusDescription != null">equipment_status_description,</if>
<if test="repairMeasures != null">repair_measures,</if>
<if test="equipmentStatusDescription != null">#{equipmentStatusDescription},</if>
<if test="repairMeasures != null">#{repairMeasures},</if>
<if test="faultDownTime != null">#{faultDownTime},</if>
<if test="faultStartTime != null">#{faultStartTime},</if>
</trim>
</insert>
@ -420,10 +432,10 @@
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
<if test="faultType != null">fault_type = #{faultType},</if>
<if test="equipmentStatusDescription != null">equipment_status_description =
#{equipmentStatusDescription},
</if>
<if test="equipmentStatusDescription != null">equipment_status_description = #{equipmentStatusDescription},</if>
<if test="repairMeasures != null">repair_measures = #{repairMeasures},</if>
<if test="faultDownTime != null">fault_down_time = #{faultDownTime},</if>
<if test="faultStartTime != null">fault_start_time = #{faultStartTime},</if>
</trim>
where work_id = #{workId}
and del_flag = '0'
@ -485,10 +497,10 @@
where source_id = #{sourceId}
</select>
<select id="selectEquRepairWorkOrderByWorkCode" parameterType="EquRepairWorkOrder"
resultMap="EquRepairWorkOrderResult">
<select id="selectEquRepairWorkOrderByWorkCode" parameterType="EquRepairWorkOrder" resultMap="EquRepairWorkOrderResult">
<include refid="selectEquRepairWorkOrderVo"/>
where work_code = #{workCode} and del_flag = '0'
where work_code = #{workCode}
and del_flag = '0'
</select>
<insert id="insertBaseFileBatch">

@ -34,8 +34,9 @@ public class MesBoardController extends BaseController {
return iMesBoradService.getLineList(mesBoard);
}
/**计划产量、当前产量、15天的产量趋势图**/
@PostMapping("/getProduction15Days")
public AjaxResult getProduction15Days(BoardDTO mesBoard) {
public AjaxResult getProduction15Days(@RequestBody BoardDTO mesBoard) {
if (StringUtils.isBlank(mesBoard.getFactoryCode())) {
return error("[facotryCode] 不能为空");
}
@ -44,4 +45,16 @@ public class MesBoardController extends BaseController {
}
return success(iMesBoradService.getProduction15Days(mesBoard));
}
/**产线信息**/
@PostMapping("/getProductionLineInfo")
public AjaxResult getProductionLineInfo(@RequestBody BoardDTO mesBoard) {
if (StringUtils.isBlank(mesBoard.getFactoryCode())) {
return error("[factoryCode] 不能为空");
}
if (StringUtils.isBlank(mesBoard.getEquCode())) {
return error("[equCode] 不能为空");
}
return success(iMesBoradService.getProductionLineInfo(mesBoard));
}
}

@ -202,6 +202,8 @@ public class MesReportWork extends BaseEntity {
private Long workTimes;
private String workCenter;
private String shiftId;
@Excel(name = "班次")
private String shiftName;
private String keywords;
private String workshopName;
//凭证
@ -211,6 +213,24 @@ public class MesReportWork extends BaseEntity {
private String sapCode;
private String remark;
public String getShiftName() {
return shiftName;
}
public void setShiftName(String shiftName) {
this.shiftName = shiftName;
}
@Override
public String getRemark() {
return remark;
}
@Override
public void setRemark(String remark) {
this.remark = remark;
}
public String getSapCode() {
return sapCode;
}

@ -77,6 +77,8 @@ public interface MesMapper {
List<BoardDTO> getLineList(BoardDTO boardDTO);
@MapKey("dayStr")
@MapKey("productDate")
Map<String, MesReportWork> getProduction15Days(BoardDTO boardDTO);
BoardDTO getWorkOrder(BoardDTO boardDTO);
}

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

@ -4,6 +4,7 @@ import com.op.common.core.web.domain.AjaxResult;
import com.op.system.api.domain.dto.BoardDTO;
import java.util.List;
import java.util.Map;
public interface IMesBoradService {
public AjaxResult finishProductBoard(BoardDTO boardDTO);
@ -11,4 +12,5 @@ public interface IMesBoradService {
public List<BoardDTO> getLineList(BoardDTO boardDTO);
public BoardDTO getProduction15Days(BoardDTO mesBoard);
public Map<String,BoardDTO> getProductionLineInfo(BoardDTO mesBoard);
}

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

@ -9,6 +9,7 @@ import com.op.mes.domain.MesReportWork;
import com.op.mes.mapper.MesMapper;
import com.op.mes.service.IMesBoradService;
import com.op.system.api.domain.dto.BoardDTO;
import com.op.system.api.domain.mes.ProOrderWorkorderDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -85,6 +86,19 @@ public class MesBoradServiceImpl implements IMesBoradService {
return dto;
}
@Override
public Map<String,BoardDTO> getProductionLineInfo(BoardDTO boardDTO) {
DynamicDataSourceContextHolder.push(boardDTO.getFactoryCode());
Map<String,BoardDTO> dtoMap = new HashMap<>();
//当前工单信息
BoardDTO workOrder = mesMapper.getWorkOrder(boardDTO);
dtoMap.put("workOrder",workOrder);
return dtoMap;
}
//获取当前日期前几天
private List<String> getDays(int dayNum){
List<String> days = new ArrayList<>();
@ -102,6 +116,8 @@ public class MesBoradServiceImpl implements IMesBoradService {
return days;
}
public static void main(String[] args){
List<String> days = new ArrayList<>();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");

@ -218,7 +218,7 @@ public class MesReportWorkConsumeServiceImpl implements IMesReportWorkConsumeSer
/**修改sap物料损耗组成**/
R updateBomsSap = this.updateAttr1BomsSap(workOrders);
if(updateBomsSap.getCode()== 500){
throw new IllegalArgumentException("修改组件异常");
throw new IllegalArgumentException("SAP修改组件异常:"+updateBomsSap.getMsg());
}
return 1;

@ -143,15 +143,6 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService {
@DS("#header.poolName")
public List<MesReportWork> getReportWorkHzList(MesReportWork mesReportWork) {
List<MesReportWork> dtos = mesReportWorkMapper.getReportWorkHzList(mesReportWork);
// for(MesReportWork dto:dtos){
// if("1".equals(dto.getUploadStatus())){
// dto.setUploadStatus("sap报工成功");
// }else if("2".equals(dto.getUploadStatus())){
// dto.setUploadStatus("sap报工失败");
// }else if("0".equals(dto.getUploadStatus())){
// dto.setUploadStatus("待报工sap");
// }
// }
return dtos;
}

@ -305,4 +305,19 @@
and CONVERT(DATE, pow.product_date) BETWEEN DATEADD(DAY, -15, CONVERT(DATE, GETDATE())) AND CONVERT(DATE, GETDATE())
group by pow.product_date,pow.quantity_split
</select>
<select id="getWorkOrder" resultType="com.op.system.api.domain.dto.BoardDTO">
select
pow.workorder_name equCode,
be.equipment_name equName,
pow.product_code productCode,
pow.product_name productName,
pow.workorder_code_sap workorderCodeSap,
pow.quantity_split totalNum,
pow.unit
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'
where pow.workorder_name = #{equCode} and pow.status = 'w2'
and CONVERT ( DATE, pow.product_date ) = CONVERT ( DATE, GETDATE( ) )
and pow.parent_order = '0'
</select>
</mapper>

@ -486,7 +486,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
pow.workorder_code_sap workorderCodeSap,
pow.product_date productDate,
mrw.uploadTime,
mrw.uploadMsg
mrw.uploadMsg,
pow.shift_id shiftId,
bst.Shift_Desc shiftName
from (
select workorder_code workorderCode,
product_code productCode,
@ -514,6 +516,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
,upload_time,upload_msg
) mrw
left join pro_order_workorder pow on mrw.workorderCode = pow.workorder_code
left join base_shifts_t bst on bst.Shift_Id =pow.shift_id
<where>
pow.del_flag = '0'
<if test="keywords != null and keywords != ''">
@ -549,7 +552,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test='parentOrder!="0"'>
and mrw.parent_order = #{workorderCode}
</if>
order by mrw.end_report
order by mrw.batch
</select>
<select id="getPrepareList" resultType="com.op.mes.domain.MesPrepareDetail">
select
@ -596,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 base_equipment equ on equ.equipment_code = ow.workorder_name
</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
mrw.machine_name,

@ -201,5 +201,7 @@ public interface ProOrderWorkorderMapper {
List<ProOrderWorkorder> getUnSplitOrder(@Param("orderIds") String[] orderIds);
ProOrderWorkorder selectSonOrder(String parentOrder);
List<ProOrderWorkorder> getProductOrders(@Param("orderIds") String[] orderIds);
}

@ -1123,11 +1123,13 @@ public class ProOrderServiceImpl implements IProOrderService {
}
//完全拆分已经存在工单可以进行订单关闭的数据
List<ProOrderWorkorder> checkWorkOrders = proOrderWorkorderMapper.getWorkOrderByOrders(orderIds);
if(checkWorkOrders.size() != orderIds.length){
List<ProOrderWorkorder> productWorkOrders = proOrderWorkorderMapper.getProductOrders(orderIds);
if(!CollectionUtils.isEmpty(productWorkOrders)){
return 2;
}
List<ProOrderWorkorder> checkWorkOrders = proOrderWorkorderMapper.getWorkOrderByOrders(orderIds);
for(ProOrderWorkorder workorder:checkWorkOrders){
//要删除的工单id们
List<String> delteIds = new ArrayList<>();

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

@ -571,6 +571,16 @@
where po.parent_order = #{parentOrder}
and po.del_flag = '0'
</select>
<select id="getProductOrders" resultType="com.op.plan.domain.ProOrderWorkorder">
select workorder_code workorderCode,status
from pro_order_workorder
where order_id in
<foreach item="orderId" collection="orderIds" open="(" separator="," close=")">
#{orderId}
</foreach>
and del_flag = '0'
and status in('w2','w3')
</select>
<insert id="createPrepareDetails">
insert into mes_prepare_detail

@ -77,8 +77,7 @@ public class QcCheckProjectController extends BaseController {
ExcelUtil<QcCheckProject> util = new ExcelUtil<QcCheckProject>(QcCheckProject.class);
List<QcCheckProject> projectList = util.importExcel(file.getInputStream());
String operName = SecurityUtils.getUsername();
String message = qcCheckProjectService.importCheckProject(projectList, updateSupport, operName);
return success(message);
return qcCheckProjectService.importCheckProject(projectList, updateSupport, operName);
}
/**

@ -0,0 +1,137 @@
package com.op.quality.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.op.common.log.annotation.Log;
import com.op.common.log.enums.BusinessType;
import com.op.common.security.annotation.RequiresPermissions;
import com.op.quality.domain.QcCheckTaskDefect;
import com.op.quality.service.IQcCheckTaskDefectService;
import com.op.common.core.web.controller.BaseController;
import com.op.common.core.web.domain.AjaxResult;
import com.op.common.core.utils.poi.ExcelUtil;
import com.op.common.core.web.page.TableDataInfo;
/**
* --Controller
*
* @author Open Platform
* @date 2024-03-28
*/
@RestController
@RequestMapping("/qcCheckTaskDefect")
public class QcCheckTaskDefectController extends BaseController {
@Autowired
private IQcCheckTaskDefectService qcCheckTaskDefectService;
/**
* --
*/
@RequiresPermissions("quality:qcCheckTaskDefect:list")
@GetMapping("/list")
public TableDataInfo list(QcCheckTaskDefect qcCheckTaskDefect) {
startPage();
List<QcCheckTaskDefect> list = qcCheckTaskDefectService.selectQcCheckTaskDefectList(qcCheckTaskDefect);
return getDataTable(list);
}
/**
* --
*/
@RequiresPermissions("quality:qcCheckTaskDefect:export")
@Log(title = "来料检验任务--不良数量", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, QcCheckTaskDefect qcCheckTaskDefect) {
List<QcCheckTaskDefect> list = qcCheckTaskDefectService.selectQcCheckTaskDefectList(qcCheckTaskDefect);
ExcelUtil<QcCheckTaskDefect> util = new ExcelUtil<QcCheckTaskDefect>(QcCheckTaskDefect. class);
util.exportExcel(response, list, "来料检验任务--不良数量数据");
}
/**
* --
*/
@RequiresPermissions("quality:qcCheckTaskDefect:query")
@GetMapping(value = "/{recordId}")
public AjaxResult getInfo(@PathVariable("recordId") String recordId) {
return success(qcCheckTaskDefectService.selectQcCheckTaskDefectByRecordId(recordId));
}
/**
* --
*/
@RequiresPermissions("quality:qcCheckTaskDefect:add")
@Log(title = "来料检验任务--不良数量", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody QcCheckTaskDefect qcCheckTaskDefect) {
return toAjax(qcCheckTaskDefectService.insertQcCheckTaskDefect(qcCheckTaskDefect));
}
/**
* --
*/
@RequiresPermissions("quality:qcCheckTaskDefect:edit")
@Log(title = "来料检验任务--不良数量", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody QcCheckTaskDefect qcCheckTaskDefect) {
return toAjax(qcCheckTaskDefectService.updateQcCheckTaskDefect(qcCheckTaskDefect));
}
/**
* --
*/
@RequiresPermissions("quality:qcCheckTaskDefect:remove")
@Log(title = "来料检验任务--不良数量", businessType = BusinessType.DELETE)
@DeleteMapping("/{recordIds}")
public AjaxResult remove(@PathVariable String[] recordIds) {
return toAjax(qcCheckTaskDefectService.deleteQcCheckTaskDefectByRecordIds(recordIds));
}
/**
* PC
*/
@GetMapping("/getDefectValue/{belongToDetail}")
public TableDataInfo getDefectValue(@PathVariable String belongToDetail) {
List<QcCheckTaskDefect> list = qcCheckTaskDefectService.getDefectListByBelongToDetail(belongToDetail);
return getDataTable(list);
}
/**
* PC
*/
@PostMapping("/commitDefectValue")
public AjaxResult commitDefectValue(@RequestBody List<QcCheckTaskDefect> checkTaskDefects) {
if (CollectionUtils.isEmpty(checkTaskDefects)) {
return error("操作失败,不良数据为空");
}else {
return toAjax(qcCheckTaskDefectService.commitDefectValue(checkTaskDefects));
}
}
/**
* PC
*/
@PutMapping("/updateDefectValue")
public AjaxResult updateDefectValue(@RequestBody List<QcCheckTaskDefect> checkTaskDefects) {
if (CollectionUtils.isEmpty(checkTaskDefects)) {
return error("操作失败,不良数据为空");
}else {
return toAjax(qcCheckTaskDefectService.updateDefectValue(checkTaskDefects));
}
}
}

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

@ -44,6 +44,12 @@ public class QcMaterialGroupController extends BaseController {
List<QcMaterialGroup> list = qcMaterialGroupService.selectQcMaterialGroupList(qcMaterialGroup);
return getDataTable(list);
}
@GetMapping("/getOriginalGroupList")
public TableDataInfo getOriginalGroupList(QcMaterialGroup qcMaterialGroup) {
List<QcMaterialGroup> list = qcMaterialGroupService.getOriginalGroupList(qcMaterialGroup);
return getDataTable(list);
}
/**
*

@ -34,7 +34,7 @@ public class QcCheckProject extends BaseEntity {
/**
*
*/
@Excel(name = "检验规则属性")
@Excel(name = "检验规则属性", readConverterExp = "0=定性,1=定量")
private String propertyCode;
/**
@ -80,6 +80,8 @@ public class QcCheckProject extends BaseEntity {
private String defectLevel;
@Excel(name = "检验方案类型")
private String projectType;
@Excel(name = "排序")
private Integer sort;
private String materialCode;
private String typeCode;
private String groupId;
@ -243,6 +245,14 @@ public class QcCheckProject extends BaseEntity {
this.serialNumber = serialNumber;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

@ -185,6 +185,15 @@ public class QcCheckReportIncome extends BaseEntity {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date confirmTime;
private Boolean myself;
private String shiftId;
public String getShiftId() {
return shiftId;
}
public void setShiftId(String shiftId) {
this.shiftId = shiftId;
}
public Boolean getMyself() {
return myself;

@ -88,6 +88,8 @@ public class QcCheckTaskDefect extends BaseEntity {
@Excel(name = "不合格数量")
private BigDecimal noOkQuality;
private String belongTodetail;
private String defectCodes;
private String defectNames;
private String defectQualitys;
@ -220,6 +222,14 @@ public class QcCheckTaskDefect extends BaseEntity {
this.noOkQuality = noOkQuality;
}
public String getBelongTodetail() {
return belongTodetail;
}
public void setBelongTodetail(String belongTodetail) {
this.belongTodetail = belongTodetail;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

@ -205,6 +205,15 @@ public class QcCheckTaskProduce extends BaseEntity {
private String confirm;
private String confirmRemark;
private String confirmTime;
private String shiftId;
public String getShiftId() {
return shiftId;
}
public void setShiftId(String shiftId) {
this.shiftId = shiftId;
}
public String getConfirm() {
return confirm;

@ -28,6 +28,11 @@ public class QcMaterialGroup extends BaseEntity {
*/
@Excel(name = "物料组名称")
private String groupName;
/**
*
*/
@Excel(name = "物料组名称")
private String groupCode;
/**
* 1
@ -116,6 +121,14 @@ public class QcMaterialGroup extends BaseEntity {
this.children = children;
}
public String getGroupCode() {
return groupCode;
}
public void setGroupCode(String groupCode) {
this.groupCode = groupCode;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

@ -24,7 +24,8 @@ public class QcMaterialGroupDetail extends BaseEntity {
*/
@Excel(name = "物料组id")
private String groupId;
//物料组编码
private String groupCode;
/**
*
*/
@ -54,6 +55,14 @@ public class QcMaterialGroupDetail extends BaseEntity {
*/
private String delFlag;
public String getGroupCode() {
return groupCode;
}
public void setGroupCode(String groupCode) {
this.groupCode = groupCode;
}
public void setId(String id) {
this.id = id;
}

@ -18,7 +18,7 @@ public class QcProjectType extends BaseEntity {
* id
*/
private String id;
private String groupId;
/**
*
*/
@ -54,6 +54,33 @@ public class QcProjectType extends BaseEntity {
@Excel(name = "版本")
private String version;
private String productGroupName;
private String productGroup;
public String getProductGroupName() {
return productGroupName;
}
public String getGroupId() {
return groupId;
}
public void setGroupId(String groupId) {
this.groupId = groupId;
}
public void setProductGroupName(String productGroupName) {
this.productGroupName = productGroupName;
}
public String getProductGroup() {
return productGroup;
}
public void setProductGroup(String productGroup) {
this.productGroup = productGroup;
}
public void setId(String id) {
this.id = id;
}

@ -41,7 +41,7 @@ public class QcStaticTable extends BaseEntity {
private String typeCode;
private String checkResult;
private String noOkBatchRate;
private String shiftId;
private String ymArrayStart;
private String ymArrayEnd;
private List<String> legendData;
@ -106,6 +106,14 @@ public class QcStaticTable extends BaseEntity {
private List<HashMap> details;
private String[] projectNoArray;
public String getShiftId() {
return shiftId;
}
public void setShiftId(String shiftId) {
this.shiftId = shiftId;
}
public String[] getProjectNoArray() {
return projectNoArray;
}

@ -69,4 +69,7 @@ public interface QcCheckTaskDefectMapper {
public List<QcCheckTaskDefect> selectDefectByBelongTo(String belongTo);
@MapKey("belongToDetail")
public Map<String, QcCheckTaskDefect> getDefectMap(QcCheckTaskDetail qcCheckTaskDetail);
public List<QcCheckTaskDefect> getDefectListByBelongToDetail(String belongToDetail);
}

@ -82,4 +82,6 @@ public interface QcCheckTypeProjectMapper {
int insertQcCheckTypeProjects(@Param("list") List<QcCheckTypeProject> typeProjects);
List<QcProjectType> getProjectOptions(QcCheckProject qcCheckProject);
QcProjectType getProductGroup(String materialCode);
}

@ -29,6 +29,8 @@ public interface QcMaterialGroupMapper {
*/
public List<QcMaterialGroup> selectQcMaterialGroupList(QcMaterialGroup qcMaterialGroup);
public List<QcMaterialGroup> getOriginalGroupList(QcMaterialGroup qcMaterialGroup);
/**
*
*

@ -51,6 +51,8 @@ public interface QcStaticTableMapper {
@MapKey("ymdms")
Map<String, QcStaticTable> getProjectDetail(QcStaticTable qcStaticTable);
@MapKey("ymdms")
Map<String, QcStaticTable> getProjectDetailNight(QcStaticTable qcStaticTable);
List<String> getBatchnos(String orderNo);

@ -2,6 +2,7 @@ package com.op.quality.service;
import java.util.List;
import com.op.common.core.web.domain.AjaxResult;
import com.op.quality.domain.QcCheckProject;
/**
@ -64,5 +65,5 @@ public interface IQcCheckProjectService {
*
* @return
*/
public String importCheckProject(List<QcCheckProject> projectList, Boolean isUpdateSupport, String operName);
public AjaxResult importCheckProject(List<QcCheckProject> projectList, Boolean isUpdateSupport, String operName);
}

@ -62,4 +62,10 @@ public interface IQcCheckTaskDefectService {
public int deleteQcCheckTaskDefectByBelongTo(String belongTo);
public List<QcCheckTaskDefect> selectDefectByBelongTo(String belongTo);
public int commitDefectValue(List<QcCheckTaskDefect> qcCheckTaskDefect);
public int updateDefectValue(List<QcCheckTaskDefect> qcCheckTaskDefects);
public List<QcCheckTaskDefect> getDefectListByBelongToDetail(String belongToDetail);
}

@ -22,6 +22,13 @@ public interface IQcMaterialGroupService {
*/
public QcMaterialGroup selectQcMaterialGroupById(String id);
/**
*
* @param qcMaterialGroup
* @return
*/
public List<QcMaterialGroup> getOriginalGroupList(QcMaterialGroup qcMaterialGroup);
/**
*
*

@ -1,6 +1,7 @@
package com.op.quality.service.impl;
import java.util.List;
import java.util.Optional;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.exception.ServiceException;
@ -8,7 +9,10 @@ import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.StringUtils;
import com.op.common.core.utils.bean.BeanValidators;
import com.op.common.core.utils.uuid.IdUtils;
import com.op.common.core.web.domain.AjaxResult;
import com.op.common.security.utils.SecurityUtils;
import com.op.quality.domain.QcProjectType;
import com.op.quality.mapper.QcProjectTypeMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -24,6 +28,9 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Validator;
import static com.op.common.core.web.domain.AjaxResult.error;
import static com.op.common.core.web.domain.AjaxResult.success;
/**
* Service
*
@ -40,6 +47,9 @@ public class QcCheckProjectServiceImpl implements IQcCheckProjectService {
@Autowired
protected Validator validator;
@Autowired
private QcProjectTypeMapper qcProjectTypeMapper;
/**
*
*
@ -127,7 +137,7 @@ public class QcCheckProjectServiceImpl implements IQcCheckProjectService {
@Override
@DS("#header.poolName")
public String importCheckProject(List<QcCheckProject> projectList, Boolean isUpdateSupport, String operName) {
public AjaxResult importCheckProject(List<QcCheckProject> projectList, Boolean isUpdateSupport, String operName) {
if (CollectionUtils.isEmpty(projectList)) {
throw new ServiceException("导入的检测项目数据为空!");
}
@ -139,44 +149,49 @@ public class QcCheckProjectServiceImpl implements IQcCheckProjectService {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String key = "#header.poolName";
String factoryCode = request.getHeader(key.substring(8)).replace("ds_", "");
for (QcCheckProject project : projectList) {
try {
QcCheckProject pro = qcCheckProjectMapper.selectCheckProjectByRuleName(project.getRuleName(), project.getProjectType());
if (ObjectUtils.isEmpty(pro)) {
BeanValidators.validateWithException(validator, project);
project.setId(IdUtils.fastSimpleUUID());
project.setCreateTime(DateUtils.getNowDate());
project.setCreateBy(operName);
project.setFactoryCode(factoryCode);
qcCheckProjectMapper.insertQcCheckProject(project);
successNum++;
successMsg.append("<br/>" + successNum + "。检测项目" + project.getRuleName() + "导入成功");
} else if (isUpdateSupport) {
BeanValidators.validateWithException(validator, project);
project.setId(pro.getId());
project.setUpdateTime(DateUtils.getNowDate());
project.setUpdateBy(operName);
qcCheckProjectMapper.updateQcCheckProject(project);
successNum++;
successMsg.append("<br/>" + successNum + "。检测项目[" + project.getRuleName() + "]更新成功");
} else {
//校验数据
AjaxResult checkResult = checkImportProject(projectList);
if (checkResult.isSuccess()) {
for (QcCheckProject project : projectList) {
try {
QcCheckProject pro = qcCheckProjectMapper.selectCheckProjectByRuleName(project.getRuleName(), project.getProjectType());
if (ObjectUtils.isEmpty(pro)) {
BeanValidators.validateWithException(validator, project);
project.setId(IdUtils.fastSimpleUUID());
project.setCreateTime(DateUtils.getNowDate());
project.setCreateBy(operName);
project.setFactoryCode(factoryCode);
qcCheckProjectMapper.insertQcCheckProject(project);
successNum++;
successMsg.append("<br/>" + successNum + "。检测项目" + project.getRuleName() + "导入成功");
} else if (isUpdateSupport) {
BeanValidators.validateWithException(validator, project);
project.setId(pro.getId());
project.setUpdateTime(DateUtils.getNowDate());
project.setUpdateBy(operName);
qcCheckProjectMapper.updateQcCheckProject(project);
successNum++;
successMsg.append("<br/>" + successNum + "。检测项目[" + project.getRuleName() + "]更新成功");
} else {
failproNum++;
failproMsg.append("<br/>" + failproNum + "。检测项目[" + project.getRuleName() + "]已存在");
}
} catch (Exception e) {
failproNum++;
failproMsg.append("<br/>" + failproNum + "。检测项目[" + project.getRuleName() + "]已存在");
String msg = "<br/>" + failproNum + "、检测项目[" + project.getRuleName() + "]导入失败";
failproMsg.append(msg + e.getMessage());
log.error(msg, e);
}
} catch (Exception e) {
failproNum++;
String msg = "<br/>" + failproNum + "、检测项目[" + project.getRuleName() + "]导入失败";
failproMsg.append(msg + e.getMessage());
log.error(msg, e);
}
if (failproNum > 0) {
failproMsg.insert(0, "很抱歉,导入失败!共" + failproNum + " 条数据格式不正确,错误如下:");
throw new ServiceException(failproMsg.toString());
} else {
successMsg.insert(0, "恭喜您,数据已全部导入成功! 共" + successNum + " 条,数据如下:");
}
return success(successMsg.toString());
}
if (failproNum > 0) {
failproMsg.insert(0, "很抱歉,导入失败!共" + failproNum + " 条数据格式不正确,错误如下:");
throw new ServiceException(failproMsg.toString());
} else {
successMsg.insert(0, "恭喜您,数据已全部导入成功! 共" + successNum + " 条,数据如下:");
}
return successMsg.toString();
return checkResult;
}
private String getOrderNum() {
@ -187,4 +202,53 @@ public class QcCheckProjectServiceImpl implements IQcCheckProjectService {
orderNum = now + "0" + checkProject.getSerialNumber();
return orderNum;
}
public AjaxResult checkImportProject(List<QcCheckProject> qcCheckProjectList) {
if (CollectionUtils.isEmpty(qcCheckProjectList)) {
return error(500,"导入的订单信息不能为空!信息导入失败");
}
for (QcCheckProject project : qcCheckProjectList) {
if (StringUtils.isEmpty(project.getOrderNum())) {
return error(500,"检验规则编号不能为空,信息导入失败,请检查是否存在空数据项");
}
if (StringUtils.isEmpty(project.getRuleName())) {
return error(500,"检验规则名称不能为空,信息导入失败");
}
if (StringUtils.isEmpty(project.getPropertyCode())) {
return error(500,"检验规则属性不能为空,信息导入失败");
}
if (StringUtils.isEmpty(project.getProjectType())) {
return error(500,"检验方案类型不能为空,信息导入失败");
}else {
boolean flag = typeConverter(project);
if (!flag) {
String ruleName = project.getRuleName();
return error(500,"检验规则名称:"+ ruleName +"检验方案类型不规范,信息导入失败");
}
}
if (project.getSort() == null) {
return error(500,"排序不能为空,信息导入失败");
}
}
return success();
}
/**
*
*/
public boolean typeConverter(QcCheckProject project) {
String projectType = project.getProjectType();
List<QcProjectType> projectTypes = qcProjectTypeMapper.selectQcProjectTypeList(new QcProjectType());
//筛选出检验方案类型名称相同的项目
Optional<QcProjectType> matchedType = projectTypes.stream()
.filter(item -> projectType.equals(item.getProjectTypeName()))
.findFirst();
//使用code替换名称
if (matchedType.isPresent()) {
project.setProjectType(matchedType.get().getProjectTypeCode());
return true;
}else {
return false;
}
}
}

@ -218,6 +218,7 @@ public class QcCheckReportProduceServiceImpl implements IQcCheckReportProduceSer
QcStaticTable qcStaticTable = new QcStaticTable();
qcStaticTable.setOrderNo(qcCheckTaskProduce.getOrderNo());
qcStaticTable.setShiftId(qcCheckTaskProduce.getShiftId());
List<QcStaticTable> checkInfos = qcStaticTableService.getXJCheckTableDetail(qcStaticTable);
produce.setCheckInfos(checkInfos);
QcCheckTaskProduce lastProduce = qcCheckReportIncomeMapper.getLastProductTypeInfo(qcCheckTaskProduce);

@ -1,5 +1,6 @@
package com.op.quality.service.impl;
import java.util.Date;
import java.util.List;
import com.baomidou.dynamic.datasource.annotation.DS;
@ -116,4 +117,56 @@ public class QcCheckTaskDefectServiceImpl implements IQcCheckTaskDefectService {
public List<QcCheckTaskDefect> selectDefectByBelongTo(String belongTo) {
return qcCheckTaskDefectMapper.selectDefectByBelongTo(belongTo);
}
/**
*
* @param qcCheckTaskDefects
* @return
*/
@Override
@DS("#header.poolName")
public int commitDefectValue(List<QcCheckTaskDefect> qcCheckTaskDefects) {
/**qc_check_task_defect**/
String userName = SecurityUtils.getUsername();
Date now = DateUtils.getNowDate();
//获取当前所选工厂
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String key = "#header.poolName";
String factoryCode = request.getHeader(key.substring(8)).replace("ds_","");
int count = 0;
for (QcCheckTaskDefect defect : qcCheckTaskDefects) {
defect.setRecordId(IdUtils.fastSimpleUUID());
defect.setCreateBy(userName);
defect.setCreateTime(now);
defect.setFactoryCode(factoryCode);
count += qcCheckTaskDefectMapper.insertQcCheckTaskDefect(defect);
}
return count;
}
/**
*
* @param qcCheckTaskDefects
* @return
*/
@Override
@DS("#header.poolName")
public int updateDefectValue(List<QcCheckTaskDefect> qcCheckTaskDefects) {
String userName = SecurityUtils.getUsername();
Date now = DateUtils.getNowDate();
int count = 0;
for (QcCheckTaskDefect defect : qcCheckTaskDefects) {
defect.setUpdateBy(userName);
defect.setUpdateTime(now);
count += qcCheckTaskDefectMapper.updateQcCheckTaskDefect(defect);
}
return count;
}
@Override
@DS("#header.poolName")
public List<QcCheckTaskDefect> getDefectListByBelongToDetail(String belongToDetail) {
List<QcCheckTaskDefect> defectList = qcCheckTaskDefectMapper.getDefectListByBelongToDetail(belongToDetail);
return defectList;
}
}

@ -41,7 +41,7 @@ import javax.servlet.http.HttpServletRequest;
* @date 2023-10-19
*/
@Service
public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
public class QcCheckTaskIncomeServiceImpl<QcCheckUnqualifiedService> implements IQcCheckTaskIncomeService {
protected Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private QcCheckTaskIncomeMapper qcCheckTaskIncomeMapper;
@ -85,6 +85,9 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
@Autowired
private QcCheckTaskDefectMapper qcCheckTaskDefectMapper;
// @Autowired
// private QcCheckUnqualifiedService qcCheckUnqualifiedService;
/**
*
*
@ -145,7 +148,6 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
qcCheckTaskIncome.setCheckNo(bpDD+liushuiStr);
/**取检测项**/
QcCheckTypeProject qctp= new QcCheckTypeProject();
qctp.setTypeId(qcCheckTaskIncome.getCheckType());//生产过程检验
@ -157,10 +159,19 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
//共性
if(group == null){//默认
group = new QcMaterialGroupDetail();
group.setGroupId("729971295b734782b544f9d6d06fb8b9");
QcProjectType initGroup = qcCheckTypeProjectMapper.getProductGroup(qcCheckTaskIncome.getMaterialCode());
if(initGroup != null){
group.setGroupId(initGroup.getGroupId());
}else{
return 0;//没有找到检测项目
}
}
qctp.setGroupId(group.getGroupId());
List<QcCheckTaskDetail> itemsGG = qcCheckTypeProjectMapper.getTPByTypeGroup(qctp);
List<QcCheckTaskDetail> itemsGG = new ArrayList<>();
if(StringUtils.isNotBlank(group.getGroupId())){
qctp.setGroupId(group.getGroupId());
itemsGG = qcCheckTypeProjectMapper.getTPByTypeGroup(qctp);
}
items.addAll(itemsGG);
/**qc_check_task_detail**/
@ -721,6 +732,8 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
unqualified.setType(checkType);
n = qcCheckUnqualifiedMapper.insertQcCheckUnqualified(unqualified);
logger.info("qc_check_unqualified:" + n);
//qcCheckUnqualifiedService.updateQcCheckUnqualified(qcCheckUnqualified);
}
return 1 ;
}

@ -1,6 +1,7 @@
package com.op.quality.service.impl;
import java.math.BigDecimal;
import java.time.LocalTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -388,10 +389,21 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService
Date nowTime = DateUtils.getNowDate();
Date startTime = productTask.getCreateTime();
long mins = DateUtil.between(startTime, nowTime, DateUnit.MINUTE);
if(mins>=60){
int m = insertQcCheckTaskProduce(productTask);
logger.info("++++++++++++过程检验巡检任务生成" + m + "++++++++++++++");
LocalTime startTime0 = LocalTime.parse("11:30");
LocalTime endTime0 = LocalTime.parse("12:30");
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 + "++++过程检验巡检结束++++++++++");

@ -48,10 +48,22 @@ public class QcMaterialGroupServiceImpl implements IQcMaterialGroupService {
* @return
*/
@Override
@DS("#header.poolName")
public QcMaterialGroup selectQcMaterialGroupById(String id) {
return qcMaterialGroupMapper.selectQcMaterialGroupById(id);
}
/**
*
* @param qcMaterialGroup
* @return
*/
@Override
@DS("#header.poolName")
public List<QcMaterialGroup> getOriginalGroupList(QcMaterialGroup qcMaterialGroup) {
return qcMaterialGroupMapper.getOriginalGroupList(qcMaterialGroup);
}
@Override
//@DataScope(deptAlias = "d")
@DS("#header.poolName")

@ -171,7 +171,13 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
@DS("#header.poolName")
public List<QcStaticTable> getXJCheckTableDetail(QcStaticTable qcStaticTable) {
List<QcStaticTable> projects = qcStaticTableMapper.getXJProjects(qcStaticTable);
Map<String, QcStaticTable> detailMap = qcStaticTableMapper.getProjectDetail(qcStaticTable);
Map<String, QcStaticTable> detailMap = null;
if(qcStaticTable.getShiftId().equals("5")){
detailMap = qcStaticTableMapper.getProjectDetail(qcStaticTable);
}else if(qcStaticTable.getShiftId().equals("2")){
detailMap = qcStaticTableMapper.getProjectDetailNight(qcStaticTable);
}
Map<String, QcStaticTable> picsMap = qcStaticTableMapper.picsMap(qcStaticTable);
for (QcStaticTable project : projects) {
this.getDataFromMap(detailMap, project, picsMap);

@ -24,13 +24,13 @@
<result property="judge" column="judge"/>
<result property="defectLevel" column="defect_level"/>
<result property="projectType" column="project_type"/>
<result property="sort" column="sort" />
</resultMap>
<sql id="selectQcCheckProjectVo">
select id, order_num, rule_name, property_code, check_mode, check_tool, unit_code, check_standard,
attr1, create_by, create_time, update_by, update_time, factory_code, del_flag,sample_plan,
judge,defect_level,project_type
judge,defect_level,project_type,sort
from qc_check_project
</sql>
@ -48,6 +48,7 @@
<if test="factoryCode != null and factoryCode != ''">and factory_code = #{factoryCode}</if>
<if test="judge != null and judge != ''">and judge = #{judge}</if>
<if test="projectType != null and projectType != ''">project_type = #{projectType}</if>
and del_flag = '0'
</where>
order by create_time
</select>
@ -79,7 +80,7 @@
<if test="judge != null">judge,</if>
<if test="defectLevel != null">defect_level,</if>
<if test="projectType != null">project_type,</if>
<if test="sort != null">sort,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@ -101,6 +102,7 @@
<if test="judge != null">#{judge},</if>
<if test="defectLevel != null">#{defectLevel},</if>
<if test="projectType != null">#{projectType},</if>
<if test="sort != null">#{sort},</if>
</trim>
</insert>
@ -125,16 +127,17 @@
<if test="judge != null">judge = #{judge},</if>
<if test="defectLevel != null">defect_level = #{defectLevel},</if>
<if test="projectType != null">project_type = #{projectType},</if>
<if test="sort != null">sort = #{sort},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteQcCheckProjectById" parameterType="String">
delete from qc_check_project where id = #{id}
update qc_check_project set del_flag = '1' where id = #{id}
</delete>
<delete id="deleteQcCheckProjectByIds" parameterType="String">
delete from qc_check_project where id in
update qc_check_project set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

@ -21,10 +21,11 @@
<result property="belongTo" column="belong_to"/>
<result property="okQuality" column="ok_quality"/>
<result property="noOkQuality" column="noOk_quality"/>
<result property="belongToDetail" column="belong_to_detail"/>
</resultMap>
<sql id="selectQcCheckTaskDefectVo">
select record_id, defect_code, defect_subclass, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code, del_flag, belong_to, ok_quality, noOk_quality from qc_check_task_defect
select record_id, defect_code, defect_subclass, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code, del_flag, belong_to, ok_quality, noOk_quality, belong_to_detail from qc_check_task_defect
</sql>
<select id="selectQcCheckTaskDefectList" parameterType="QcCheckTaskDefect" resultMap="QcCheckTaskDefectResult">
@ -40,6 +41,7 @@
<if test="belongTo != null and belongTo != ''">and belong_to = #{belongTo}</if>
<if test="okQuality != null ">and ok_quality = #{okQuality}</if>
<if test="noOkQuality != null ">and noOk_quality = #{noOkQuality}</if>
and del_flag = '0'
</where>
</select>
@ -67,6 +69,7 @@
<if test="belongTo != null">belong_to,</if>
<if test="okQuality != null">ok_quality,</if>
<if test="noOkQuality != null">noOk_quality,</if>
<if test="belongToDetail != null">belong_to_detail,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="recordId != null">#{recordId},</if>
@ -85,6 +88,7 @@
<if test="belongTo != null">#{belongTo},</if>
<if test="okQuality != null">#{okQuality},</if>
<if test="noOkQuality != null">#{noOkQuality},</if>
<if test="belongToDetail != null">#{belongToDetail},</if>
</trim>
</insert>
@ -111,11 +115,11 @@
</update>
<delete id="deleteQcCheckTaskDefectByRecordId" parameterType="String">
delete from qc_check_task_defect where record_id = #{recordId}
update qc_check_task_defect set del_flag = '1' where record_id = #{recordId}
</delete>
<delete id="deleteQcCheckTaskDefectByRecordIds" parameterType="String">
delete from qc_check_task_defect where record_id in
update qc_check_task_defect set del_flag = '1' where record_id in
<foreach item="recordId" collection="array" open="(" separator="," close=")">
#{recordId}
</foreach>
@ -160,4 +164,11 @@
GROUP by qctd.belong_to,qctd.belong_to_detail
</select>
<select id="getDefectListByBelongToDetail" resultMap="QcCheckTaskDefectResult">
SELECT record_id,defect_code, defect_subclass,ok_quality, noOk_quality,belong_to,belong_to_detail
FROM qc_check_task_defect
WHERE del_flag = '0' and belong_to_detail = #{belongToDetail}
order by defect_code
</select>
</mapper>

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

@ -82,7 +82,8 @@
<result property="confirm" column="confirm"/>
<result property="confirmManCode" column="confirm_man_code"/>
<result property="confirmManName" column="confirm_man_name"/>
<result property="confirmManName" column="confirm_remark"/>
<result property="confirmRemark" column="confirm_remark"/>
<result property="shiftId" column="shift_id"/>
</resultMap>
<sql id="selectQcCheckTaskProduceVo">
@ -339,7 +340,7 @@
</select>
<select id="selectQcCheckReportIncomeList" parameterType="QcCheckReportIncome"
resultMap="QcCheckReportIncomeResult">
select * from (
select t.*,pow.shift_id from (
select qct.record_id, qct.check_no, qct.income_batch_no,
qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit,
qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_loc, qct.check_status,
@ -409,6 +410,7 @@
qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_type,CONVERT(varchar(10),qct.create_time, 120),
qct.confirm,qct.confirm_man_name
) t
left join pro_order_workorder pow on pow.workorder_code = t.order_no
where 1=1
<if test="checkType != null ">
and t.check_type = #{checkType}

@ -125,7 +125,7 @@
qcp.check_mode checkMode
<!--,qcp.check_standard checkStandard-->
from qc_check_type_project qctp
left join qc_check_project qcp on qcp.id = qctp.project_id
left join qc_check_project qcp on qcp.id = qctp.project_id and qcp.del_flag = '0'
where qctp.del_flag = '0' and qctp.status = '1'
and qctp.material_code = #{materialCode}
and qctp.type_id = #{typeId}
@ -133,19 +133,19 @@
</select>
<select id="getTPByTypeGroup" resultType="com.op.quality.domain.QcCheckTaskDetail">
select qctp.id typeProjectId,
qctp.project_id projectId,
qctp.project_no projectNo,
qctp.standard_value standardValue,
qctp.upper_diff upperDiff,
qctp.down_diff downDiff,
qctp.sample,
qctp.sort,
qcp.rule_name ruleName,
qcp.property_code propertyCode,
qcp.check_tool checkTool,
qcp.unit_code unitCode,
qcp.check_mode checkMode
<!--,qcp.check_standard checkStandard-->
qctp.project_id projectId,
qctp.project_no projectNo,
qctp.standard_value standardValue,
qctp.upper_diff upperDiff,
qctp.down_diff downDiff,
qctp.sample,
qctp.sort,
qcp.rule_name ruleName,
qcp.property_code propertyCode,
qcp.check_tool checkTool,
qcp.unit_code unitCode,
qcp.check_mode checkMode
<!--,qcp.check_standard checkStandard-->
from qc_check_type_project qctp
left join qc_check_project qcp on qcp.id = qctp.project_id
where qctp.del_flag = '0' and qctp.status = '1'
@ -284,11 +284,11 @@
</update>
<delete id="deleteQcCheckTypeProjectById" parameterType="String">
delete from qc_check_type_project where id = #{id}
update qc_check_type_project set del_flag = '1' where id = #{id}
</delete>
<delete id="deleteQcCheckTypeProjectByIds" parameterType="String">
delete from qc_check_type_project where id in
update qc_check_type_project set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
@ -304,6 +304,7 @@
unit_code unitCode,
check_standard checkStandard,
sample_plan samplePlan,
sort,
judge ,
defect_level defectLevel
from qc_check_project
@ -312,7 +313,7 @@
<if test="ruleName != null">and rule_name like concat('%',#{ruleName},'%')</if>
and id not in(
select project_id from qc_check_type_project
where type_id = #{typeCode}
where del_flag = '0' and type_id = #{typeCode}
<if test="samplePlan != null">and sample_plan = #{samplePlan}</if>
<if test="materialCode != null">and material_code = #{materialCode}</if>
)
@ -323,4 +324,13 @@
from qc_project_type
where del_flag = '0'
</select>
<select id="getProductGroup" resultType="com.op.quality.domain.QcProjectType">
select bp.product_group productGroup,
bp.product_group_name productGroupName,
qmg.id groupId
from base_product bp
left join qc_material_group qmg on qmg.group_code = bp.product_group
where bp.product_code like concat('%',#{materialCode},'%')
and bp.del_flag = '0'
</select>
</mapper>

@ -5,178 +5,193 @@
<mapper namespace="com.op.quality.mapper.QcGoalDistributeMapper">
<resultMap type="QcGoalDistribute" id="QcGoalDistributeResult">
<result property="id" column="id"/>
<result property="belongGoalId" column="belong_goal_id"/>
<result property="supplierCode" column="supplier_code"/>
<result property="supplierName" column="supplier_name"/>
<result property="attr1" column="attr1"/>
<result property="attr2" column="attr2"/>
<result property="attr3" column="attr3"/>
<result property="attr4" column="attr4"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="factoryCode" column="factory_code"/>
<result property="delFlag" column="del_flag"/>
<result property="id" column="id"/>
<result property="belongGoalId" column="belong_goal_id"/>
<result property="supplierCode" column="supplier_code"/>
<result property="supplierName" column="supplier_name"/>
<result property="attr1" column="attr1"/>
<result property="attr2" column="attr2"/>
<result property="attr3" column="attr3"/>
<result property="attr4" column="attr4"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="factoryCode" column="factory_code"/>
<result property="delFlag" column="del_flag"/>
</resultMap>
<sql id="selectQcGoalDistributeVo">
select id, belong_goal_id, supplier_code, supplier_name, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code, del_flag from qc_goal_distribute
</sql>
select id,
belong_goal_id,
supplier_code,
supplier_name,
attr1,
attr2,
attr3,
attr4,
create_by,
create_time,
update_by,
update_time,
factory_code,
del_flag
from qc_goal_distribute
</sql>
<select id="selectQcGoalDistributeList" parameterType="QcGoalDistribute" resultMap="QcGoalDistributeResult">
<include refid="selectQcGoalDistributeVo"/>
<where>
<if test="belongGoalId != null and belongGoalId != ''">
and belong_goal_id = #{belongGoalId}
</if>
<if test="supplierCode != null and supplierCode != ''">
and supplier_code = #{supplierCode}
</if>
<if test="supplierName != null and supplierName != ''">
and supplier_name like concat('%', #{supplierName}, '%')
</if>
<if test="attr1 != null and attr1 != ''">
and attr1 = #{attr1}
</if>
<if test="attr2 != null and attr2 != ''">
and attr2 = #{attr2}
</if>
<if test="attr3 != null and attr3 != ''">
and attr3 = #{attr3}
</if>
<if test="attr4 != null and attr4 != ''">
and attr4 = #{attr4}
</if>
<if test="factoryCode != null and factoryCode != ''">
and factory_code = #{factoryCode}
</if>
<if test="belongGoalId != null and belongGoalId != ''">
and belong_goal_id = #{belongGoalId}
</if>
<if test="supplierCode != null and supplierCode != ''">
and supplier_code = #{supplierCode}
</if>
<if test="supplierName != null and supplierName != ''">
and supplier_name like concat('%', #{supplierName}, '%')
</if>
<if test="attr1 != null and attr1 != ''">
and attr1 = #{attr1}
</if>
<if test="attr2 != null and attr2 != ''">
and attr2 = #{attr2}
</if>
<if test="attr3 != null and attr3 != ''">
and attr3 = #{attr3}
</if>
<if test="attr4 != null and attr4 != ''">
and attr4 = #{attr4}
</if>
<if test="factoryCode != null and factoryCode != ''">
and factory_code = #{factoryCode}
</if>
and del_flag = '0'
</where>
</select>
<select id="selectQcGoalDistributeById" parameterType="String"
resultMap="QcGoalDistributeResult">
<include refid="selectQcGoalDistributeVo"/>
where id = #{id}
<include refid="selectQcGoalDistributeVo"/>
where del_flag = '0' and id = #{id}
</select>
<insert id="insertQcGoalDistribute" parameterType="QcGoalDistribute">
insert into qc_goal_distribute
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,
</if>
<if test="belongGoalId != null">belong_goal_id,
</if>
<if test="supplierCode != null">supplier_code,
</if>
<if test="supplierName != null">supplier_name,
</if>
<if test="attr1 != null">attr1,
</if>
<if test="attr2 != null">attr2,
</if>
<if test="attr3 != null">attr3,
</if>
<if test="attr4 != null">attr4,
</if>
<if test="createBy != null">create_by,
</if>
<if test="createTime != null">create_time,
</if>
<if test="updateBy != null">update_by,
</if>
<if test="updateTime != null">update_time,
</if>
<if test="factoryCode != null and factoryCode != ''">factory_code,
</if>
<if test="delFlag != null">del_flag,
</if>
<if test="id != null">id,
</if>
<if test="belongGoalId != null">belong_goal_id,
</if>
<if test="supplierCode != null">supplier_code,
</if>
<if test="supplierName != null">supplier_name,
</if>
<if test="attr1 != null">attr1,
</if>
<if test="attr2 != null">attr2,
</if>
<if test="attr3 != null">attr3,
</if>
<if test="attr4 != null">attr4,
</if>
<if test="createBy != null">create_by,
</if>
<if test="createTime != null">create_time,
</if>
<if test="updateBy != null">update_by,
</if>
<if test="updateTime != null">update_time,
</if>
<if test="factoryCode != null and factoryCode != ''">factory_code,
</if>
<if test="delFlag != null">del_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},
</if>
<if test="belongGoalId != null">#{belongGoalId},
</if>
<if test="supplierCode != null">#{supplierCode},
</if>
<if test="supplierName != null">#{supplierName},
</if>
<if test="attr1 != null">#{attr1},
</if>
<if test="attr2 != null">#{attr2},
</if>
<if test="attr3 != null">#{attr3},
</if>
<if test="attr4 != null">#{attr4},
</if>
<if test="createBy != null">#{createBy},
</if>
<if test="createTime != null">#{createTime},
</if>
<if test="updateBy != null">#{updateBy},
</if>
<if test="updateTime != null">#{updateTime},
</if>
<if test="factoryCode != null and factoryCode != ''">#{factoryCode},
</if>
<if test="delFlag != null">#{delFlag},
</if>
<if test="id != null">#{id},
</if>
<if test="belongGoalId != null">#{belongGoalId},
</if>
<if test="supplierCode != null">#{supplierCode},
</if>
<if test="supplierName != null">#{supplierName},
</if>
<if test="attr1 != null">#{attr1},
</if>
<if test="attr2 != null">#{attr2},
</if>
<if test="attr3 != null">#{attr3},
</if>
<if test="attr4 != null">#{attr4},
</if>
<if test="createBy != null">#{createBy},
</if>
<if test="createTime != null">#{createTime},
</if>
<if test="updateBy != null">#{updateBy},
</if>
<if test="updateTime != null">#{updateTime},
</if>
<if test="factoryCode != null and factoryCode != ''">#{factoryCode},
</if>
<if test="delFlag != null">#{delFlag},
</if>
</trim>
</insert>
<update id="updateQcGoalDistribute" parameterType="QcGoalDistribute">
update qc_goal_distribute
<trim prefix="SET" suffixOverrides=",">
<if test="belongGoalId != null">belong_goal_id =
#{belongGoalId},
</if>
<if test="supplierCode != null">supplier_code =
#{supplierCode},
</if>
<if test="supplierName != null">supplier_name =
#{supplierName},
</if>
<if test="attr1 != null">attr1 =
#{attr1},
</if>
<if test="attr2 != null">attr2 =
#{attr2},
</if>
<if test="attr3 != null">attr3 =
#{attr3},
</if>
<if test="attr4 != null">attr4 =
#{attr4},
</if>
<if test="createBy != null">create_by =
#{createBy},
</if>
<if test="createTime != null">create_time =
#{createTime},
</if>
<if test="updateBy != null">update_by =
#{updateBy},
</if>
<if test="updateTime != null">update_time =
#{updateTime},
</if>
<if test="factoryCode != null and factoryCode != ''">factory_code =
#{factoryCode},
</if>
<if test="delFlag != null">del_flag =
#{delFlag},
</if>
<if test="belongGoalId != null">belong_goal_id =
#{belongGoalId},
</if>
<if test="supplierCode != null">supplier_code =
#{supplierCode},
</if>
<if test="supplierName != null">supplier_name =
#{supplierName},
</if>
<if test="attr1 != null">attr1 =
#{attr1},
</if>
<if test="attr2 != null">attr2 =
#{attr2},
</if>
<if test="attr3 != null">attr3 =
#{attr3},
</if>
<if test="attr4 != null">attr4 =
#{attr4},
</if>
<if test="createBy != null">create_by =
#{createBy},
</if>
<if test="createTime != null">create_time =
#{createTime},
</if>
<if test="updateBy != null">update_by =
#{updateBy},
</if>
<if test="updateTime != null">update_time =
#{updateTime},
</if>
<if test="factoryCode != null and factoryCode != ''">factory_code =
#{factoryCode},
</if>
<if test="delFlag != null">del_flag =
#{delFlag},
</if>
</trim>
where id = #{id}
</update>
<delete id="deleteQcGoalDistributeById" parameterType="String">
delete from qc_goal_distribute where id = #{id}
</delete>
update qc_goal_distribute set del_flag = '1' where id = #{id}
</delete>
<delete id="deleteQcGoalDistributeByIds" parameterType="String">
delete from qc_goal_distribute where id in
update qc_goal_distribute set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
@ -193,9 +208,9 @@
from base_supplier bs
where bs.active_flag = '1' and bs.del_flag = '0'
and bs.supplier_code not in (
select gd.supplier_code
from qc_goal_distribute gd
where gd.belong_goal_id =#{belongGoalId}
select gd.supplier_code
from qc_goal_distribute gd
where gd.belong_goal_id =#{belongGoalId}
)
<if test="supplierName != null and supplierName != ''">and bs.zh_desc like concat('%', #{supplierName},
'%')
@ -204,8 +219,8 @@
<select id="getGoalDistributeDo" parameterType="QcGoalDistribute" resultMap="QcGoalDistributeResult">
select distinct
gd.supplier_code,
concat(bs.zh_desc,'(',bs.supplier_code,')') label
gd.supplier_code,
concat(bs.zh_desc,'(',bs.supplier_code,')') label
from qc_goal_distribute gd
left join base_supplier bs on gd.supplier_code = bs.supplier_code
where gd.belong_goal_id =#{belongGoalId}
@ -224,11 +239,12 @@
bp.active_flag = '1'
AND bp.del_flag = '0'
AND bp.product_code NOT IN (
SELECT gd.supplier_code
FROM qc_goal_distribute gd
WHERE gd.belong_goal_id =#{ belongGoalId }
SELECT gd.supplier_code
FROM qc_goal_distribute gd
WHERE gd.belong_goal_id =#{ belongGoalId }
)
<if test="supplierName != null and supplierName != ''">and bp.product_desc_zh like concat('%', #{supplierName},'%')
<if test="supplierName != null and supplierName != ''">and bp.product_desc_zh like concat('%',
#{supplierName},'%')
</if>
</select>

@ -60,6 +60,7 @@
<if test="parentGoal != null and parentGoal != ''">
and parent_goal = #{parentGoal}
</if>
and del_flag = '0'
</where>
order by id desc
</select>
@ -94,6 +95,7 @@
<if test="parentGoal != null and parentGoal != ''">
and parent_goal = #{parentGoal}
</if>
and del_flag = '0'
</where>
order by id asc
</select>
@ -101,7 +103,7 @@
<select id="selectQcGoalById" parameterType="String"
resultMap="QcGoalResult">
<include refid="selectQcGoalVo"/>
where id = #{id}
where del_flag= = '0' id = #{id}
</select>
<insert id="insertQcGoal" parameterType="QcGoal">
@ -249,11 +251,11 @@
</select>
<delete id="deleteQcGoalById" parameterType="String">
delete from qc_goal where id = #{id}
update qc_goal set del_flag = '1' where id = #{id}
</delete>
<delete id="deleteQcGoalByIds" parameterType="String">
delete from qc_goal where id in
update qc_goal set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

@ -33,6 +33,7 @@
</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>
</select>
@ -96,11 +97,11 @@
</update>
<delete id="deleteQcMaterialGroupDetailById" parameterType="String">
delete from qc_material_group_detail where id = #{id}
update qc_material_group_detail set del_flag = '1' where id = #{id}
</delete>
<delete id="deleteQcMaterialGroupDetailByIds" parameterType="String">
delete from qc_material_group_detail where id in
update qc_material_group_detail set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

@ -26,6 +26,7 @@
<if test="groupName != null and groupName != ''">and group_name like concat('%', #{groupName}, '%')</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>
/*select
mg.id,
@ -37,6 +38,14 @@
WHERE mg.del_flag = '0'*/
</select>
<select id="getOriginalGroupList" parameterType="QcMaterialGroup" resultType="QcMaterialGroup">
SELECT DISTINCT
product_group groupCode,
concat(product_group_name,'(',product_group,')') groupName
FROM base_product
WHERE del_flag = '0' AND product_group_name IS NOT NULL
</select>
<select id="getMaterialChildrenList" parameterType="QcMaterialGroup" resultMap="QcMaterialGroupResult">
select
id,
@ -61,6 +70,7 @@
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="groupName != null">group_name,</if>
<if test="groupCode != null">group_code,</if>
<if test="attr1 != null">attr1,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
@ -72,6 +82,7 @@
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="groupName != null">#{groupName},</if>
<if test="groupCode != null">#{groupCode},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
@ -86,6 +97,7 @@
update qc_material_group
<trim prefix="SET" suffixOverrides=",">
<if test="groupName != null">group_name = #{groupName},</if>
<if test="groupCode != null">group_code = #{groupCode},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
@ -98,11 +110,11 @@
</update>
<delete id="deleteQcMaterialGroupById" parameterType="String">
delete from qc_material_group where id = #{id}
update qc_material_group set del_flag = '1' where id = #{id}
</delete>
<delete id="deleteQcMaterialGroupByIds" parameterType="String">
delete from qc_material_group where id in
update qc_material_group set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

@ -36,6 +36,7 @@
<if test="factoryCode != null and factoryCode != ''">and factory_code = #{factoryCode}</if>
<if test="standardNo != null and standardNo != ''">and standard_no = #{standardNo}</if>
<if test="version != null and version != ''">and version = #{version}</if>
and del_flag = '0'
</where>
</select>

@ -34,6 +34,7 @@
<if test="sampleQuality != null ">and sample_quality = #{sampleQuality}</if>
<if test="checkType != null and checkType != ''">and check_type = #{checkType}</if>
<if test="typeCode != null and typeCode != ''">and type_code = #{typeCode}</if>
and del_flag = '0'
</where>
</select>
@ -102,11 +103,11 @@
</update>
<delete id="deleteQcSampleRuleById" parameterType="String">
delete from qc_sample_rule where id = #{id}
update qc_sample_rule set del_flag = '1' where id = #{id}
</delete>
<delete id="deleteQcSampleRuleByIds" parameterType="String">
delete from qc_sample_rule where id in
update qc_sample_rule set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

@ -179,6 +179,34 @@
</select>
<select id="getProjectDetailNight" resultType="com.op.quality.domain.QcStaticTable">
select qctd.record_id recordId,
qctd.project_id projectId,
qctd.status,
qctd.remark,
CONVERT(VARCHAR(5),qctd.create_time, 108),
concat(qctd.project_id,
case when '21:30'>= CONVERT(VARCHAR(5),qctd.create_time, 108) and CONVERT(VARCHAR(5),qctd.create_time, 108)> '20:30' then '08'
when '22:30'>= CONVERT(VARCHAR(5),qctd.create_time, 108) and CONVERT(VARCHAR(5),qctd.create_time, 108)> '21:30' then '09'
when '23:30'>= CONVERT(VARCHAR(5),qctd.create_time, 108) and CONVERT(VARCHAR(5),qctd.create_time, 108)> '22:30' then '10'
when '23:59'>= CONVERT(VARCHAR(5),qctd.create_time, 108) and CONVERT(VARCHAR(5),qctd.create_time, 108)> '23:30' then '11'
when '01:30'>= CONVERT(VARCHAR(5),qctd.create_time, 108) and CONVERT(VARCHAR(5),qctd.create_time, 108)> '00:00' then '11'
when '02:30'>= CONVERT(VARCHAR(5),qctd.create_time, 108) and CONVERT(VARCHAR(5),qctd.create_time, 108)> '01:30' then '12'
when '03:30'>= CONVERT(VARCHAR(5),qctd.create_time, 108) and CONVERT(VARCHAR(5),qctd.create_time, 108)> '02:30' then '13'
when '04:30'>= CONVERT(VARCHAR(5),qctd.create_time, 108) and CONVERT(VARCHAR(5),qctd.create_time, 108)> '03:30' then '14'
when '05:30'>= CONVERT(VARCHAR(5),qctd.create_time, 108) and CONVERT(VARCHAR(5),qctd.create_time, 108)> '04:30' then '15'
when '06:30'>= CONVERT(VARCHAR(5),qctd.create_time, 108) and CONVERT(VARCHAR(5),qctd.create_time, 108)> '05:30' then '16'
when '07:30'>= CONVERT(VARCHAR(5),qctd.create_time, 108) and CONVERT(VARCHAR(5),qctd.create_time, 108)> '06:30' then '18'
when '08:30'>= CONVERT(VARCHAR(5),qctd.create_time, 108) and CONVERT(VARCHAR(5),qctd.create_time, 108)> '07:30' then '19'
else '-' end
)ymdms
from qc_check_task qct
left join qc_check_task_detail qctd on qct.record_id = qctd.belong_to
where qct.order_no = #{orderNo} and qct.check_type = 'checkTypeSCXJ' and qct.check_status = '2'
order by qctd.create_time
</select>
<select id="getBatchnos" resultType="java.lang.String">
select powb.batch_code batchCode
from pro_order_workorder_batch powb

@ -42,6 +42,7 @@
FROM sys_user su
LEFT JOIN sys_dept sd ON su.dept_id = sd.dept_id and sd.del_flag = '0'
WHERE su.del_flag = '0'
<if test="userCode != null and userCode != ''">and su.user_name like concat('%', #{userCode}, '%')</if>
<if test="userName != null and userName != ''">and su.nick_name like concat('%', #{userName}, '%')</if>
<if test="deptId != null">and sd.dept_id = #{deptId}</if>
<if test="phonenumber != null and phonenumber != ''">and su.phonenumber like concat('%', #{phonenumber}, '%')</if>
@ -57,6 +58,7 @@
'%')
</if>
<if test="factoryCode != null and factoryCode != ''">and factory_code = #{factoryCode}</if>
and del_flag = '0'
</where>
-->
</select>
@ -69,7 +71,7 @@
phonenumber,
create_time
FROM sys_user
WHERE user_name = #{userCode}
WHERE del_flag = '0' and user_name = #{userCode}
</select>
<select id="selectQcUserMaterialById" parameterType="String" resultMap="QcUserMaterialResult">
@ -102,8 +104,8 @@
select distinct um.material_code materialCode,
concat(bp.equipment_name,'(',bp.equipment_code,')') label
from qc_user_material um
left join base_equipment bp on um.material_code = bp.equipment_code
where bp.equipment_type_code = 'equ_type_bzx' and um.user_code in
left join base_equipment bp on um.material_code = bp.equipment_code and bp.del_flag = '0'
where um.del_flag = '0' and bp.equipment_type_code = 'equ_type_bzx' and um.user_code in
<foreach collection="userCodes" item="userCode" open="(" close=")" separator=",">
#{userCode}
</foreach>
@ -114,7 +116,7 @@
<select id="getSelectedUsers" resultMap="QcUserMaterialResult">
select qum.user_code, qum.user_name
from qc_user_material qum
where qum.material_code = #{materialCode}
where qum.del_flag = '0' and qum.material_code = #{materialCode}
</select>
<insert id="insertQcUserMaterial" parameterType="QcUserMaterial">
insert into qc_user_material
@ -176,11 +178,11 @@
</update>
<delete id="deleteQcUserMaterialByUserCode" parameterType="String">
delete from qc_user_material where user_code = #{userCode}
update qc_user_material set del_flag = '1' where user_code = #{userCode}
</delete>
<delete id="deleteQcUserMaterialByUserCodes" parameterType="String">
delete from qc_user_material where user_code in
update qc_user_material set del_flag = '1' where user_code in
<foreach item="userCode" collection="array" open="(" separator="," close=")">
#{userCode}
</foreach>

@ -24,6 +24,10 @@ import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
@RestController
@RequestMapping("/sap")
@ -66,8 +70,37 @@ public class SapController extends BaseController {
@PostMapping("/itemSync")
@Log(title = "同步SAP物料清单", businessType = BusinessType.SAP)
public R itemSync(@RequestBody SapItemQuery qo) {
// 加载sf-cloud库的sys_datasource
return sapItemSyncService.itemSync(qo);
SysUser sysUser = new SysUser();
sysUser.setUserId(1L);
R<List<Map<String, String>>> dateSources0 = remoteUserService.getPoolNameList(sysUser);
List<Map<String, String>> dateSources = dateSources0.getData();
ExecutorService executorService = new ThreadPoolExecutor(
dateSources.size(),
dateSources.size(),
0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<Runnable>());
try {
dateSources.forEach(dateSource -> {
if(!"ds_999".equals(dateSource.get("poolName"))){
SapItemQuery sapItemQuery = new SapItemQuery();
sapItemQuery.setWerks(dateSource.get("poolName").replace("ds_",""));
Runnable run = () -> sapItemSyncService.itemSync(sapItemQuery);
executorService.execute(run);
}
});
} catch (Exception e) {
logger.error("controller == createIncomeBatchTask == exception", e);
return R.fail("controller == createIncomeBatchTask == exception");
} finally {
executorService.shutdown();
}
return R.ok();
}
/**

@ -53,6 +53,12 @@ public class SapItemSyncImpl implements SapItemSyncService {
@Override
public R itemSync(SapItemQuery sapItemQuery) {
try {
DynamicDataSourceContextHolder.push("ds_"+sapItemQuery.getWerks());
//TODO;
//sapItemQuery.setLaeda();
//sapItemQuery.setErsda();
// 获取调用 RFC 函数对象
//获取连接
log.info("物料基础数据同步输入参数---------" + JSONObject.toJSONString(sapItemQuery));
@ -422,7 +428,7 @@ public class SapItemSyncImpl implements SapItemSyncService {
Date date = inputFormat.parse(inputDateTime);
qcCheckTaskIncomeDTO.setIncomeTime(date);
qcCheckTaskIncomeDTO.setFactoryCode(maraTable.getString("WERKS"));
qcCheckTaskIncomeDTO.setAttr1(maraTable.getString("USNAM"));//收货人
qcCheckTaskIncomeDTO.setAttr3(maraTable.getString("USNAM"));//收货人
qcCheckTaskIncomeDTO.setCreateTime(nowTime);
qcCheckTaskIncomeDTO.setCreateBy(createBy);
qcCheckTaskIncomeDTOList.add(qcCheckTaskIncomeDTO);

@ -339,8 +339,31 @@ public class WmsToWCSmissionController {
}
/**
* --
*
*/
@PostMapping("/confirmFinishedProductTransferAndOutbound")
public AjaxResult confirmFinishedProductTransferAndOutbound(@RequestBody WmsAllocationOutEmbryo wmsRuturnPutEmbryo) {
return AjaxResult.success(wmsProductPutService.confirmFinishedProductTransferAndOutbound(wmsRuturnPutEmbryo));
}
/**
* --
*
*/
@PostMapping("/palletScanning")
public AjaxResult palletScanning(@RequestBody WmsFpStorageNewsSn wmsFpStorageNewsSn) {
return AjaxResult.success(wmsProductPutService.palletScanning(wmsFpStorageNewsSn));
}
/**
* --
*
*/
@PostMapping("/palletTransferConfirmation")
public AjaxResult palletTransferConfirmation(@RequestBody WmsFpStorageNewsSn wmsFpStorageNewsSn) {
return AjaxResult.success(wmsProductPutService.palletTransferConfirmation(wmsFpStorageNewsSn));
}
/**
*
*/

@ -1,6 +1,14 @@
package com.op.wms.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;
/**
*
@ -12,4 +20,497 @@ public class WmsAllocationOutEmbryo extends BaseEntity {
* ID
*/
private String id;
/**
*
*/
@Excel(name = "交货单号")
private String deliveryOrder;
/**
*
*/
@Excel(name = "项次")
private String itemNumber;
/**
*
*/
@Excel(name = "工厂编码")
private String factoryCode;
/**
*
*/
@Excel(name = "仓库编码")
private String whCode;
/**
*
*/
@Excel(name = "库区编码")
private String waCode;
/**
*
*/
@Excel(name = "库位编码")
private String wlCode;
/**
*
*/
@Excel(name = "出库地点")
private String deliveryPlace;
/**
*
*/
@Excel(name = "产品名称")
private String productName;
/**
*
*/
@Excel(name = "产品编码")
private String productCode;
/**
*
*/
@Excel(name = "产品分类")
private String productSort;
/**
*
*/
@Excel(name = "规格型号")
private String specification;
/**
*
*/
@Excel(name = "单位")
private String unitOfMeasure;
/**
*
*/
@Excel(name = "批次号")
private String lotNumber;
/**
*
*/
@Excel(name = "计划出库数量")
private BigDecimal planQuantity;
/**
*
*/
@Excel(name = "出库数量")
private BigDecimal outQuantity;
/**
* --01
*/
@Excel(name = "出库状态")
private String status;
/**
* SAP
*/
@Excel(name = "过账SAP状态")
private String sapStatus;
/**
* SAP
*/
@Excel(name = "过账SAP凭证")
private String sapProof;
/**
* SAP
*/
@Excel(name = "过账SAP返回信息")
private String sapMessage;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "出库时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date outDate;
/**
* 1
*/
@Excel(name = "预留字段1")
private String attr1;
/**
* 2
*/
@Excel(name = "预留字段2")
private String attr2;
/**
* 3
*/
@Excel(name = "预留字段3")
private String attr3;
/**
* 4
*/
@Excel(name = "预留字段4")
private String attr4;
/**
* 5
*/
@Excel(name = "预留字段5")
private String attr5;
/**
* 6
*/
@Excel(name = "预留字段6")
private String attr6;
/**
* 7
*/
@Excel(name = "预留字段7")
private String attr7;
/**
* 8
*/
@Excel(name = "预留字段8")
private String attr8;
/**
* 9
*/
@Excel(name = "预留字段9")
private String attr9;
/**
* 10
*/
@Excel(name = "预留字段10")
private String attr10;
/**
*
*/
@Excel(name = "有效标记")
private String activeFlag;
private List<WmsProductPutTrayCode> wmsProductPutTrayCodeList;
public List<WmsProductPutTrayCode> getWmsProductPutTrayCodeList() {
return wmsProductPutTrayCodeList;
}
public void setWmsProductPutTrayCodeList(List<WmsProductPutTrayCode> wmsProductPutTrayCodeList) {
this.wmsProductPutTrayCodeList = wmsProductPutTrayCodeList;
}
public String getActiveFlag() {
return activeFlag;
}
public void setActiveFlag(String activeFlag) {
this.activeFlag = activeFlag;
}
public void setId(String id) {
this.id = id;
}
public String getId() {
return id;
}
public void setDeliveryOrder(String deliveryOrder) {
this.deliveryOrder = deliveryOrder;
}
public String getDeliveryOrder() {
return deliveryOrder;
}
public void setItemNumber(String itemNumber) {
this.itemNumber = itemNumber;
}
public String getItemNumber() {
return itemNumber;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryCode() {
return factoryCode;
}
public void setWhCode(String whCode) {
this.whCode = whCode;
}
public String getWhCode() {
return whCode;
}
public void setWaCode(String waCode) {
this.waCode = waCode;
}
public String getWaCode() {
return waCode;
}
public void setWlCode(String wlCode) {
this.wlCode = wlCode;
}
public String getWlCode() {
return wlCode;
}
public void setDeliveryPlace(String deliveryPlace) {
this.deliveryPlace = deliveryPlace;
}
public String getDeliveryPlace() {
return deliveryPlace;
}
public void setProductName(String productName) {
this.productName = productName;
}
public String getProductName() {
return productName;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
public String getProductCode() {
return productCode;
}
public void setProductSort(String productSort) {
this.productSort = productSort;
}
public String getProductSort() {
return productSort;
}
public void setSpecification(String specification) {
this.specification = specification;
}
public String getSpecification() {
return specification;
}
public void setUnitOfMeasure(String unitOfMeasure) {
this.unitOfMeasure = unitOfMeasure;
}
public String getUnitOfMeasure() {
return unitOfMeasure;
}
public void setLotNumber(String lotNumber) {
this.lotNumber = lotNumber;
}
public String getLotNumber() {
return lotNumber;
}
public void setPlanQuantity(BigDecimal planQuantity) {
this.planQuantity = planQuantity;
}
public BigDecimal getPlanQuantity() {
return planQuantity;
}
public void setOutQuantity(BigDecimal outQuantity) {
this.outQuantity = outQuantity;
}
public BigDecimal getOutQuantity() {
return outQuantity;
}
public void setStatus(String status) {
this.status = status;
}
public String getStatus() {
return status;
}
public void setSapStatus(String sapStatus) {
this.sapStatus = sapStatus;
}
public String getSapStatus() {
return sapStatus;
}
public void setSapProof(String sapProof) {
this.sapProof = sapProof;
}
public String getSapProof() {
return sapProof;
}
public void setSapMessage(String sapMessage) {
this.sapMessage = sapMessage;
}
public String getSapMessage() {
return sapMessage;
}
public void setOutDate(Date outDate) {
this.outDate = outDate;
}
public Date getOutDate() {
return outDate;
}
public void setAttr1(String attr1) {
this.attr1 = attr1;
}
public String getAttr1() {
return attr1;
}
public void setAttr2(String attr2) {
this.attr2 = attr2;
}
public String getAttr2() {
return attr2;
}
public void setAttr3(String attr3) {
this.attr3 = attr3;
}
public String getAttr3() {
return attr3;
}
public void setAttr4(String attr4) {
this.attr4 = attr4;
}
public String getAttr4() {
return attr4;
}
public void setAttr5(String attr5) {
this.attr5 = attr5;
}
public String getAttr5() {
return attr5;
}
public void setAttr6(String attr6) {
this.attr6 = attr6;
}
public String getAttr6() {
return attr6;
}
public void setAttr7(String attr7) {
this.attr7 = attr7;
}
public String getAttr7() {
return attr7;
}
public void setAttr8(String attr8) {
this.attr8 = attr8;
}
public String getAttr8() {
return attr8;
}
public void setAttr9(String attr9) {
this.attr9 = attr9;
}
public String getAttr9() {
return attr9;
}
public void setAttr10(String attr10) {
this.attr10 = attr10;
}
public String getAttr10() {
return attr10;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("deliveryOrder", getDeliveryOrder())
.append("itemNumber", getItemNumber())
.append("factoryCode", getFactoryCode())
.append("whCode", getWhCode())
.append("waCode", getWaCode())
.append("wlCode", getWlCode())
.append("deliveryPlace", getDeliveryPlace())
.append("productName", getProductName())
.append("productCode", getProductCode())
.append("productSort", getProductSort())
.append("specification", getSpecification())
.append("unitOfMeasure", getUnitOfMeasure())
.append("lotNumber", getLotNumber())
.append("planQuantity", getPlanQuantity())
.append("outQuantity", getOutQuantity())
.append("status", getStatus())
.append("sapStatus", getSapStatus())
.append("sapProof", getSapProof())
.append("sapMessage", getSapMessage())
.append("outDate", getOutDate())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("attr4", getAttr4())
.append("attr5", getAttr5())
.append("attr6", getAttr6())
.append("attr7", getAttr7())
.append("attr8", getAttr8())
.append("attr9", getAttr9())
.append("attr10", getAttr10())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}

@ -41,6 +41,21 @@ public class WmsFpStorageNewsSn extends BaseEntity {
@Excel(name = "库位编码")
private String wlCode;
/**
*
*/
@Excel(name = "目标库位编码")
private String towlCode;
public String getTowlCode() {
return towlCode;
}
public void setTowlCode(String towlCode) {
this.towlCode = towlCode;
}
/**
*
*/

@ -2,6 +2,7 @@ package com.op.wms.mapper;
import java.util.List;
import com.op.wms.domain.WmsAllocationOutEmbryo;
import com.op.wms.domain.WmsSellOutEmbryo;
import org.apache.ibatis.annotations.Param;
@ -76,4 +77,10 @@ public interface WmsSellOutEmbryoMapper {
* @return
*/
public WmsSellOutEmbryo selectWmsSellOutEmbryoByOrderCodeAndProductCode(@Param("deliveryOrder") String deliveryOrder, @Param("productCode") String productCode);
List<WmsAllocationOutEmbryo> selectWmsAllocationOutEmbryoList(WmsAllocationOutEmbryo wmsAllocationOutEmbryo);
WmsAllocationOutEmbryo selectWmsAllocationOutEmbryoById(String id);
void updateWmsAllocationOutEmbryo(WmsAllocationOutEmbryo wmsAllocationOutEmbryo);
}

@ -120,4 +120,10 @@ public interface IWmsProductPutService {
List<WmsAllocationOutEmbryo> selectFinishedProductTransferAndOutbound(WmsAllocationOutEmbryo wmsRuturnPutEmbryo);
String confirmFinishedProductTransferAndOutbound(WmsAllocationOutEmbryo wmsRuturnPutEmbryo);
WmsFpStorageNewsSn palletScanning(WmsFpStorageNewsSn wmsFpStorageNewsSn);
String palletTransferConfirmation(WmsFpStorageNewsSn wmsFpStorageNewsSn);
}

@ -231,7 +231,7 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
wmsFpStorageNewsSn.setSn(wmsProductPut1.getSn());
wmsFpStorageNewsSn.setAmount(new BigDecimal(wmsProductPut1.getNumber()));
wmsFpStorageNewsSn.setBatchNumber(wmsProductPut.getBatchNumber());
wmsFpStorageNewsSn.setUserDefined2(formattedDate);
//wmsFpStorageNewsSn.setUserDefined2(formattedDate);
wmsFpStorageNewsSn.setCreateBy(wmsProductPut.getCreateBy());
wmsFpStorageNewsSn.setCreateTime(new Date());
wmsFpStorageNewsSn.setActiveFlag("1");
@ -830,7 +830,7 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
wmsProductPutRecords.setProductName(wmsRuturnPutEmbryo.getProductName());
wmsProductPutRecords.setProductCode(wmsRuturnPutEmbryo.getProductCode());
wmsProductPutRecords.setWhCode(wmsRuturnPutEmbryo.getWhCode());//仓库编码
wmsProductPutRecords.setFactoryCode(wmsRuturnPutEmbryo.getFactoryCode());
wmsProductPutRecords.setWlCode(wmsProductPut1.getWlCode());//库位编码
wmsProductPutRecords.setAttr1(wmsProductPut1.getSn());////托盘号编码
wmsProductPutRecords.setAttr2(wmsProductPut1.getNumber());//箱数
@ -850,7 +850,7 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
wmsFpStorageNewsSn.setSn(wmsProductPut1.getSn());
wmsFpStorageNewsSn.setAmount(new BigDecimal(wmsProductPut1.getNumber()));
//wmsFpStorageNewsSn.setBatchNumber(wmsProductPut.getBatchNumber());
wmsFpStorageNewsSn.setUserDefined2(formattedDate);
// wmsFpStorageNewsSn.setUserDefined2(formattedDate);
wmsFpStorageNewsSn.setCreateBy(wmsRuturnPutEmbryo.getCreateBy());
wmsFpStorageNewsSn.setCreateTime(new Date());
wmsFpStorageNewsSn.setActiveFlag("1");
@ -885,9 +885,134 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
}
@Override
public List<WmsAllocationOutEmbryo> selectFinishedProductTransferAndOutbound(WmsAllocationOutEmbryo wmsRuturnPutEmbryo) {
public List<WmsAllocationOutEmbryo> selectFinishedProductTransferAndOutbound(WmsAllocationOutEmbryo wmsAllocationOutEmbryo) {
DynamicDataSourceContextHolder.push("ds_" + wmsAllocationOutEmbryo.getFactoryCode());
List<WmsAllocationOutEmbryo> wmsAllocationOutEmbryoList= wmsSellOutEmbryoMapper.selectWmsAllocationOutEmbryoList(wmsAllocationOutEmbryo);
return wmsAllocationOutEmbryoList;
}
@Override
public String confirmFinishedProductTransferAndOutbound(WmsAllocationOutEmbryo wmsRuturnPutEmbryo) {
String result1="出库成功";
DynamicDataSourceContextHolder.push("ds_" + wmsRuturnPutEmbryo.getFactoryCode());
List<WmsProductPutTrayCode> wmsProductPutTrayCodeList= wmsRuturnPutEmbryo.getWmsProductPutTrayCodeList();
//成品销售出库--确认接口---修改出库单,--出库库存
WmsAllocationOutEmbryo wmsSellOutEmbryo1 = wmsSellOutEmbryoMapper.selectWmsAllocationOutEmbryoById(wmsRuturnPutEmbryo.getId());
Integer tem= wmsProductPutTrayCodeList.size();
BigDecimal OutQuantity= wmsSellOutEmbryo1.getOutQuantity().add(new BigDecimal(tem));//2
int result = wmsSellOutEmbryo1.getPlanQuantity().compareTo(OutQuantity);
WmsAllocationOutEmbryo wmsAllocationOutEmbryo=new WmsAllocationOutEmbryo();
if (result == 0){//出库完
wmsAllocationOutEmbryo.setStatus("1");
}else {
wmsAllocationOutEmbryo.setStatus("0");
}
wmsAllocationOutEmbryo.setId(wmsRuturnPutEmbryo.getId());
wmsAllocationOutEmbryo.setOutQuantity(OutQuantity);
wmsSellOutEmbryoMapper.updateWmsAllocationOutEmbryo(wmsAllocationOutEmbryo);
//订单修改完成
for(WmsProductPutTrayCode wmsProductPutTrayCode: wmsProductPutTrayCodeList){
//库存修改
//解除绑定
wmsProductPutTrayCode.setRelatStatus("0");
wmsProductPutTrayCodeMapper.updateWmsProductPutTrayCode(wmsProductPutTrayCode);
//改明细
WmsFpStorageNewsSn wmsFpStorageNewsSn=new WmsFpStorageNewsSn();
wmsFpStorageNewsSn.setSn(wmsProductPutTrayCode.getSn());
wmsFpStorageNewsSn.setWlCode(wmsProductPutTrayCode.getWlCode());
wmsFpStorageNewsSn.setActiveFlag("1");
wmsFpStorageNewsSn.setProductCode(wmsSellOutEmbryo1.getProductCode());
wmsFpStorageNewsSnMapper.updateWmsFpStorageNewsSnOut(wmsFpStorageNewsSn);
//判断如果托盘数据被出完,就关闭这个明细
List<WmsFpStorageNewsSn> wmsFpStorageNewsSns= wmsFpStorageNewsSnMapper.selectWmsFpStorageNewsSnList(wmsFpStorageNewsSn);
if (wmsFpStorageNewsSns.size()>0){
WmsFpStorageNewsSn wmsFpStorageNewsSn1= wmsFpStorageNewsSns.get(0);
BigDecimal ken= new BigDecimal(wmsFpStorageNewsSn1.getUserDefined2());
int comparisonResult = ken.compareTo(wmsFpStorageNewsSn1.getAmount());
if (comparisonResult == 0) {
// ken和amount相等
wmsFpStorageNewsSn1.setActiveFlag("0");
wmsFpStorageNewsSnMapper.updateWmsFpStorageNewsSn(wmsFpStorageNewsSn1);
}
}
//改主表
WmsFpStorageNews wmsFpStorageNews=new WmsFpStorageNews();
wmsFpStorageNews.setActiveFlag("1");
wmsFpStorageNews.setWlCode(wmsProductPutTrayCode.getWlCode());
wmsFpStorageNews.setProductCode(wmsSellOutEmbryo1.getProductCode());
wmsFpStorageNewsMapper.updateWmsFpStorageNewsOut(wmsFpStorageNews);
}
return result1;
}
@Override
public WmsFpStorageNewsSn palletScanning(WmsFpStorageNewsSn wmsFpStorageNewsSn) {
DynamicDataSourceContextHolder.push("ds_" + wmsFpStorageNewsSn.getFactoryCode());
wmsFpStorageNewsSn.setActiveFlag("1");
List<WmsFpStorageNewsSn> wmsFpStorageNewsSnList= wmsFpStorageNewsSnMapper.selectWmsFpStorageNewsSnList(wmsFpStorageNewsSn);
if (wmsFpStorageNewsSnList.size()>0){
return wmsFpStorageNewsSnList.get(0);
}
return null;
}
@Override
public String palletTransferConfirmation(WmsFpStorageNewsSn wmsFpStorageNewsSn) {
String result1="移库成功";
DynamicDataSourceContextHolder.push("ds_" + wmsFpStorageNewsSn.getFactoryCode());
String toWlCode=wmsFpStorageNewsSn.getTowlCode();
WmsFpStorageNewsSn wmsFpStorageNewsSn1= wmsFpStorageNewsSnMapper.selectWmsFpStorageNewsSnByStorageId(wmsFpStorageNewsSn.getStorageId());
//减库存明细
wmsFpStorageNewsSn1.setActiveFlag("0");
wmsFpStorageNewsSnMapper.updateWmsFpStorageNewsSn(wmsFpStorageNewsSn1);
//减库存
WmsFpStorageNews wmsFpStorageNews= wmsFpStorageNewsMapper.selectWmsFpStorageNewsByProductCodeAndWlCode(wmsFpStorageNewsSn.getProductCode(),wmsFpStorageNewsSn.getWlCode());
BigDecimal amount = wmsFpStorageNews.getAmount();
BigDecimal amountsub = amount.subtract(wmsFpStorageNewsSn1.getAmount());
wmsFpStorageNews.setAmount(amountsub);
wmsFpStorageNewsMapper.updateWmsFpStorageNews(wmsFpStorageNews);
//添加库存明细
WmsFpStorageNewsSn wmsFpStorageNewsSn2 = new WmsFpStorageNewsSn();
wmsFpStorageNewsSn2.setStorageId(IdUtils.fastSimpleUUID());
wmsFpStorageNewsSn2.setFactoryCode(wmsFpStorageNewsSn.getFactoryCode());
wmsFpStorageNewsSn2.setWhCode(wmsFpStorageNewsSn.getWhCode());//仓库编码
wmsFpStorageNewsSn2.setWlCode(toWlCode);
wmsFpStorageNewsSn2.setProductCode(wmsFpStorageNewsSn.getProductCode());
wmsFpStorageNewsSn2.setProductName(wmsFpStorageNewsSn.getProductName());
wmsFpStorageNewsSn2.setSn(wmsFpStorageNewsSn.getSn());
wmsFpStorageNewsSn2.setAmount(wmsFpStorageNewsSn.getAmount());
//wmsFpStorageNewsSn.setBatchNumber(wmsProductPut.getBatchNumber());
// wmsFpStorageNewsSn2.setUserDefined2(formattedDate);
wmsFpStorageNewsSn2.setCreateBy(wmsFpStorageNewsSn.getCreateBy());
wmsFpStorageNewsSn2.setCreateTime(new Date());
wmsFpStorageNewsSn2.setActiveFlag("1");
wmsFpStorageNewsSnMapper.insertWmsFpStorageNewsSn(wmsFpStorageNewsSn2);
//添加库存
WmsFpStorageNews wmsFpStorageNews1 = new WmsFpStorageNews();
wmsFpStorageNews1.setWhCode(wmsFpStorageNewsSn.getWhCode());//仓库编码
wmsFpStorageNews1.setWlCode(toWlCode);
wmsFpStorageNews1.setStorageType("成品");
wmsFpStorageNews1.setProductCode(wmsFpStorageNewsSn.getProductCode());
wmsFpStorageNews1.setProductName(wmsFpStorageNewsSn.getProductName());
wmsFpStorageNews1.setFactoryCode(wmsFpStorageNewsSn.getFactoryCode());
wmsFpStorageNews1.setActiveFlag("1");
wmsFpStorageNews1.setUserDefined1(wmsFpStorageNews.getUserDefined1());
List<WmsFpStorageNews> wmsFpStorageNewsList = wmsFpStorageNewsMapper.selectWmsFpStorageNewsList(wmsFpStorageNews1);
wmsFpStorageNews1.setStorageId(IdUtils.fastSimpleUUID());
wmsFpStorageNews1.setAmount(wmsFpStorageNewsSn.getAmount());
wmsFpStorageNews1.setCreateBy(wmsFpStorageNewsSn.getCreateBy());
wmsFpStorageNews1.setCreateTime(new Date());
if (wmsFpStorageNewsList.size() > 0) {
WmsFpStorageNews wmsFpStorageNews2 = wmsFpStorageNewsList.get(0);
BigDecimal amount1 = wmsFpStorageNews2.getAmount();
BigDecimal amountAdd = amount1.add(wmsFpStorageNews.getAmount());
wmsFpStorageNews2.setAmount(amountAdd);
wmsFpStorageNewsMapper.updateWmsFpStorageNews(wmsFpStorageNews2);
} else {
wmsFpStorageNewsMapper.insertWmsFpStorageNews(wmsFpStorageNews1);
}
return result1;
}
}

@ -212,7 +212,7 @@
<!--查询总数-->
<select id="queryCount" parameterType="BaseArea" resultType="java.lang.Integer">
select count(*)
select count(1)
from base_area
where del_flag = '0'
</select>

@ -267,7 +267,7 @@
</select>
<select id="selectChildNodes" parameterType="com.op.wms.domain.BaseBom" resultType="Integer">
select count(*) as number
select count(1) as number
from base_bom_component
where cumc = #{component}
and bom_code = #{bomCode}

@ -152,7 +152,7 @@
</update>
<select id="queryCount" parameterType="BaseWarehouse" resultType="java.lang.Integer">
select count(*)
select count(1)
from base_warehouse
and del_flag = '0'
</select>

@ -160,14 +160,14 @@
<if test="productName != null">product_name,</if>
<if test="productCode != null">product_code,</if>
<if test="productSort != null">product_sort,</if>
<if test="specification != null">specification,</if>
<if test="speciFication != null">specification,</if>
<if test="unitOfMeasure != null">unit_of_measure,</if>
<if test="planQuantity != null">plan_quantity,</if>
<if test="putQuantity != null">put_quantity,</if>
<if test="status != null">status,</if>
<if test="SAPStatus != null">SAP_status,</if>
<if test="SAPProof != null">SAP_proof,</if>
<if test="SAPMessage != null">SAP_message,</if>
<if test="sapStatus != null">SAP_status,</if>
<if test="sapProof != null">SAP_proof,</if>
<if test="sapMessage != null">SAP_message,</if>
<if test="putDate != null">put_date,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
@ -195,14 +195,14 @@
<if test="productName != null">#{productName},</if>
<if test="productCode != null">#{productCode},</if>
<if test="productSort != null">#{productSort},</if>
<if test="specification != null">#{specification},</if>
<if test="speciFication != null">#{speciFication},</if>
<if test="unitOfMeasure != null">#{unitOfMeasure},</if>
<if test="planQuantity != null">#{planQuantity},</if>
<if test="putQuantity != null">#{putQuantity},</if>
<if test="status != null">#{status},</if>
<if test="SAPStatus != null">#{SAPStatus},</if>
<if test="SAPProof != null">#{SAPProof},</if>
<if test="SAPMessage != null">#{SAPMessage},</if>
<if test="sapStatus != null">#{sapStatus},</if>
<if test="sapProof != null">#{sapProof},</if>
<if test="sapMessage != null">#{sapMessage},</if>
<if test="putDate != null">#{putDate},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>

@ -44,6 +44,45 @@
<result property="activeFlag" column="active_flag"/>
</resultMap>
<resultMap type="WmsAllocationOutEmbryo" id="WmsAllocationOutEmbryoResult">
<result property="id" column="id"/>
<result property="deliveryOrder" column="delivery_order"/>
<result property="itemNumber" column="Item_number"/>
<result property="factoryCode" column="factory_code"/>
<result property="whCode" column="wh_code"/>
<result property="waCode" column="wa_code"/>
<result property="wlCode" column="wl_code"/>
<result property="deliveryPlace" column="delivery_place"/>
<result property="productName" column="product_name"/>
<result property="productCode" column="product_code"/>
<result property="productSort" column="product_sort"/>
<result property="specification" column="specification"/>
<result property="unitOfMeasure" column="unit_of_measure"/>
<result property="lotNumber" column="lot_number"/>
<result property="planQuantity" column="plan_quantity"/>
<result property="outQuantity" column="out_quantity"/>
<result property="status" column="status"/>
<result property="sapStatus" column="SAP_status"/>
<result property="sapProof" column="SAP_proof"/>
<result property="sapMessage" column="SAP_message"/>
<result property="outDate" column="out_date"/>
<result property="attr1" column="attr1"/>
<result property="attr2" column="attr2"/>
<result property="attr3" column="attr3"/>
<result property="attr4" column="attr4"/>
<result property="attr5" column="attr5"/>
<result property="attr6" column="attr6"/>
<result property="attr7" column="attr7"/>
<result property="attr8" column="attr8"/>
<result property="attr9" column="attr9"/>
<result property="attr10" column="attr10"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
<result property="activeFlag" column="active_flag"/>
</resultMap>
<sql id="selectWmsSellOutEmbryoVo">
select id, delivery_order, Item_number,active_flag, factory_code, wh_code, wa_code, wl_code, delivery_place, product_name, product_code, product_sort, specification, unit_of_measure, lot_number, plan_quantity, out_quantity, status, SAP_status, SAP_proof, SAP_message, out_date, attr1, attr2, attr3, attr4, attr5, attr6, attr7, attr8, attr9, attr10, create_by, create_time, update_by, update_time, remark from wms_sell_out_embryo
</sql>
@ -242,4 +281,168 @@
#{id}
</foreach>
</delete>
<select id="selectWmsAllocationOutEmbryoList" resultMap="WmsAllocationOutEmbryoResult">
SELECT
id,
delivery_order,
Item_number,
active_flag,
factory_code,
wh_code,
wa_code,
wl_code,
delivery_place,
product_name,
product_code,
product_sort,
specification,
unit_of_measure,
lot_number,
plan_quantity,
out_quantity,
status,
SAP_status,
SAP_proof,
SAP_message,
out_date,
attr1,
attr2,
attr3,
attr4,
attr5,
attr6,
attr7,
attr8,
attr9,
attr10,
create_by,
create_time,
update_by,
update_time,
remark
FROM
wms_allocation_out_embryo
<where>
<if test="deliveryOrder != null and deliveryOrder != ''">and delivery_order = #{deliveryOrder}</if>
<if test="itemNumber != null and itemNumber != ''">and Item_number = #{itemNumber}</if>
<if test="factoryCode != null and factoryCode != ''">and factory_code = #{factoryCode}</if>
<if test="whCode != null and whCode != ''">and wh_code = #{whCode}</if>
<if test="waCode != null and waCode != ''">and wa_code = #{waCode}</if>
<if test="wlCode != null and wlCode != ''">and wl_code = #{wlCode}</if>
<if test="deliveryPlace != null and deliveryPlace != ''">and delivery_place = #{deliveryPlace}</if>
<if test="productName != null and productName != ''">and product_name like concat('%', #{productName},
'%')
</if>
<if test="productCode != null and productCode != ''">and product_code = #{productCode}</if>
<if test="productSort != null and productSort != ''">and product_sort = #{productSort}</if>
<if test="specification != null and specification != ''">and specification = #{specification}</if>
<if test="unitOfMeasure != null and unitOfMeasure != ''">and unit_of_measure = #{unitOfMeasure}</if>
<if test="lotNumber != null and lotNumber != ''">and lot_number = #{lotNumber}</if>
<if test="planQuantity != null ">and plan_quantity = #{planQuantity}</if>
<if test="outQuantity != null ">and out_quantity = #{outQuantity}</if>
<if test="status != null and status != ''">and status = #{status}</if>
<if test="sapStatus != null and sapStatus != ''">and SAP_status = #{sapStatus}</if>
<if test="sapProof != null and sapProof != ''">and SAP_proof = #{sapProof}</if>
<if test="sapMessage != null and sapMessage != ''">and SAP_message = #{sapMessage}</if>
<if test="outDate != null ">and out_date = #{outDate}</if>
<if test="activeFlag != null and activeFlag != ''">and active_flag = #{activeFlag}</if>
<if test="attr1 != null and attr1 != ''">and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''">and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''">and attr3 = #{attr3}</if>
<if test="attr4 != null and attr4 != ''">and attr4 = #{attr4}</if>
<if test="attr5 != null and attr5 != ''">and attr5 = #{attr5}</if>
<if test="attr6 != null and attr6 != ''">and attr6 = #{attr6}</if>
<if test="attr7 != null and attr7 != ''">and attr7 = #{attr7}</if>
<if test="attr8 != null and attr8 != ''">and attr8 = #{attr8}</if>
<if test="attr9 != null and attr9 != ''">and attr9 = #{attr9}</if>
<if test="attr10 != null and attr10 != ''">and attr10 = #{attr10}</if>
</where>
</select>
<select id="selectWmsAllocationOutEmbryoById" parameterType="String" resultMap="WmsAllocationOutEmbryoResult">
SELECT
id,
delivery_order,
Item_number,
active_flag,
factory_code,
wh_code,
wa_code,
wl_code,
delivery_place,
product_name,
product_code,
product_sort,
specification,
unit_of_measure,
lot_number,
plan_quantity,
COALESCE(out_quantity, 0)
status,
SAP_status,
SAP_proof,
SAP_message,
out_date,
attr1,
attr2,
attr3,
attr4,
attr5,
attr6,
attr7,
attr8,
attr9,
attr10,
create_by,
create_time,
update_by,
update_time,
remark
FROM
wms_allocation_out_embryo
where id = #{id}
</select>
<update id="updateWmsAllocationOutEmbryo" >
update wms_allocation_out_embryo
<trim prefix="SET" suffixOverrides=",">
<if test="deliveryOrder != null">delivery_order = #{deliveryOrder},</if>
<if test="itemNumber != null">Item_number = #{itemNumber},</if>
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
<if test="whCode != null">wh_code = #{whCode},</if>
<if test="waCode != null">wa_code = #{waCode},</if>
<if test="wlCode != null">wl_code = #{wlCode},</if>
<if test="deliveryPlace != null">delivery_place = #{deliveryPlace},</if>
<if test="productName != null">product_name = #{productName},</if>
<if test="productCode != null">product_code = #{productCode},</if>
<if test="productSort != null">product_sort = #{productSort},</if>
<if test="specification != null">specification = #{specification},</if>
<if test="unitOfMeasure != null">unit_of_measure = #{unitOfMeasure},</if>
<if test="lotNumber != null">lot_number = #{lotNumber},</if>
<if test="planQuantity != null">plan_quantity = #{planQuantity},</if>
<if test="outQuantity != null">out_quantity = #{outQuantity},</if>
<if test="status != null">status = #{status},</if>
<if test="sapStatus != null">SAP_status = #{sapStatus},</if>
<if test="sapProof != null">SAP_proof = #{sapProof},</if>
<if test="sapMessage != null">SAP_message = #{sapMessage},</if>
<if test="outDate != null">out_date = #{outDate},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>
<if test="attr4 != null">attr4 = #{attr4},</if>
<if test="attr5 != null">attr5 = #{attr5},</if>
<if test="attr6 != null">attr6 = #{attr6},</if>
<if test="attr7 != null">attr7 = #{attr7},</if>
<if test="attr8 != null">attr8 = #{attr8},</if>
<if test="attr9 != null">attr9 = #{attr9},</if>
<if test="attr10 != null">attr10 = #{attr10},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
</mapper>

Loading…
Cancel
Save