Compare commits

..

2 Commits

@ -0,0 +1,38 @@
package com.os.common.constant;
/**
* MES
*
* @author ruoyi
*/
public class MesConstants
{
/**
* -
*/
public static final String MES_PROCESS_OUT_CLOTH = "1010";
/**
* -
*/
public static final String MES_PROCESS_FORMING = "1011";
/**
* -
*/
public static final String MES_PROCESS_LAGGING = "1012";
/**
* -
*/
public static final String MES_PROCESS_VULCANIZATION = "1020";
/**
* -270
*/
public static final String MES_PROCESS_270_FILM = "1030";
}

@ -47,7 +47,7 @@ public class ERPStaffSalary
private String groupId;
/** 事件日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
@JsonProperty(value = "EventDate")
private Date eventDate;

@ -4,6 +4,7 @@ import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.os.common.utils.StringUtils;
import com.os.mes.api.domain.*;
import com.os.mes.api.service.IERPPortService;
@ -24,10 +25,7 @@ import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.*;
/**
@ -176,7 +174,7 @@ public class ERPPortServiceImpl implements IERPPortService {
erpStaffSalary.setController(ERPConstants.addSalaryController);
erpStaffSalary.setActionName(ERPConstants.addSalaryActionName);
erpStaffSalary.setIdCard(recordStaffSalary.getIdCard());
erpStaffSalary.setGroupId(recordStaffSalary.getGroupId());
// erpStaffSalary.setGroupId(recordStaffSalary.getGroupId());
erpStaffSalary.setEventDate(recordStaffSalary.getEventDate());
erpStaffSalary.setSalaryCategory(recordStaffSalary.getSalaryCategory());
erpStaffSalary.setRevenueClass(recordStaffSalary.getRevenueClass());
@ -185,6 +183,8 @@ public class ERPPortServiceImpl implements IERPPortService {
try {
// 创建ObjectMapper实例 对象转JSON字符串
ObjectMapper objectMapper = new ObjectMapper();
// objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
// objectMapper.setTimeZone(TimeZone.getTimeZone("UTC"));
objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.UPPER_CAMEL_CASE);
requestParam = objectMapper.writeValueAsString(erpStaffSalary);
result = ApiUtils.sendERPHttpPost(ERPConstants.ERP_URL, requestParam);
@ -208,6 +208,7 @@ public class ERPPortServiceImpl implements IERPPortService {
HashMap returnData = (HashMap) hashMap.get("ReturnData");
HashMap<String, Object> data = (HashMap<String, Object>) returnData.get("data");
objectId = String.valueOf(data.get("ObjectId"));
logger.info("新增【薪资明细】成功:" + requestParam + "|" + result);
} catch (Exception e) {
logger.warn("新增【薪资明细】异常:" + requestParam + "|" + result + "|" + e);
}

@ -154,9 +154,9 @@ public class ProdOrderInfo extends BaseEntity {
private String printName;
/**
*
* ERP0 1
*/
@Excel(name = "预留标识")
@Excel(name = "ERP上传标识0未上传 1已上传")
private String isFlag;
/**

@ -4,6 +4,7 @@ import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.os.common.annotation.Excel;
@ -116,6 +117,162 @@ public class ProdPlanExecuteUser extends BaseEntity {
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date updatedTime;
/**
*
*/
@Excel(name = "工资系数")
private BigDecimal wageCoefficient;
/**
* m
*/
@Excel(name = "客户要求输送带长度m")
private BigDecimal BeltRequiredLength;
/**
*
*/
@Excel(name = "成型面积")
@JsonProperty(value = "FormingArea")
private BigDecimal FormingArea;
/**
*
*/
@Excel(name = "硫化面积")
@JsonProperty(value = "SulfurizationArea")
private BigDecimal SulfurizationArea;
/**
*
*/
@Excel(name = "压延包胶面积")
@JsonProperty(value = "RollCoatingArea")
private BigDecimal RollCoatingArea;
/**
*
*/
@Excel(name = "压延出布面积")
@JsonProperty(value = "RolledFabricArea")
private BigDecimal RolledFabricArea;
/** 身份证 */
@Excel(name = "身份证")
private String idCard;
/**
*
*/
@Excel(name = "班组编号")
private String teamCode;
/**
*
*/
@Excel(name = "班组名称")
private String teamName;
/**
*
*/
@Excel(name = "生产次数(锅数)")
private String batchNumber;
/**
*
*/
@Excel(name = "输送带长度规格")
private String BeltLengthSpecifications;
public BigDecimal getRollCoatingArea() {
return RollCoatingArea;
}
public void setRollCoatingArea(BigDecimal rollCoatingArea) {
RollCoatingArea = rollCoatingArea;
}
public BigDecimal getRolledFabricArea() {
return RolledFabricArea;
}
public void setRolledFabricArea(BigDecimal rolledFabricArea) {
RolledFabricArea = rolledFabricArea;
}
public String getBeltLengthSpecifications() {
return BeltLengthSpecifications;
}
public void setBeltLengthSpecifications(String beltLengthSpecifications) {
BeltLengthSpecifications = beltLengthSpecifications;
}
public String getBatchNumber() {
return batchNumber;
}
public void setBatchNumber(String batchNumber) {
this.batchNumber = batchNumber;
}
public String getIdCard() {
return idCard;
}
public void setIdCard(String idCard) {
this.idCard = idCard;
}
public String getTeamCode() {
return teamCode;
}
public void setTeamCode(String teamCode) {
this.teamCode = teamCode;
}
public String getTeamName() {
return teamName;
}
public void setTeamName(String teamName) {
this.teamName = teamName;
}
public BigDecimal getBeltRequiredLength() {
return BeltRequiredLength;
}
public void setBeltRequiredLength(BigDecimal beltRequiredLength) {
BeltRequiredLength = beltRequiredLength;
}
public BigDecimal getFormingArea() {
return FormingArea;
}
public void setFormingArea(BigDecimal formingArea) {
FormingArea = formingArea;
}
public BigDecimal getSulfurizationArea() {
return SulfurizationArea;
}
public void setSulfurizationArea(BigDecimal sulfurizationArea) {
SulfurizationArea = sulfurizationArea;
}
public BigDecimal getWageCoefficient() {
return wageCoefficient;
}
public void setWageCoefficient(BigDecimal wageCoefficient) {
this.wageCoefficient = wageCoefficient;
}
public String getStationName() {
return stationName;
}

@ -114,6 +114,7 @@ public class ProdPlanErpInfoServiceImpl implements IProdPlanErpInfoService {
if (StringUtils.isNotEmpty(equipmentNo)) {
BaseDeviceLedger deviceLedger = deviceLedgerMapper.selectBaseDeviceLedgerByDeviceCode(equipmentNo);
if (StringUtils.isNotNull(deviceLedger)){
// 出布、成型、包胶、硫化
planErpInfo.setStationCode(deviceLedger.getProductLineCode());
planErpInfo.setProcessCode(deviceLedger.getProcessCode());
}

@ -52,6 +52,7 @@ public class ProdPlanInfoServiceImpl implements IProdPlanInfoService {
*/
@Override
public int insertProdPlanInfo(ProdPlanInfo prodPlanInfo) {
prodPlanInfo.setCreatedTime(DateUtils.getNowDate());
return prodPlanInfoMapper.insertProdPlanInfo(prodPlanInfo);
}
@ -63,6 +64,7 @@ public class ProdPlanInfoServiceImpl implements IProdPlanInfoService {
*/
@Override
public int updateProdPlanInfo(ProdPlanInfo prodPlanInfo) {
prodPlanInfo.setUpdatedTime(DateUtils.getNowDate());
return prodPlanInfoMapper.updateProdPlanInfo(prodPlanInfo);
}

@ -104,6 +104,19 @@ public class RecordStaffSalary extends BaseEntity
/** 工序编号 */
private String processCode;
/**
*
*/
private String orderCode;
public String getOrderCode() {
return orderCode;
}
public void setOrderCode(String orderCode) {
this.orderCode = orderCode;
}
public String getProcessCode() {
return processCode;
}

@ -3,7 +3,9 @@ package com.os.mes.record.service.impl;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
import java.util.stream.Collectors;
import com.os.common.constant.MesConstants;
import com.os.common.exception.ServiceException;
import com.os.common.utils.DateUtils;
import com.os.common.utils.StringUtils;
@ -19,8 +21,10 @@ import com.os.mes.base.mapper.BaseStaffInfoMapper;
import com.os.mes.base.mapper.BaseTeamMembersMapper;
import com.os.mes.prod.domain.ProdOrderInfo;
import com.os.mes.prod.domain.ProdPlanDetail;
import com.os.mes.prod.domain.ProdPlanExecuteUser;
import com.os.mes.prod.domain.ProdPlanInfo;
import com.os.mes.prod.mapper.ProdOrderInfoMapper;
import com.os.mes.prod.mapper.ProdPlanExecuteUserMapper;
import com.os.mes.prod.mapper.ProdPlanInfoMapper;
import com.os.mes.record.domain.RecordStaffCommute;
import com.os.mes.record.domain.StaffSalaryVo;
@ -60,7 +64,7 @@ public class RecordStaffSalaryServiceImpl implements IRecordStaffSalaryService {
private BaseProcessInfoMapper baseProcessInfoMapper;
@Autowired
private RecordStaffCommuteMapper recordStaffCommuteMapper;
private ProdPlanExecuteUserMapper prodPlanExecuteUserMapper;
@Autowired
private IERPPortService portService;
@ -136,10 +140,10 @@ public class RecordStaffSalaryServiceImpl implements IRecordStaffSalaryService {
*
* = **/
* =/*
*
* <p>
* 1
* 2
* 3 = * (/*) * (/) * (/)
* 3 = * (/*) * (/)
*
* @param recordStaffSalary
* @return
@ -150,14 +154,12 @@ public class RecordStaffSalaryServiceImpl implements IRecordStaffSalaryService {
//调用最新工资系数接口
LatestSalary salaryData = portService.getERPLatestSalaryData(new ERPParamDto());
//遍历工序
BaseProcessInfo selectProcessInfo = new BaseProcessInfo();
selectProcessInfo.setProcessCode(recordStaffSalary.getProcessCode());
List<BaseProcessInfo> processInfoList = baseProcessInfoMapper.selectBaseProcessInfoList(selectProcessInfo);
List<BaseTeamMembers> teamMembers = baseTeamMembersMapper.selectBaseTeamMembersList(new BaseTeamMembers());
ProdPlanInfo planInfo = new ProdPlanInfo();
Map<String, Object> params = recordStaffSalary.getParams();
planInfo.setParams(params);
ProdPlanExecuteUser selectExecuteUser = new ProdPlanExecuteUser();
selectExecuteUser.setParams(params); //beginOrderDate、endOrderDate
List<ProdPlanExecuteUser> planUserList = prodPlanExecuteUserMapper.selectProdPlanExecuteUserList(selectExecuteUser);
Date beginOrderDate = null;
Date endOrderDate = null;
@ -170,14 +172,104 @@ public class RecordStaffSalaryServiceImpl implements IRecordStaffSalaryService {
long objId = 1L;
String taskCode = PlanCodeUtils.getTaskCode();
Map<String, List<ProdPlanExecuteUser>> orderCodeMap = planUserList.stream().collect(Collectors.groupingBy(ProdPlanExecuteUser::getOrderCode));
for (String orderCode : orderCodeMap.keySet()) {
List<ProdPlanExecuteUser> orderCodeUserList = orderCodeMap.get(orderCode);
for (ProdPlanExecuteUser prodPlanExecuteUser : orderCodeUserList) {
//工序工资系数
BigDecimal coefficient = new BigDecimal(0);
//工序生产面积
BigDecimal totalArea = new BigDecimal(0);
///参加该工序的所有人的工资系数的总和
BigDecimal wageCoefficientSum = new BigDecimal(0);
///该工序的输送带面积
BigDecimal beltTotalArea = new BigDecimal(0);
//当前工序编号
String currentProcessCode = null;
//硫化工序 工序硫化的工资 = 硫化系数*硫化面积*(工资系数/参加该工序的所有人的工资系数的总和)
//硫化面积=硫化米数/客户要求总米数*硫化面积
if (prodPlanExecuteUser.getProcessCode().equals(MesConstants.MES_PROCESS_VULCANIZATION)) {
coefficient = salaryData.getVulcanizationCoefficient();
beltTotalArea = prodPlanExecuteUser.getSulfurizationArea();
}
//出布工序
if (prodPlanExecuteUser.getProcessCode().equals(MesConstants.MES_PROCESS_OUT_CLOTH)) {
coefficient = salaryData.getDistributionCoefficient();
beltTotalArea = prodPlanExecuteUser.getRolledFabricArea();
}
//成型工序
if (prodPlanExecuteUser.getProcessCode().equals(MesConstants.MES_PROCESS_FORMING)) {
beltTotalArea = prodPlanExecuteUser.getFormingArea();
}
//包胶工序
if (prodPlanExecuteUser.getProcessCode().equals(MesConstants.MES_PROCESS_LAGGING)) {
coefficient = salaryData.getEncapsulationCoefficient();
beltTotalArea = prodPlanExecuteUser.getRollCoatingArea();
}
//(每个工单的实际硫化米数/客户要求总米数*硫化面积)
for (BaseProcessInfo processInfo : processInfoList) {
List<StaffSalaryVo> salaryVoList = selectSumEmployeeSalary(processInfo.getProcessCode());
for (StaffSalaryVo staffSalaryVo : salaryVoList) {
totalArea = prodPlanExecuteUser.getCompleteAmount()
.divide(prodPlanExecuteUser.getBeltRequiredLength(), 12, RoundingMode.HALF_UP)
.multiply(beltTotalArea);
wageCoefficientSum = orderCodeUserList.stream().filter(e -> e.getPlanCode().equals(prodPlanExecuteUser.getPlanCode())
&& e.getBatchNumber().equals(prodPlanExecuteUser.getBatchNumber()))
.map(ProdPlanExecuteUser::getWageCoefficient).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal revenueAmount = new BigDecimal(0);//员工收入
if (wageCoefficientSum.compareTo(BigDecimal.ZERO) > 0){
BigDecimal staffCoefficient = prodPlanExecuteUser.getWageCoefficient().divide(wageCoefficientSum, 12, RoundingMode.HALF_UP);
revenueAmount = coefficient.multiply(totalArea).multiply(staffCoefficient).setScale(2, RoundingMode.HALF_UP);
}
if (StringUtils.isNotEmpty(prodPlanExecuteUser.getTeamCode())) {
for (BaseTeamMembers teamMember : teamMembers) {
if (prodPlanExecuteUser.getTeamCode().contains(teamMember.getTeamCode())) {
if (StringUtils.isEmpty(prodPlanExecuteUser.getTeamName())) {
prodPlanExecuteUser.setTeamName(teamMember.getTeamName());
} else {
prodPlanExecuteUser.setTeamName(prodPlanExecuteUser.getTeamName() + "," + teamMember.getTeamName());
}
}
}
}
String teamCode = prodPlanExecuteUser.getTeamCode();
String teamName = prodPlanExecuteUser.getTeamName();
String idCard = prodPlanExecuteUser.getIdCard();
String revenueReason = prodPlanExecuteUser.getStationName().substring(0, 2) + " "
+ prodPlanExecuteUser.getBeltLengthSpecifications() + " " + prodPlanExecuteUser.getOrderCode();
RecordStaffSalary staffSalary = new RecordStaffSalary();
for (RecordStaffSalary staff : result) {
if (staff.getIdCard().equals(idCard) && staff.getGroupId().equals(prodPlanExecuteUser.getTeamCode())
&& staff.getRevenueReason().equals(revenueReason)) {
staffSalary = staff;
}
}
if (StringUtils.isEmpty(staffSalary.getCardId())) {
staffSalary.setObjId(objId++);
staffSalary.setTaskCode(taskCode);
staffSalary.setIdCard(prodPlanExecuteUser.getIdCard());
staffSalary.setGroupId(teamCode);
staffSalary.setEventDate(new Date());
staffSalary.setSalaryCategory("收入");
staffSalary.setRevenueClass("完成生产任务");
revenueAmount = revenueAmount.setScale(2, RoundingMode.HALF_UP);
staffSalary.setRevenueAmount(revenueAmount);
staffSalary.setSalaryCoefficient(prodPlanExecuteUser.getWageCoefficient());
staffSalary.setStaffName(prodPlanExecuteUser.getStaffName());
staffSalary.setCardId(idCard);
staffSalary.setTeamName(teamName);
staffSalary.setBeginDate(beginOrderDate);
staffSalary.setEndDate(endOrderDate);
staffSalary.setRevenueReason(revenueReason);
staffSalary.setOrderCode(prodPlanExecuteUser.getOrderCode());
result.add(staffSalary);
} else {
staffSalary.setRevenueAmount(staffSalary.getRevenueAmount().add(revenueAmount));
staffSalary.setGroupId(teamCode);
staffSalary.setTeamName(teamName);
}
}
}
return result;
@ -186,6 +278,7 @@ public class RecordStaffSalaryServiceImpl implements IRecordStaffSalaryService {
/**
*
*
* @param processCode
* @return
*/
@ -208,12 +301,12 @@ public class RecordStaffSalaryServiceImpl implements IRecordStaffSalaryService {
sumSalaryCoefficient = sumSalaryCoefficient.add(baseStaffInfo.getWageCoefficient());
boolean isRepeat = true;
for (StaffSalaryVo salaryVo : employeeList) {
if (salaryVo.getStaffId().equals(baseStaffInfo.getStaffId())){
if (salaryVo.getStaffId().equals(baseStaffInfo.getStaffId())) {
salaryVo.setSalaryCoefficient(salaryVo.getSumSalaryCoefficient().add(sumSalaryCoefficient));
isRepeat = false;
}
}
if (isRepeat){
if (isRepeat) {
employeeList.add(salary);
}
}
@ -363,7 +456,13 @@ public class RecordStaffSalaryServiceImpl implements IRecordStaffSalaryService {
for (RecordStaffSalary staffSalary : recordStaffSalaryList) {
String objectId = portService.addSalaryBreakdown(staffSalary);
staffSalary.setObjectId(objectId);
staffSalary.setCreateTime(DateUtils.getNowDate());
recordStaffSalaryMapper.insertRecordStaffSalary(staffSalary);
//更新ERP上传标识
ProdOrderInfo orderInfo = new ProdOrderInfo();
orderInfo.setOrderCode(staffSalary.getOrderCode());
orderInfo.setIsFlag("1");
prodOrderInfoMapper.updateProdOrderInfo(orderInfo);
}
});
thread.start(); //启动新线程

@ -160,7 +160,7 @@
<select id="selectProdOrderDetailList" parameterType="ProdOrderDetail" resultMap="ProdOrderDetailResult">
<include refid="selectProdOrderDetailVo"/>
<where>
<if test="SeqNo != null and SeqNo != ''">and SeqNo = #{SeqNo}</if>
<if test="SeqNo != null and SeqNo != ''">and SeqNo like concat('%', #{SeqNo}, '%')</if>
<if test="params.beginOrderDate != null and params.beginOrderDate != '' and params.endOrderDate != null and params.endOrderDate != ''">
and OrderDate between #{params.beginOrderDate} and #{params.endOrderDate}
</if>

@ -213,7 +213,7 @@
<select id="selectProdOrderInfoList" parameterType="ProdOrderInfo" resultMap="ProdOrderInfoResult">
<include refid="selectProdOrderInfoVo"/>
<where>
<if test="orderCode != null and orderCode != ''">and poi.order_code = #{orderCode}</if>
<if test="orderCode != null and orderCode != ''">and poi.order_code like concat('%', #{orderCode}, '%')</if>
<if test="saleOrderCode != null and saleOrderCode != ''">and poi.sale_order_code = #{saleOrderCode}</if>
<if test="saleOrderLineNumber != null and saleOrderLineNumber != ''">and sale_order_line_number =
#{saleOrderLineNumber}

@ -19,8 +19,18 @@
<result property="createdTime" column="created_time"/>
<result property="updatedBy" column="updated_by"/>
<result property="updatedTime" column="updated_time"/>
<result property="batchNumber" column="batch_number"/>
<result property="staffName" column="staff_name"/>
<result property="stationName" column="station_name"/>
<result property="wageCoefficient" column="wage_coefficient"/>
<result property="BeltRequiredLength" column="BeltRequiredLength"/>
<result property="FormingArea" column="FormingArea"/>
<result property="SulfurizationArea" column="SulfurizationArea"/>
<result property="idCard" column="pass_word"/>
<result property="teamCode" column="team_code"/>
<result property="BeltLengthSpecifications" column="BeltLengthSpecifications"/>
<result property="RollCoatingArea" column="RollCoatingArea"/>
<result property="RolledFabricArea" column="RolledFabricArea"/>
</resultMap>
<sql id="selectProdPlanExecuteUserVo">
@ -38,30 +48,41 @@
ppeu.created_time,
ppeu.updated_by,
ppeu.updated_time,
ppeu.batch_number,
bsi.staff_name,
bpl.product_line_name station_name
bsi.wage_coefficient,
bpl.product_line_name station_name,
pod.BeltRequiredLength,
pod.SulfurizationArea,
pod.RolledFabricArea,
pod.RollCoatingArea,
pod.FormingArea,
bsi.pass_word,
bsi.team_code,
pod.BeltLengthSpecifications
from prod_plan_execute_user ppeu
left join base_staff_info bsi on bsi.staff_id = ppeu.staff_id
left join base_product_line bpl on bpl.product_line_code = ppeu.station_code
left join prod_order_detail pod on ppeu.order_code = pod.SeqNo
</sql>
<select id="selectProdPlanExecuteUserList" parameterType="ProdPlanExecuteUser"
resultMap="ProdPlanExecuteUserResult">
<include refid="selectProdPlanExecuteUserVo"/>
<where>
<if test="orderCode != null and orderCode != ''">and order_code = #{orderCode}</if>
<if test="planCode != null and planCode != ''">and plan_code = #{planCode}</if>
<if test="processCode != null and processCode != ''">and process_code = #{processCode}</if>
<if test="stationCode != null and stationCode != ''">and station_code = #{stationCode}</if>
<if test="staffId != null and staffId != ''">and staff_id = #{staffId}</if>
<if test="completeAmount != null ">and complete_amount = #{completeAmount}</if>
<if test="planBeginDate != null ">and plan_begin_date = #{planBeginDate}</if>
<if test="planEndDate != null ">and plan_end_date = #{planEndDate}</if>
<if test="isFlag != null and isFlag != ''">and is_flag = #{isFlag}</if>
<if test="createdBy != null and createdBy != ''">and created_by = #{createdBy}</if>
<if test="createdTime != null ">and created_time = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''">and updated_by = #{updatedBy}</if>
<if test="updatedTime != null ">and updated_time = #{updatedTime}</if>
<if test="orderCode != null and orderCode != ''">and ppeu.order_code = #{orderCode}</if>
<if test="planCode != null and planCode != ''">and ppeu.plan_code = #{planCode}</if>
<if test="processCode != null and processCode != ''">and ppeu.process_code = #{processCode}</if>
<if test="stationCode != null and stationCode != ''">and ppeu.station_code = #{stationCode}</if>
<if test="staffId != null and staffId != ''">and ppeu.staff_id = #{staffId}</if>
<if test="completeAmount != null ">and ppeu.complete_amount = #{completeAmount}</if>
<if test="planBeginDate != null ">and ppeu.plan_begin_date = #{planBeginDate}</if>
<if test="planEndDate != null ">and ppeu.plan_end_date = #{planEndDate}</if>
<if test="isFlag != null and isFlag != ''">and ppeu.is_flag = #{isFlag}</if>
<if test="batchNumber != null and batchNumber != ''">and ppeu.batch_number = #{batchNumber}</if>
<if test="params.beginOrderDate != null and params.beginOrderDate != '' and params.endOrderDate != null and params.endOrderDate != ''">
and FORMAT(ppeu.plan_end_date, 'yyyy-MM-dd') between #{params.beginOrderDate} and #{params.endOrderDate}
</if>
</where>
</select>

@ -70,6 +70,8 @@
ppi.updated_time,
ppi.plan_begin_time,
ppi.plan_end_time,
ppi.plan_status,
ppi.process_code,
ppi.import_flag
from prod_plan_info ppi
left join base_product_line bpl on bpl.product_line_code = ppi.station_code

Loading…
Cancel
Save