Merge remote-tracking branch 'origin/master'

# Conflicts:
#	common/src/main/java/com/foreverwin/mesnac/common/constant/Constants.java
zpl 4 years ago
commit 81cd0d3c0b

@ -1,18 +1,18 @@
package com.foreverwin.mesnac.anomaly.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.anomaly.dto.AbnormalBillDto;
import com.foreverwin.mesnac.anomaly.model.AbnormalBill;
import com.foreverwin.mesnac.anomaly.model.AbnormalBillDispose;
import com.foreverwin.mesnac.anomaly.service.AbnormalBillService;
import com.foreverwin.mesnac.meapi.controller.NcCodeController;
import com.foreverwin.mesnac.meapi.controller.WorkCenterController;
import com.foreverwin.mesnac.common.util.StringUtil;
import com.foreverwin.mesnac.meapi.model.DataField;
import com.foreverwin.mesnac.meapi.model.NcCode;
import com.foreverwin.mesnac.meapi.model.WorkCenter;
import com.foreverwin.mesnac.meapi.service.DataFieldListService;
import com.foreverwin.mesnac.meapi.service.NcCodeService;
import com.foreverwin.mesnac.meapi.service.WorkCenterService;
import com.foreverwin.modular.core.util.CommonMethods;
import com.foreverwin.modular.core.util.FrontPage;
import com.foreverwin.modular.core.util.R;
@ -25,7 +25,7 @@ import java.util.List;
/**
*
* @author robert
* @since 2021-06-25
* @since 2021-07-05
*/
@RestController
@RequestMapping("/Z-ABNORMAL-BILL")
@ -38,10 +38,7 @@ public class AbnormalBillController {
private NcCodeService ncCodeService;
@Autowired
private WorkCenterController workCenterController;
@Autowired
private NcCodeController ncCodeController;
private WorkCenterService workCenterService;
@Autowired
private DataFieldListService dataFieldListService;
@ -108,7 +105,7 @@ public class AbnormalBillController {
.or().like(AbnormalBill::getPbUser, frontPage.getGlobalQuery())
.or().like(AbnormalBill::getPbQty, frontPage.getGlobalQuery())
.or().like(AbnormalBill::getDiscover, frontPage.getGlobalQuery())
.or().like(AbnormalBill::getInspecter, frontPage.getGlobalQuery())
.or().like(AbnormalBill::getInspector, frontPage.getGlobalQuery())
.or().like(AbnormalBill::getEntityLocation, frontPage.getGlobalQuery())
.or().like(AbnormalBill::getReportFrom, frontPage.getGlobalQuery())
.or().like(AbnormalBill::getObjectBo, frontPage.getGlobalQuery())
@ -174,21 +171,25 @@ public class AbnormalBillController {
@GetMapping("/init")
public R init(String messageType){
HashMap<String, Object> hashMap = new HashMap<>();
//消息类型
List<NcCode> ncByNG = ncCodeService.findNcByNG(messageType);
String site = CommonMethods.getSite();
hashMap.put("ncByNG",ncByNG);
//消息类型
if(!StringUtil.isBlank(messageType)){
List<NcCode> ncByNG = ncCodeService.findNcByNG(messageType);
hashMap.put("ncByNG",ncByNG);
}
//工作中心
WorkCenter workCenter = new WorkCenter();
workCenter.setWcCategory("LEVEL4");
R workCenterList = workCenterController.getWorkCenterList(workCenter);
workCenter.setSite(site);
List<WorkCenter> workCenterList = workCenterService.selectList(workCenter);
hashMap.put("workCenter",workCenterList);
//原因分类
NcCode ncCode = new NcCode();
ncCode.setSite(site);
ncCode.setNcCategory("REPAIR");
R causeType = ncCodeController.getNcCodeList(ncCode);
hashMap.put("causeType",causeType);
List<NcCode> ncCodeList = ncCodeService.selectList(ncCode);
hashMap.put("causeType",ncCodeList);
//责任部门
DataField dataField = new DataField();
dataField.setSite(site);
@ -208,15 +209,44 @@ public class AbnormalBillController {
// }
/**
*
*
* @param abnormalBill
* @return
*/
@GetMapping("/anomalyReportOther")
public R anomalyReportOther(AbnormalBill abnormalBill, AbnormalBillDispose abnormalBillDispose){
return R.ok(abnormalBillService.anomalyReportOther(abnormalBill, abnormalBillDispose));
public R anomalyReportOther(AbnormalBill abnormalBill,
AbnormalBillDispose abnormalBillDispose,
@RequestParam List<String> dutyCauseType,
@RequestParam List<String> dutyType){
return R.ok(abnormalBillService.anomalyReportOther(abnormalBill, abnormalBillDispose,dutyCauseType,dutyType));
}
/**
*
* @param abnormalBill
* @param abnormalBillDispose
* @return
*/
@GetMapping("/anomalyReport")
public R anomalyReport(AbnormalBill abnormalBill,
AbnormalBillDispose abnormalBillDispose,
@RequestParam List<String> ncGroupAndNcCodes,
@RequestParam List<String> dutyCauseType,
@RequestParam List<String> dutyType){
return R.ok(abnormalBillService.anomalyReport(abnormalBill, abnormalBillDispose,ncGroupAndNcCodes,dutyCauseType,dutyType));
}
/**
*
* @param abnormalBill
* @return
*/
@GetMapping("/anomalyReportDevice")
public R anomalyReportDevice(AbnormalBill abnormalBill, AbnormalBillDispose abnormalBillDispose){
return R.ok(abnormalBillService.anomalyReportDevice(abnormalBill,abnormalBillDispose));
}
/**
*
* @param handle
@ -228,4 +258,10 @@ public class AbnormalBillController {
abnormalBillService.cancelBrowse(handle,cancelBrowse);
return R.ok();
}
@GetMapping("/backLog")
public R backLog(AbnormalBillDto abnormalBillDto){
return R.ok(abnormalBillService.backLog(abnormalBillDto));
}
}

@ -46,6 +46,8 @@ public class AbnormalCauseController {
@GetMapping("")
public R getAbnormalCauseList(AbnormalCause abnormalCause){
List<AbnormalCause> result;
String site = CommonMethods.getSite();
abnormalCause.setSite(site);
QueryWrapper<AbnormalCause> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(abnormalCause);
result = abnormalCauseService.list(queryWrapper);

@ -46,6 +46,8 @@ public class AbnormalDutyController {
@GetMapping("")
public R getAbnormalDutyList(AbnormalDuty abnormalDuty){
List<AbnormalDuty> result;
String site = CommonMethods.getSite();
abnormalDuty.setSite(site);
QueryWrapper<AbnormalDuty> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(abnormalDuty);
result = abnormalDutyService.list(queryWrapper);

@ -0,0 +1,64 @@
package com.foreverwin.mesnac.anomaly.dto;
import com.foreverwin.mesnac.anomaly.model.AbnormalBill;
import java.time.LocalDateTime;
/**
* @Description TODO
* @Author zhaojiawei
* @Since 2021-07-05
*/
public class AbnormalBillDto extends AbnormalBill {
/**
* seq
*/
String seq;
/**
*
*/
String itemDescription;
/**
*
*/
LocalDateTime startDateTime;
/**
*
*/
LocalDateTime endDateTime;
public String getSeq() {
return seq;
}
public void setSeq(String seq) {
this.seq = seq;
}
public String getItemDescription() {
return itemDescription;
}
public void setItemDescription(String itemDescription) {
this.itemDescription = itemDescription;
}
public LocalDateTime getStartDateTime() {
return startDateTime;
}
public void setStartDateTime(LocalDateTime startDateTime) {
this.startDateTime = startDateTime;
}
public LocalDateTime getEndDateTime() {
return endDateTime;
}
public void setEndDateTime(LocalDateTime endDateTime) {
this.endDateTime = endDateTime;
}
}

@ -1,18 +1,22 @@
package com.foreverwin.mesnac.anomaly.mapper;
import com.foreverwin.mesnac.anomaly.model.AbnormalBill;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.foreverwin.mesnac.anomaly.dto.AbnormalBillDto;
import com.foreverwin.mesnac.anomaly.model.AbnormalBill;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* <p>
* Mapper
* </p>
*
* @author robert
* @since 2021-06-25
* @since 2021-07-05
*/
@Repository
public interface AbnormalBillMapper extends BaseMapper<AbnormalBill> {
List<AbnormalBillDto> backLog(@Param("abnormalBill")AbnormalBillDto abnormalBillDto, @Param("language")String language);
}

@ -1,7 +1,7 @@
package com.foreverwin.mesnac.anomaly.mapper;
import com.foreverwin.mesnac.anomaly.model.AbnormalDuty;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.foreverwin.mesnac.anomaly.model.AbnormalDuty;
import org.springframework.stereotype.Repository;
/**

@ -15,7 +15,7 @@ import java.time.LocalDateTime;
* </p>
*
* @author robert
* @since 2021-06-25
* @since 2021-07-05
*/
@TableName("Z_ABNORMAL_BILL")
@ -40,12 +40,12 @@ public class AbnormalBill extends Model<AbnormalBill> {
@TableField("ABNORMAL_NO")
private String abnormalNo;
/**
* /////
* N/ X/F/J/Q/G
*/
@TableField("STATUS")
private String status;
/**
*
* QZS
*/
@TableField("TYPE")
private String type;
@ -110,7 +110,7 @@ public class AbnormalBill extends Model<AbnormalBill> {
@TableField("NC_QTY")
private String ncQty;
/**
*
* A,B,C
*/
@TableField("PB_GRADE")
private String pbGrade;
@ -130,22 +130,22 @@ public class AbnormalBill extends Model<AbnormalBill> {
@TableField("REPAIR_DATE_TIME")
private LocalDateTime repairDateTime;
/**
*
* Z| W| D K
*/
@TableField("DISCOVER")
private String discover;
/**
*
*/
@TableField("INSPECTER")
private String inspecter;
@TableField("INSPECTOR")
private String inspector;
/**
*
*/
@TableField("ENTITY_LOCATION")
private String entityLocation;
/**
*
* B J R Z
*/
@TableField("REPORT_FROM")
private String reportFrom;
@ -187,8 +187,8 @@ public class AbnormalBill extends Model<AbnormalBill> {
/**
*
*/
@TableField("CREATED_DATA_TIME")
private LocalDateTime createdDataTime;
@TableField("CREATED_DATE_TIME")
private LocalDateTime createdDateTime;
/**
*
*/
@ -200,6 +200,7 @@ public class AbnormalBill extends Model<AbnormalBill> {
@TableField("MODIFIED_DATE_TIME")
private LocalDateTime modifiedDateTime;
public String getHandle() {
return handle;
}
@ -376,12 +377,12 @@ public class AbnormalBill extends Model<AbnormalBill> {
this.discover = discover;
}
public String getInspecter() {
return inspecter;
public String getInspector() {
return inspector;
}
public void setInspecter(String inspecter) {
this.inspecter = inspecter;
public void setInspector(String inspector) {
this.inspector = inspector;
}
public String getEntityLocation() {
@ -456,12 +457,12 @@ public class AbnormalBill extends Model<AbnormalBill> {
this.createdUser = createdUser;
}
public LocalDateTime getCreatedDataTime() {
return createdDataTime;
public LocalDateTime getCreatedDateTime() {
return createdDateTime;
}
public void setCreatedDataTime(LocalDateTime createdDataTime) {
this.createdDataTime = createdDataTime;
public void setCreatedDateTime(LocalDateTime createdDateTime) {
this.createdDateTime = createdDateTime;
}
public String getModifiedUser() {
@ -480,7 +481,7 @@ public class AbnormalBill extends Model<AbnormalBill> {
this.modifiedDateTime = modifiedDateTime;
}
public static final String HANDLE = "HANDLE";
public static final String HANDLE = "HANDLE";
public static final String SITE = "SITE";
@ -524,7 +525,7 @@ public static final String REPAIR_DATE_TIME = "REPAIR_DATE_TIME";
public static final String DISCOVER = "DISCOVER";
public static final String INSPECTER = "INSPECTER";
public static final String INSPECTOR = "INSPECTOR";
public static final String ENTITY_LOCATION = "ENTITY_LOCATION";
@ -544,7 +545,7 @@ public static final String CANCEL_USER = "CANCEL_USER";
public static final String CREATED_USER = "CREATED_USER";
public static final String CREATED_DATA_TIME = "CREATED_DATA_TIME";
public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
public static final String MODIFIED_USER = "MODIFIED_USER";
@ -581,7 +582,7 @@ public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
", pbQty = " + pbQty +
", repairDateTime = " + repairDateTime +
", discover = " + discover +
", inspecter = " + inspecter +
", inspector = " + inspector +
", entityLocation = " + entityLocation +
", reportFrom = " + reportFrom +
", objectBo = " + objectBo +
@ -591,7 +592,7 @@ public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
", cancelDateTime = " + cancelDateTime +
", cancelUser = " + cancelUser +
", createdUser = " + createdUser +
", createdDataTime = " + createdDataTime +
", createdDateTime = " + createdDateTime +
", modifiedUser = " + modifiedUser +
", modifiedDateTime = " + modifiedDateTime +
"}";

@ -2,6 +2,7 @@ package com.foreverwin.mesnac.anomaly.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.mesnac.anomaly.dto.AbnormalBillDto;
import com.foreverwin.mesnac.anomaly.model.AbnormalBill;
import com.foreverwin.mesnac.anomaly.model.AbnormalBillDispose;
import com.foreverwin.modular.core.util.FrontPage;
@ -14,7 +15,7 @@ import java.util.List;
* </p>
*
* @author robert
* @since 2021-06-25
* @since 2021-07-05
*/
public interface AbnormalBillService extends IService<AbnormalBill> {
@ -27,15 +28,33 @@ public interface AbnormalBillService extends IService<AbnormalBill> {
List<AbnormalBill> selectList(AbnormalBill abnormalBill);
String anomalyReportOther(AbnormalBill abnormalBill, AbnormalBillDispose abnormalBillDispose);
String anomalyReportOther(AbnormalBill abnormalBill,
AbnormalBillDispose abnormalBillDispose,
List<String> dutyCauseType,
List<String> dutyType);
String anomalyReport(AbnormalBill abnormalBill,
AbnormalBillDispose abnormalBillDispose,
List<String> ncGroupAndNcCodes,
List<String> dutyCauseType,
List<String> dutyType);
/**
*
* @param abnormalBill
* @param abnormalBillDispose
*/
void generateAbnormalBill(AbnormalBill abnormalBill, AbnormalBillDispose abnormalBillDispose);
void generateAbnormalBill(AbnormalBill abnormalBill, AbnormalBillDispose abnormalBillDispose,List<String> dutyCauseType,List<String> dutyType);
void cancelBrowse(String handle,String cancelBrowse);
String anomalyReportDevice(AbnormalBill abnormalBill,AbnormalBillDispose abnormalBillDispose);
/**
*
* @param abnormalBillDto
* @return
*/
List<AbnormalBillDto> backLog(AbnormalBillDto abnormalBillDto);
}

@ -25,4 +25,5 @@ public interface AbnormalDutyService extends IService<AbnormalDuty> {
IPage<AbnormalDuty> selectPage(FrontPage<AbnormalDuty> frontPage, AbnormalDuty abnormalDuty);
List<AbnormalDuty> selectList(AbnormalDuty abnormalDuty);
}

@ -25,4 +25,5 @@ public interface AbnormalNcCodeService extends IService<AbnormalNcCode> {
IPage<AbnormalNcCode> selectPage(FrontPage<AbnormalNcCode> frontPage, AbnormalNcCode abnormalNcCode);
List<AbnormalNcCode> selectList(AbnormalNcCode abnormalNcCode);
}

@ -3,11 +3,10 @@ package com.foreverwin.mesnac.anomaly.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.foreverwin.mesnac.anomaly.dto.AbnormalBillDto;
import com.foreverwin.mesnac.anomaly.mapper.AbnormalBillMapper;
import com.foreverwin.mesnac.anomaly.model.AbnormalBill;
import com.foreverwin.mesnac.anomaly.model.AbnormalBillDispose;
import com.foreverwin.mesnac.anomaly.service.AbnormalBillDisposeService;
import com.foreverwin.mesnac.anomaly.service.AbnormalBillService;
import com.foreverwin.mesnac.anomaly.model.*;
import com.foreverwin.mesnac.anomaly.service.*;
import com.foreverwin.mesnac.common.enums.HandleEnum;
import com.foreverwin.mesnac.common.helper.NextNumberHelper;
import com.foreverwin.mesnac.common.util.StringUtil;
@ -20,24 +19,29 @@ import com.foreverwin.modular.core.exception.BusinessException;
import com.foreverwin.modular.core.util.CommonMethods;
import com.foreverwin.modular.core.util.FrontPage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
* <p>
*
* </p>
*
* @author robert
* @since 2021-06-25
* @since 2021-07-05
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, AbnormalBill> implements AbnormalBillService {
@Autowired
private AbnormalBillMapper abnormalBillMapper;
@ -56,6 +60,14 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
@Autowired
private NwaUserService nwaUserService;
@Autowired
private AbnormalNcCodeService abnormalNcCodeService;
@Autowired
private AbnormalCauseService abnormalCauseService;
@Autowired
private AbnormalDutyService abnormalDutyService;
@Override
public IPage<AbnormalBill> selectPage(FrontPage<AbnormalBill> frontPage, AbnormalBill abnormalBill) {
@ -72,43 +84,167 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
}
@Override
public String anomalyReportOther(AbnormalBill abnormalBill, AbnormalBillDispose abnormalBillDispose) {
this.generateAbnormalBill(abnormalBill,abnormalBillDispose);
public String anomalyReportOther(AbnormalBill abnormalBill,
AbnormalBillDispose abnormalBillDispose,
List<String> dutyCauseType,
List<String> dutyType) {
this.generateAbnormalBill(abnormalBill,abnormalBillDispose,dutyCauseType,dutyType);
this.saveOrUpdate(abnormalBill);
abnormalBillDisposeService.saveOrUpdate(abnormalBillDispose);
return abnormalBill.getAbnormalNo();
}
@Override
public String anomalyReport(AbnormalBill abnormalBill,
AbnormalBillDispose abnormalBillDispose,
List<String> ncGroupAndNcCodes,
List<String> dutyCauseType,
List<String> dutyType) {
this.generateAbnormalBill(abnormalBill,abnormalBillDispose,dutyCauseType,dutyType);
//获取当前时间
LocalDateTime now = LocalDateTime.now();
//生成不良代码和不良代码组,并把它放到hashMap里面ncCode是存放在异常单里面的ncCode
List<String> ncCode = new ArrayList<>();
List<String> ncGroup = new ArrayList<>();
StringBuilder ncCodes = new StringBuilder();
for(String ncGroupAndNcCode:ncGroupAndNcCodes){
String[] split = ncGroupAndNcCode.split("/");
ncGroup.add(split[0]);
ncCode.add(split[1]);
ncCodes.append(split[1]).append(",");
}
ArrayList<AbnormalNcCode> abnormalNcCodes = new ArrayList<>();
for(int i = 0; i < ncGroup.size(); i ++){
AbnormalNcCode abnormalNcCode = new AbnormalNcCode();
//设置异常单BO
abnormalNcCode.setAbnormalBillBo(abnormalBill.getHandle());
List<AbnormalNcCode> abnormalNcCodes1 = abnormalNcCodeService.selectList(abnormalNcCode);
if(abnormalNcCodes1.size() != 0){
QueryWrapper<AbnormalNcCode> abnormalNcCodeQueryWrapper = new QueryWrapper<>();
abnormalNcCodeQueryWrapper.setEntity(abnormalNcCode);
abnormalNcCodeService.remove(abnormalNcCodeQueryWrapper);
}
abnormalNcCode.setModifiedUser(CommonMethods.getUser());
abnormalNcCode.setModifiedDateTime(now);
abnormalNcCode.setCreatedUser(CommonMethods.getUser());
abnormalNcCode.setCreatedDateTime(now);
//设置HANDLE
abnormalNcCode.setHandle(UUID.randomUUID().toString());
//设置站点
abnormalNcCode.setSite(CommonMethods.getSite());
//设置不合格代码组
abnormalNcCode.setNcCodeGroup(ncGroup.get(i));
abnormalNcCode.setNcCode(ncCode.get(i));
abnormalNcCodes.add(abnormalNcCode);
}
if(abnormalNcCodes.size() > 0){
abnormalNcCodeService.saveOrUpdateBatch(abnormalNcCodes);
abnormalBill.setNcCode(ncCodes.substring(0,ncCodes.length() - 1));
}
this.saveOrUpdate(abnormalBill);
abnormalBillDisposeService.saveOrUpdate(abnormalBillDispose);
return abnormalBill.getAbnormalNo();
}
@Override
public void generateAbnormalBill(AbnormalBill abnormalBill, AbnormalBillDispose abnormalBillDispose) {
public String anomalyReportDevice(AbnormalBill abnormalBill,AbnormalBillDispose abnormalBillDispose) {
this.generateAbnormalBill(abnormalBill,abnormalBillDispose,null,null);
this.saveOrUpdate(abnormalBill);
abnormalBillDisposeService.saveOrUpdate(abnormalBillDispose);
return abnormalBill.getAbnormalNo();
}
@Override
public List<AbnormalBillDto> backLog(AbnormalBillDto abnormalBillDto) {
String language = LocaleContextHolder.getLocale().getLanguage();
return abnormalBillMapper.backLog(abnormalBillDto, language);
}
@Override
public void generateAbnormalBill(AbnormalBill abnormalBill, AbnormalBillDispose abnormalBillDispose,List<String> dutyCauseType,List<String> dutyType) {
String site = CommonMethods.getSite();
LocalDateTime currentTime = LocalDateTime.now();
String user = CommonMethods.getUser();
if(StringUtil.isBlank(abnormalBill.getAbnormalNo())){
String abnormalNo = null;
//生成异常单号
if("Q".equals(abnormalBill.getType())){//其他异常
abnormalNo = nextNumberHelper.getNextNumber(abnormalBill.getSite(), "ABNORMAL_OTHER", 1, null).get(0);
abnormalNo = nextNumberHelper.getNextNumber(site, "ABNORMAL_OTHER", 1, null).get(0);
}else if("Z".equals(abnormalBill.getType())){//质量异常
abnormalNo = nextNumberHelper.getNextNumber(abnormalBill.getSite(), "ABNORMAL_QUALITY", 1, null).get(0);
abnormalNo = nextNumberHelper.getNextNumber(site, "ABNORMAL_QUALITY", 1, null).get(0);
}else if("S".equals(abnormalBill.getType())){//设备异常
abnormalNo = nextNumberHelper.getNextNumber(abnormalBill.getSite(), "ABNORMAL_DEVICE", 1, null).get(0);
abnormalNo = nextNumberHelper.getNextNumber(site, "ABNORMAL_DEVICE", 1, null).get(0);
}
abnormalBill.setAbnormalNo(abnormalNo);
}
abnormalBill.setHandle(HandleEnum.Z_ABNORMAL_BILL.getHandle(abnormalBill.getSite(),abnormalBill.getAbnormalNo()));
abnormalBill.setHandle(HandleEnum.Z_ABNORMAL_BILL.getHandle(site,abnormalBill.getAbnormalNo()));
abnormalBillDispose.setAbnormalBillBo(abnormalBill.getHandle());
abnormalBillDispose.setHandle(HandleEnum.Z_ABNORMAL_BILL_DISPOSE.getHandle(abnormalBill.getSite(),abnormalBill.getAbnormalNo()));
abnormalBillDispose.setHandle(HandleEnum.Z_ABNORMAL_BILL_DISPOSE.getHandle(site,abnormalBill.getAbnormalNo()));
LocalDateTime currentTime = LocalDateTime.now();
String user = CommonMethods.getUser();
//设置责任划分填报人和填报时间
abnormalBillDispose.setDutyUser(user);
abnormalBillDispose.setDutyDateTime(currentTime);
ArrayList<AbnormalCause> causeTypes = new ArrayList<>();
//判断原因分类是否为空
if(dutyCauseType != null && dutyCauseType.size() >= 1){
for(String cause:dutyCauseType){
AbnormalCause abnormalCause = new AbnormalCause();
String uuid = UUID.randomUUID().toString();
abnormalCause.setSite(site);
abnormalCause.setAbnormalBillBo(abnormalBill.getHandle());
abnormalCause.setAbnormalBillDisposeBo(abnormalBillDispose.getHandle());
List<AbnormalCause> abnormalCauses = abnormalCauseService.selectList(abnormalCause);
if(abnormalCauses.size() != 0){
QueryWrapper<AbnormalCause> abnormalCauseQueryWrapper = new QueryWrapper<>();
abnormalCauseQueryWrapper.setEntity(abnormalCause);
abnormalCauseService.remove(abnormalCauseQueryWrapper);
}
abnormalCause.setHandle(uuid);
abnormalCause.setAbnormalCauseNo(cause);
abnormalCause.setCreatedDateTime(currentTime);
abnormalCause.setCreatedUser(user);
abnormalCause.setModifiedUser(user);
abnormalCause.setModifiedDateTime(currentTime);
causeTypes.add(abnormalCause);
}
}
ArrayList<AbnormalDuty> dutyTypes = new ArrayList<>();
//判断责任分类是否为空
if(dutyType != null && dutyType.size() >= 1){
for(String duty:dutyType){
AbnormalDuty abnormalDuty = new AbnormalDuty();
String uuid = UUID.randomUUID().toString();
abnormalDuty.setSite(site);
abnormalDuty.setAbnormalBillBo(abnormalBill.getHandle());
abnormalDuty.setAbnormalBillDisposeBo(abnormalBillDispose.getHandle());
List<AbnormalDuty> abnormalDuties = abnormalDutyService.selectList(abnormalDuty);
if(abnormalDuties.size() != 0){
QueryWrapper<AbnormalDuty> abnormalDutyQueryWrapper = new QueryWrapper<>();
abnormalDutyQueryWrapper.setEntity(abnormalDuty);
abnormalDutyService.remove(abnormalDutyQueryWrapper);
}
abnormalDuty.setHandle(uuid);
abnormalDuty.setAbnormalDutyNo(duty);
abnormalDuty.setModifiedUser(user);
abnormalDuty.setModifiedDateTime(currentTime);
abnormalDuty.setCreatedDateTime(currentTime);
abnormalDuty.setCreatedUser(user);
dutyTypes.add(abnormalDuty);
}
}
//设置创建时间和更新时间
if(abnormalBillMapper.selectById(abnormalBill.getHandle()) == null){
abnormalBill.setCreatedDataTime(currentTime);
abnormalBill.setCreatedDateTime(currentTime);
abnormalBill.setCreatedUser(user);
abnormalBillDispose.setCreatedDataTime(currentTime);
abnormalBillDispose.setCreatedUser(user);
@ -119,24 +255,44 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
abnormalBillDispose.setModifiedUser(user);
//判断SFC、设备编号、消息类型是否不正确或为空
if(StringUtil.isBlank(abnormalBill.getSfc())){
if(StringUtil.isBlank(abnormalBill.getSfc()) && "S".equals(abnormalBill.getType())){
throw BusinessException.build("产品条码不能为空");
}
if(StringUtil.isBlank(abnormalBill.getResrce())){
throw BusinessException.build("设备编号不能为空");
}
if(!StringUtil.isBlank(abnormalBill.getMessageType())){
NcGroup messageType = ncGroupMapper.selectById(HandleEnum.NC_GROUP.getHandle(abnormalBill.getSite(), abnormalBill.getMessageType()));
NcGroup messageType = ncGroupMapper.selectById(HandleEnum.NC_GROUP.getHandle(site, abnormalBill.getMessageType()));
if(messageType == null){
throw BusinessException.build("该消息类型不存在");
}
}
Resrce resrce = resrceMapper.selectById(HandleEnum.RESOURCE.getHandle(abnormalBill.getSite(), abnormalBill.getResrce()));
Resrce resrce = resrceMapper.selectById(HandleEnum.RESOURCE.getHandle(site, abnormalBill.getResrce()));
if(resrce == null){
throw BusinessException.build("该设备编号不存在");
}
//判断不良品数量和问题数量是否为正整数
try {
if(!StringUtil.isBlank(abnormalBill.getNcQty()) && Integer.parseInt(abnormalBill.getNcQty()) < 0) {
throw BusinessException.build("不良品数量必须大于0");
}
if(!StringUtil.isBlank(abnormalBill.getPbQty()) && Integer.parseInt(abnormalBill.getPbQty()) < 0){
throw BusinessException.build("问题数量必须大于0");
}
}catch (NumberFormatException num){
throw BusinessException.build("问题数量或不良品数量必须为一个正整数");
}
//判断输入的用户组是否正确,并返回对应的用户
nwaUserService.checkUserGroup(abnormalBillDispose.getDutySendUserGroup());
//插入原因分类和责任分类
if(dutyTypes.size() > 0){
abnormalDutyService.saveOrUpdateBatch(dutyTypes);
}
if(causeTypes.size() > 0){
abnormalCauseService.saveOrUpdateBatch(causeTypes);
}
}
@Override
@ -149,7 +305,4 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
abnormalBill.setCancelDateTime(now);
}
}

@ -43,4 +43,6 @@ public class AbnormalDutyServiceImpl extends ServiceImpl<AbnormalDutyMapper, Abn
}
}

@ -26,7 +26,7 @@
<result column="PB_QTY" property="pbQty" />
<result column="REPAIR_DATE_TIME" property="repairDateTime" />
<result column="DISCOVER" property="discover" />
<result column="INSPECTER" property="inspecter" />
<result column="INSPECTOR" property="inspector" />
<result column="ENTITY_LOCATION" property="entityLocation" />
<result column="REPORT_FROM" property="reportFrom" />
<result column="OBJECT_BO" property="objectBo" />
@ -36,14 +36,21 @@
<result column="CANCEL_DATE_TIME" property="cancelDateTime" />
<result column="CANCEL_USER" property="cancelUser" />
<result column="CREATED_USER" property="createdUser" />
<result column="CREATED_DATA_TIME" property="createdDataTime" />
<result column="CREATED_DATE_TIME" property="createdDateTime" />
<result column="MODIFIED_USER" property="modifiedUser" />
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
</resultMap>
<resultMap id="abnormalBillDto" type="com.foreverwin.mesnac.anomaly.dto.AbnormalBillDto" extends="BaseResultMap">
<result column="SEQ" property="seq"/>
<result column="ITEM_DESCRIPTION" property="itemDescription"/>
<result column="START_DATE_TIME" property="startDateTime"/>
<result column="END_DATE_TIME" property="endDateTime"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, SITE, ABNORMAL_NO, STATUS, TYPE, ITEM_BO, SFC, WORK_CENTER, SHOP_ORDER, MESSAGE_TYPE, RESRCE, NC_CODE, SHUT_DOWN, RESPONSE_USER, RESPONSE_DATE_TIME, PB_DESCRIPTION, NC_QTY, PB_GRADE, PB_USER, PB_QTY, REPAIR_DATE_TIME, DISCOVER, INSPECTER, ENTITY_LOCATION, REPORT_FROM, OBJECT_BO, PB_PHOTOSHOP, CANCEL_CODE, CANCEL_REASON, CANCEL_DATE_TIME, CANCEL_USER, CREATED_USER, CREATED_DATA_TIME, MODIFIED_USER, MODIFIED_DATE_TIME
HANDLE, SITE, ABNORMAL_NO, STATUS, TYPE, ITEM_BO, SFC, WORK_CENTER, SHOP_ORDER, MESSAGE_TYPE, RESRCE, NC_CODE, SHUT_DOWN, RESPONSE_USER, RESPONSE_DATE_TIME, PB_DESCRIPTION, NC_QTY, PB_GRADE, PB_USER, PB_QTY, REPAIR_DATE_TIME, DISCOVER, INSPECTOR, ENTITY_LOCATION, REPORT_FROM, OBJECT_BO, PB_PHOTOSHOP, CANCEL_CODE, CANCEL_REASON, CANCEL_DATE_TIME, CANCEL_USER, CREATED_USER, CREATED_DATE_TIME, MODIFIED_USER, MODIFIED_DATE_TIME
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
@ -99,7 +106,7 @@
<if test="ew.entity.pbQty!=null"> AND PB_QTY=#{ew.entity.pbQty}</if>
<if test="ew.entity.repairDateTime!=null"> AND REPAIR_DATE_TIME=#{ew.entity.repairDateTime}</if>
<if test="ew.entity.discover!=null"> AND DISCOVER=#{ew.entity.discover}</if>
<if test="ew.entity.inspecter!=null"> AND INSPECTER=#{ew.entity.inspecter}</if>
<if test="ew.entity.inspector!=null"> AND INSPECTOR=#{ew.entity.inspector}</if>
<if test="ew.entity.entityLocation!=null"> AND ENTITY_LOCATION=#{ew.entity.entityLocation}</if>
<if test="ew.entity.reportFrom!=null"> AND REPORT_FROM=#{ew.entity.reportFrom}</if>
<if test="ew.entity.objectBo!=null"> AND OBJECT_BO=#{ew.entity.objectBo}</if>
@ -109,7 +116,7 @@
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.createdDataTime!=null"> AND CREATED_DATA_TIME=#{ew.entity.createdDataTime}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</where>
@ -144,7 +151,7 @@
<if test="ew.entity.pbQty!=null"> AND PB_QTY=#{ew.entity.pbQty}</if>
<if test="ew.entity.repairDateTime!=null"> AND REPAIR_DATE_TIME=#{ew.entity.repairDateTime}</if>
<if test="ew.entity.discover!=null"> AND DISCOVER=#{ew.entity.discover}</if>
<if test="ew.entity.inspecter!=null"> AND INSPECTER=#{ew.entity.inspecter}</if>
<if test="ew.entity.inspector!=null"> AND INSPECTOR=#{ew.entity.inspector}</if>
<if test="ew.entity.entityLocation!=null"> AND ENTITY_LOCATION=#{ew.entity.entityLocation}</if>
<if test="ew.entity.reportFrom!=null"> AND REPORT_FROM=#{ew.entity.reportFrom}</if>
<if test="ew.entity.objectBo!=null"> AND OBJECT_BO=#{ew.entity.objectBo}</if>
@ -154,7 +161,7 @@
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.createdDataTime!=null"> AND CREATED_DATA_TIME=#{ew.entity.createdDataTime}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
@ -197,7 +204,7 @@
<if test="ew.entity.pbQty!=null"> AND PB_QTY=#{ew.entity.pbQty}</if>
<if test="ew.entity.repairDateTime!=null"> AND REPAIR_DATE_TIME=#{ew.entity.repairDateTime}</if>
<if test="ew.entity.discover!=null"> AND DISCOVER=#{ew.entity.discover}</if>
<if test="ew.entity.inspecter!=null"> AND INSPECTER=#{ew.entity.inspecter}</if>
<if test="ew.entity.inspector!=null"> AND INSPECTOR=#{ew.entity.inspector}</if>
<if test="ew.entity.entityLocation!=null"> AND ENTITY_LOCATION=#{ew.entity.entityLocation}</if>
<if test="ew.entity.reportFrom!=null"> AND REPORT_FROM=#{ew.entity.reportFrom}</if>
<if test="ew.entity.objectBo!=null"> AND OBJECT_BO=#{ew.entity.objectBo}</if>
@ -207,7 +214,7 @@
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.createdDataTime!=null"> AND CREATED_DATA_TIME=#{ew.entity.createdDataTime}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
@ -250,7 +257,7 @@
<if test="ew.entity.pbQty!=null"> AND PB_QTY=#{ew.entity.pbQty}</if>
<if test="ew.entity.repairDateTime!=null"> AND REPAIR_DATE_TIME=#{ew.entity.repairDateTime}</if>
<if test="ew.entity.discover!=null"> AND DISCOVER=#{ew.entity.discover}</if>
<if test="ew.entity.inspecter!=null"> AND INSPECTER=#{ew.entity.inspecter}</if>
<if test="ew.entity.inspector!=null"> AND INSPECTOR=#{ew.entity.inspector}</if>
<if test="ew.entity.entityLocation!=null"> AND ENTITY_LOCATION=#{ew.entity.entityLocation}</if>
<if test="ew.entity.reportFrom!=null"> AND REPORT_FROM=#{ew.entity.reportFrom}</if>
<if test="ew.entity.objectBo!=null"> AND OBJECT_BO=#{ew.entity.objectBo}</if>
@ -260,7 +267,7 @@
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.createdDataTime!=null"> AND CREATED_DATA_TIME=#{ew.entity.createdDataTime}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
@ -303,7 +310,7 @@
<if test="ew.entity.pbQty!=null"> AND PB_QTY=#{ew.entity.pbQty}</if>
<if test="ew.entity.repairDateTime!=null"> AND REPAIR_DATE_TIME=#{ew.entity.repairDateTime}</if>
<if test="ew.entity.discover!=null"> AND DISCOVER=#{ew.entity.discover}</if>
<if test="ew.entity.inspecter!=null"> AND INSPECTER=#{ew.entity.inspecter}</if>
<if test="ew.entity.inspector!=null"> AND INSPECTOR=#{ew.entity.inspector}</if>
<if test="ew.entity.entityLocation!=null"> AND ENTITY_LOCATION=#{ew.entity.entityLocation}</if>
<if test="ew.entity.reportFrom!=null"> AND REPORT_FROM=#{ew.entity.reportFrom}</if>
<if test="ew.entity.objectBo!=null"> AND OBJECT_BO=#{ew.entity.objectBo}</if>
@ -313,7 +320,7 @@
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.createdDataTime!=null"> AND CREATED_DATA_TIME=#{ew.entity.createdDataTime}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
@ -356,7 +363,7 @@
<if test="ew.entity.pbQty!=null"> AND PB_QTY=#{ew.entity.pbQty}</if>
<if test="ew.entity.repairDateTime!=null"> AND REPAIR_DATE_TIME=#{ew.entity.repairDateTime}</if>
<if test="ew.entity.discover!=null"> AND DISCOVER=#{ew.entity.discover}</if>
<if test="ew.entity.inspecter!=null"> AND INSPECTER=#{ew.entity.inspecter}</if>
<if test="ew.entity.inspector!=null"> AND INSPECTOR=#{ew.entity.inspector}</if>
<if test="ew.entity.entityLocation!=null"> AND ENTITY_LOCATION=#{ew.entity.entityLocation}</if>
<if test="ew.entity.reportFrom!=null"> AND REPORT_FROM=#{ew.entity.reportFrom}</if>
<if test="ew.entity.objectBo!=null"> AND OBJECT_BO=#{ew.entity.objectBo}</if>
@ -366,7 +373,7 @@
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.createdDataTime!=null"> AND CREATED_DATA_TIME=#{ew.entity.createdDataTime}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
@ -409,7 +416,7 @@
<if test="ew.entity.pbQty!=null"> AND PB_QTY=#{ew.entity.pbQty}</if>
<if test="ew.entity.repairDateTime!=null"> AND REPAIR_DATE_TIME=#{ew.entity.repairDateTime}</if>
<if test="ew.entity.discover!=null"> AND DISCOVER=#{ew.entity.discover}</if>
<if test="ew.entity.inspecter!=null"> AND INSPECTER=#{ew.entity.inspecter}</if>
<if test="ew.entity.inspector!=null"> AND INSPECTOR=#{ew.entity.inspector}</if>
<if test="ew.entity.entityLocation!=null"> AND ENTITY_LOCATION=#{ew.entity.entityLocation}</if>
<if test="ew.entity.reportFrom!=null"> AND REPORT_FROM=#{ew.entity.reportFrom}</if>
<if test="ew.entity.objectBo!=null"> AND OBJECT_BO=#{ew.entity.objectBo}</if>
@ -419,7 +426,7 @@
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.createdDataTime!=null"> AND CREATED_DATA_TIME=#{ew.entity.createdDataTime}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
@ -458,7 +465,7 @@
<if test="pbQty!=null">PB_QTY,</if>
<if test="repairDateTime!=null">REPAIR_DATE_TIME,</if>
<if test="discover!=null">DISCOVER,</if>
<if test="inspecter!=null">INSPECTER,</if>
<if test="inspector!=null">INSPECTOR,</if>
<if test="entityLocation!=null">ENTITY_LOCATION,</if>
<if test="reportFrom!=null">REPORT_FROM,</if>
<if test="objectBo!=null">OBJECT_BO,</if>
@ -468,7 +475,7 @@
<if test="cancelDateTime!=null">CANCEL_DATE_TIME,</if>
<if test="cancelUser!=null">CANCEL_USER,</if>
<if test="createdUser!=null">CREATED_USER,</if>
<if test="createdDataTime!=null">CREATED_DATA_TIME,</if>
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
<if test="modifiedUser!=null">MODIFIED_USER,</if>
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
</trim> VALUES
@ -495,7 +502,7 @@
<if test="pbQty!=null">#{pbQty},</if>
<if test="repairDateTime!=null">#{repairDateTime},</if>
<if test="discover!=null">#{discover},</if>
<if test="inspecter!=null">#{inspecter},</if>
<if test="inspector!=null">#{inspector},</if>
<if test="entityLocation!=null">#{entityLocation},</if>
<if test="reportFrom!=null">#{reportFrom},</if>
<if test="objectBo!=null">#{objectBo},</if>
@ -505,7 +512,7 @@
<if test="cancelDateTime!=null">#{cancelDateTime},</if>
<if test="cancelUser!=null">#{cancelUser},</if>
<if test="createdUser!=null">#{createdUser},</if>
<if test="createdDataTime!=null">#{createdDataTime},</if>
<if test="createdDateTime!=null">#{createdDateTime},</if>
<if test="modifiedUser!=null">#{modifiedUser},</if>
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
</trim>
@ -539,7 +546,7 @@
#{pbQty},
#{repairDateTime},
#{discover},
#{inspecter},
#{inspector},
#{entityLocation},
#{reportFrom},
#{objectBo},
@ -549,7 +556,7 @@
#{cancelDateTime},
#{cancelUser},
#{createdUser},
#{createdDataTime},
#{createdDateTime},
#{modifiedUser},
#{modifiedDateTime},
</trim>
@ -579,7 +586,7 @@
<if test="et.pbQty!=null">PB_QTY=#{et.pbQty},</if>
<if test="et.repairDateTime!=null">REPAIR_DATE_TIME=#{et.repairDateTime},</if>
<if test="et.discover!=null">DISCOVER=#{et.discover},</if>
<if test="et.inspecter!=null">INSPECTER=#{et.inspecter},</if>
<if test="et.inspector!=null">INSPECTOR=#{et.inspector},</if>
<if test="et.entityLocation!=null">ENTITY_LOCATION=#{et.entityLocation},</if>
<if test="et.reportFrom!=null">REPORT_FROM=#{et.reportFrom},</if>
<if test="et.objectBo!=null">OBJECT_BO=#{et.objectBo},</if>
@ -589,7 +596,7 @@
<if test="et.cancelDateTime!=null">CANCEL_DATE_TIME=#{et.cancelDateTime},</if>
<if test="et.cancelUser!=null">CANCEL_USER=#{et.cancelUser},</if>
<if test="et.createdUser!=null">CREATED_USER=#{et.createdUser},</if>
<if test="et.createdDataTime!=null">CREATED_DATA_TIME=#{et.createdDataTime},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.modifiedUser!=null">MODIFIED_USER=#{et.modifiedUser},</if>
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
@ -619,7 +626,7 @@
PB_QTY=#{et.pbQty},
REPAIR_DATE_TIME=#{et.repairDateTime},
DISCOVER=#{et.discover},
INSPECTER=#{et.inspecter},
INSPECTOR=#{et.inspector},
ENTITY_LOCATION=#{et.entityLocation},
REPORT_FROM=#{et.reportFrom},
OBJECT_BO=#{et.objectBo},
@ -629,7 +636,7 @@
CANCEL_DATE_TIME=#{et.cancelDateTime},
CANCEL_USER=#{et.cancelUser},
CREATED_USER=#{et.createdUser},
CREATED_DATA_TIME=#{et.createdDataTime},
CREATED_DATE_TIME=#{et.createdDateTime},
MODIFIED_USER=#{et.modifiedUser},
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
@ -659,7 +666,7 @@
<if test="et.pbQty!=null">PB_QTY=#{et.pbQty},</if>
<if test="et.repairDateTime!=null">REPAIR_DATE_TIME=#{et.repairDateTime},</if>
<if test="et.discover!=null">DISCOVER=#{et.discover},</if>
<if test="et.inspecter!=null">INSPECTER=#{et.inspecter},</if>
<if test="et.inspector!=null">INSPECTOR=#{et.inspector},</if>
<if test="et.entityLocation!=null">ENTITY_LOCATION=#{et.entityLocation},</if>
<if test="et.reportFrom!=null">REPORT_FROM=#{et.reportFrom},</if>
<if test="et.objectBo!=null">OBJECT_BO=#{et.objectBo},</if>
@ -669,7 +676,7 @@
<if test="et.cancelDateTime!=null">CANCEL_DATE_TIME=#{et.cancelDateTime},</if>
<if test="et.cancelUser!=null">CANCEL_USER=#{et.cancelUser},</if>
<if test="et.createdUser!=null">CREATED_USER=#{et.createdUser},</if>
<if test="et.createdDataTime!=null">CREATED_DATA_TIME=#{et.createdDataTime},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.modifiedUser!=null">MODIFIED_USER=#{et.modifiedUser},</if>
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
</trim>
@ -698,7 +705,7 @@
<if test="ew.entity.pbQty!=null"> AND PB_QTY=#{ew.entity.pbQty}</if>
<if test="ew.entity.repairDateTime!=null"> AND REPAIR_DATE_TIME=#{ew.entity.repairDateTime}</if>
<if test="ew.entity.discover!=null"> AND DISCOVER=#{ew.entity.discover}</if>
<if test="ew.entity.inspecter!=null"> AND INSPECTER=#{ew.entity.inspecter}</if>
<if test="ew.entity.inspector!=null"> AND INSPECTOR=#{ew.entity.inspector}</if>
<if test="ew.entity.entityLocation!=null"> AND ENTITY_LOCATION=#{ew.entity.entityLocation}</if>
<if test="ew.entity.reportFrom!=null"> AND REPORT_FROM=#{ew.entity.reportFrom}</if>
<if test="ew.entity.objectBo!=null"> AND OBJECT_BO=#{ew.entity.objectBo}</if>
@ -708,7 +715,7 @@
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.createdDataTime!=null"> AND CREATED_DATA_TIME=#{ew.entity.createdDataTime}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
@ -768,7 +775,7 @@
<if test="ew.entity.pbQty!=null"> AND PB_QTY=#{ew.entity.pbQty}</if>
<if test="ew.entity.repairDateTime!=null"> AND REPAIR_DATE_TIME=#{ew.entity.repairDateTime}</if>
<if test="ew.entity.discover!=null"> AND DISCOVER=#{ew.entity.discover}</if>
<if test="ew.entity.inspecter!=null"> AND INSPECTER=#{ew.entity.inspecter}</if>
<if test="ew.entity.inspector!=null"> AND INSPECTOR=#{ew.entity.inspector}</if>
<if test="ew.entity.entityLocation!=null"> AND ENTITY_LOCATION=#{ew.entity.entityLocation}</if>
<if test="ew.entity.reportFrom!=null"> AND REPORT_FROM=#{ew.entity.reportFrom}</if>
<if test="ew.entity.objectBo!=null"> AND OBJECT_BO=#{ew.entity.objectBo}</if>
@ -778,7 +785,7 @@
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.createdDataTime!=null"> AND CREATED_DATA_TIME=#{ew.entity.createdDataTime}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
@ -798,5 +805,48 @@
</foreach>)
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="backLog" resultMap="abnormalBillDto">
SELECT ROW_NUMBER() OVER(ORDER BY zab.ABNORMAL_NO ASC) SEQ,zab.ABNORMAL_NO ABNORMAL_NO,
zab.STATUS STATUS, it.DESCRIPTION ITEM_DESCRIPTION, zab.CREATED_DATE_TIME CREATED_DATE_TIME,zab.RESPONSE_DATE_TIME RESPONSE_DATE_TIME
,zab.CREATED_USER CREATED_USER,
zab.NC_CODE NC_CODE,zab.PB_DESCRIPTION PB_DESCRIPTION
FROM Z_ABNORMAL_BILL zab
INNER JOIN ITEM i ON zab.ITEM_BO = i.HANDLE
LEFT JOIN ITEM_T it ON i.HANDLE = it.ITEM_BO AND it.LOCALE = #{language}
<where>
<if test="abnormalBill != null">
<if test="abnormalBill.site != null and abnormalBill.site != ''">
zab.SITE = #{abnormalBill.site}
</if>
<if test="abnormalBill.resrce != null and abnormalBill.resrce != ''">
AND zab.RESRCE = #{abnormalBill.resrce}
</if>
<if test="abnormalBill.shopOrder != null and abnormalBill.shopOrder != ''">
AND zab.SHOP_ORDER = #{abnormalBill.shopOrder}
</if>
<if test="abnormalBill.abnormalNo != null and abnormalBill.abnormalNo != ''">
AND zab.ABNORMAL_NO = #{abnormalBill.abnormalNo}
</if>
<if test="abnormalBill.status != null and abnormalBill.status != ''">
AND zab.STATUS = #{abnormalBill.status}
</if>
<if test="abnormalBill.startDateTime != null ">
AND zab.CREATED_DATE_TIME &gt;= #{abnormalBill.startDateTime}
</if>
<if test="abnormalBill.endDateTime != null">
AND zab.CREATED_DATE_TIME &lt;= #{abnormalBill.endDateTime}
</if>
<if test="abnormalBill.workCenter != null and abnormalBill.workCenter != ''">
AND zab.WORK_CENTER = #{abnormalBill.workCenter}
</if>
<if test="abnormalBill.type != null and abnormalBill.type != ''">
AND zab.TYPE = #{abnormalBill.type}
</if>
<if test="abnormalBill.reportFrom != null and abnormalBill.reportFrom != ''">
AND zab.REPORT_FROM = #{abnormalBill.reportFrom}
</if>
</if>
</where>
</select>
</mapper>

@ -382,5 +382,4 @@
</foreach>)
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
</mapper>

@ -44,4 +44,8 @@ public interface Constants {
String INSPECTION_TYPE_MM="MM";
//年点检
String INSPECTION_TYPE_YM="YM";
//叫料类型
String CALL_TYPE_MATERIAL = "MATERIAL";
String CALL_TYPE_OPERATION = "OPERATION";
}

@ -135,6 +135,7 @@ public class SfcDispatchDto implements Serializable {
/**
*
*/
private String prepositionStepId;
private String prepositionOperation;
/**
*
@ -143,6 +144,7 @@ public class SfcDispatchDto implements Serializable {
/**
* &
*/
private String itemBo;
private String item;
private String itemDescription;
private String qtyToBuild;
@ -442,6 +444,14 @@ public class SfcDispatchDto implements Serializable {
this.remark = remark;
}
public String getPrepositionStepId() {
return prepositionStepId;
}
public void setPrepositionStepId(String prepositionStepId) {
this.prepositionStepId = prepositionStepId;
}
public String getPrepositionOperation() {
return prepositionOperation;
}
@ -458,6 +468,14 @@ public class SfcDispatchDto implements Serializable {
this.isFirstOperation = isFirstOperation;
}
public String getItemBo() {
return itemBo;
}
public void setItemBo(String itemBo) {
this.itemBo = itemBo;
}
public String getItem() {
return item;
}

@ -20,6 +20,9 @@ public enum HandleEnum {
/**物料清单**/
BOM("BOMBO:","BOMBO:{0},{1},{2},{3}"),
/**叫料**/
CALL_ITEM("CallItemBO:", "CallItemBO:{0},{1}"),
/**工单*/
SHOP_ORDER( "ShopOrderBO:", "ShopOrderBO:{0},{1}" ),

@ -16,7 +16,7 @@ import java.util.List;
/**
*
* @author Leon.L
* @since 2021-06-24
* @since 2021-06-30
*/
@RestController
@RequestMapping("/Z-CALL-ITEM")
@ -72,7 +72,7 @@ public class CallItemController {
.or().like(CallItem::getCallItemNo, frontPage.getGlobalQuery())
.or().like(CallItem::getShopOrder, frontPage.getGlobalQuery())
.or().like(CallItem::getSfc, frontPage.getGlobalQuery())
.or().like(CallItem::getDispatchNo, frontPage.getGlobalQuery())
.or().like(CallItem::getSfcDispatchBo, frontPage.getGlobalQuery())
.or().like(CallItem::getOperation, frontPage.getGlobalQuery())
.or().like(CallItem::getStepId, frontPage.getGlobalQuery())
.or().like(CallItem::getResrce, frontPage.getGlobalQuery())
@ -80,9 +80,9 @@ public class CallItemController {
.or().like(CallItem::getCallType, frontPage.getGlobalQuery())
.or().like(CallItem::getStatus, frontPage.getGlobalQuery())
.or().like(CallItem::getCallStatus, frontPage.getGlobalQuery())
.or().like(CallItem::getSendStatus, frontPage.getGlobalQuery())
.or().like(CallItem::getCreateUserBo, frontPage.getGlobalQuery())
.or().like(CallItem::getUpdateUserBo, frontPage.getGlobalQuery())
.or().like(CallItem::getIssueStatus, frontPage.getGlobalQuery())
.or().like(CallItem::getCreateUser, frontPage.getGlobalQuery())
.or().like(CallItem::getUpdateUser, frontPage.getGlobalQuery())
);
}
result = callItemService.page(frontPage.getPagePlus(), queryWrapper);

@ -229,7 +229,7 @@ public class SfcDispatchController {
String user = CommonMethods.getUser();
flag = sfcDispatchService.releaseDispatch(site, user, message, sfcDispatchList);
} catch (Exception e) {
return R.failed(e.getMessage());
return R.failed("派工发布失败:" + e.getMessage());
}

@ -1,18 +1,36 @@
package com.foreverwin.mesnac.dispatch.mapper;
import com.foreverwin.mesnac.common.dto.SfcDispatchDto;
import com.foreverwin.mesnac.dispatch.model.CallItem;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.foreverwin.mesnac.dispatch.model.SfcDispatch;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* <p>
* Mapper
* </p>
*
* @author Leon.L
* @since 2021-06-24
* @since 2021-06-30
*/
@Repository
public interface CallItemMapper extends BaseMapper<CallItem> {
/**
*
*
* @param list
*/
void deleteDispatchCallItem(List<SfcDispatchDto> list);
/**
*
*
* @param list
* @return
*/
List<CallItem> selectDispatchCallItem(List<SfcDispatchDto> list);
}

@ -5,6 +5,8 @@ import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
@ -16,10 +18,11 @@ import com.baomidou.mybatisplus.annotation.IdType;
* </p>
*
* @author Leon.L
* @since 2021-06-24
* @since 2021-06-30
*/
@TableName("Z_CALL_ITEM")
public class CallItem extends Model<CallItem> {
private static final long serialVersionUID = 1L;
@ -34,6 +37,11 @@ public class CallItem extends Model<CallItem> {
*/
@TableField("SITE")
private String site;
/**
*
*/
@TableField("SFC_DISPATCH_BO")
private String sfcDispatchBo;
/**
*
*/
@ -50,22 +58,17 @@ public class CallItem extends Model<CallItem> {
@TableField("SFC")
private String sfc;
/**
*
*/
@TableField("DISPATCH_NO")
private String dispatchNo;
/**
*
*
*/
@TableField("OPERATION")
private String operation;
/**
*
*
*/
@TableField("STEP_ID")
private String stepId;
/**
*
*
*/
@TableField("RESRCE")
private String resrce;
@ -75,7 +78,7 @@ public class CallItem extends Model<CallItem> {
@TableField("COMPONENT_BO")
private String componentBo;
/**
* MATERIAL/OPERATION
*
*/
@TableField("CALL_TYPE")
private String callType;
@ -89,6 +92,11 @@ public class CallItem extends Model<CallItem> {
*/
@TableField("REQUIRED_DATE_TIME")
private LocalDateTime requiredDateTime;
/**
*
*/
@TableField("ISSUE_QTY")
private Double issueQty;
/**
*
*/
@ -102,30 +110,46 @@ public class CallItem extends Model<CallItem> {
/**
*
*/
@TableField("SEND_STATUS")
private String sendStatus;
@TableField("ISSUE_STATUS")
private String issueStatus;
/**
*
*/
@TableField("CREATE_USER_BO")
private String createUserBo;
@TableField("CREATE_USER")
private String createUser;
/**
*
*/
@TableField("CREATED_DATE_TIME")
private LocalDateTime createdDateTime;
/**
*
*
*/
@TableField("UPDATE_USER_BO")
private String updateUserBo;
@TableField("UPDATE_USER")
private String updateUser;
/**
*
*
*/
@TableField("UPDATED_DATE_TIME")
private LocalDateTime updatedDateTime;
@TableField(exist = false)
private String workOrder;
@TableField(exist = false)
private String resourceType;
@TableField(exist = false)
private String blankingSize;
@TableField(exist = false)
private BigDecimal dispatchQty;
@TableField(exist = false)
private String itemDescription;
@TableField(exist = false)
private String operationDescription;
@TableField(exist = false)
private String remark;
public String getHandle() {
return handle;
}
@ -166,12 +190,12 @@ public class CallItem extends Model<CallItem> {
this.sfc = sfc;
}
public String getDispatchNo() {
return dispatchNo;
public String getSfcDispatchBo() {
return sfcDispatchBo;
}
public void setDispatchNo(String dispatchNo) {
this.dispatchNo = dispatchNo;
public void setSfcDispatchBo(String sfcDispatchBo) {
this.sfcDispatchBo = sfcDispatchBo;
}
public String getOperation() {
@ -230,6 +254,14 @@ public class CallItem extends Model<CallItem> {
this.requiredDateTime = requiredDateTime;
}
public Double getIssueQty() {
return issueQty;
}
public void setIssueQty(Double issueQty) {
this.issueQty = issueQty;
}
public String getStatus() {
return status;
}
@ -246,20 +278,20 @@ public class CallItem extends Model<CallItem> {
this.callStatus = callStatus;
}
public String getSendStatus() {
return sendStatus;
public String getIssueStatus() {
return issueStatus;
}
public void setSendStatus(String sendStatus) {
this.sendStatus = sendStatus;
public void setIssueStatus(String issueStatus) {
this.issueStatus = issueStatus;
}
public String getCreateUserBo() {
return createUserBo;
public String getCreateUser() {
return createUser;
}
public void setCreateUserBo(String createUserBo) {
this.createUserBo = createUserBo;
public void setCreateUser(String createUser) {
this.createUser = createUser;
}
public LocalDateTime getCreatedDateTime() {
@ -270,12 +302,12 @@ public class CallItem extends Model<CallItem> {
this.createdDateTime = createdDateTime;
}
public String getUpdateUserBo() {
return updateUserBo;
public String getUpdateUser() {
return updateUser;
}
public void setUpdateUserBo(String updateUserBo) {
this.updateUserBo = updateUserBo;
public void setUpdateUser(String updateUser) {
this.updateUser = updateUser;
}
public LocalDateTime getUpdatedDateTime() {
@ -286,18 +318,74 @@ public class CallItem extends Model<CallItem> {
this.updatedDateTime = updatedDateTime;
}
public String getWorkOrder() {
return workOrder;
}
public void setWorkOrder(String workOrder) {
this.workOrder = workOrder;
}
public String getResourceType() {
return resourceType;
}
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
public String getBlankingSize() {
return blankingSize;
}
public void setBlankingSize(String blankingSize) {
this.blankingSize = blankingSize;
}
public BigDecimal getDispatchQty() {
return dispatchQty;
}
public void setDispatchQty(BigDecimal dispatchQty) {
this.dispatchQty = dispatchQty;
}
public String getItemDescription() {
return itemDescription;
}
public void setItemDescription(String itemDescription) {
this.itemDescription = itemDescription;
}
public String getOperationDescription() {
return operationDescription;
}
public void setOperationDescription(String operationDescription) {
this.operationDescription = operationDescription;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public static final String HANDLE = "HANDLE";
public static final String SITE = "SITE";
public static final String SFC_DISPATCH_BO = "SFC_DISPATCH_BO";
public static final String CALL_ITEM_NO = "CALL_ITEM_NO";
public static final String SHOP_ORDER = "SHOP_ORDER";
public static final String SFC = "SFC";
public static final String DISPATCH_NO = "DISPATCH_NO";
public static final String OPERATION = "OPERATION";
public static final String STEP_ID = "STEP_ID";
@ -312,17 +400,19 @@ public class CallItem extends Model<CallItem> {
public static final String REQUIRED_DATE_TIME = "REQUIRED_DATE_TIME";
public static final String ISSUE_QTY = "ISSUE_QTY";
public static final String STATUS = "STATUS";
public static final String CALL_STATUS = "CALL_STATUS";
public static final String SEND_STATUS = "SEND_STATUS";
public static final String ISSUE_STATUS = "ISSUE_STATUS";
public static final String CREATE_USER_BO = "CREATE_USER_BO";
public static final String CREATE_USER = "CREATE_USER";
public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
public static final String UPDATE_USER_BO = "UPDATE_USER_BO";
public static final String UPDATE_USER = "UPDATE_USER";
public static final String UPDATED_DATE_TIME = "UPDATED_DATE_TIME";
@ -337,10 +427,10 @@ public class CallItem extends Model<CallItem> {
return "CallItem{" +
"handle = " + handle +
", site = " + site +
", sfcDispatchBo = " + sfcDispatchBo +
", callItemNo = " + callItemNo +
", shopOrder = " + shopOrder +
", sfc = " + sfc +
", dispatchNo = " + dispatchNo +
", operation = " + operation +
", stepId = " + stepId +
", resrce = " + resrce +
@ -348,12 +438,13 @@ public class CallItem extends Model<CallItem> {
", callType = " + callType +
", requiredQty = " + requiredQty +
", requiredDateTime = " + requiredDateTime +
", issueQty = " + issueQty +
", status = " + status +
", callStatus = " + callStatus +
", sendStatus = " + sendStatus +
", createUserBo = " + createUserBo +
", issueStatus = " + issueStatus +
", createUser = " + createUser +
", createdDateTime = " + createdDateTime +
", updateUserBo = " + updateUserBo +
", updateUser = " + updateUser +
", updatedDateTime = " + updatedDateTime +
"}";
}

@ -16,10 +16,11 @@ import com.baomidou.mybatisplus.annotation.IdType;
* </p>
*
* @author Leon.L
* @since 2021-06-21
* @since 2021-06-30
*/
@TableName("Z_SFC_DISPATCH")
public class SfcDispatch extends Model<SfcDispatch> {
private static final long serialVersionUID = 1L;
@ -192,6 +193,8 @@ public class SfcDispatch extends Model<SfcDispatch> {
/**
*
*/
@TableField("PREPOSITION_STEP_ID")
private String prepositionStepId;
@TableField("PREPOSITION_OPERATION")
private String prepositionOperation;
/**
@ -586,93 +589,103 @@ public class SfcDispatch extends Model<SfcDispatch> {
this.other5 = other5;
}
public static final String HANDLE = "HANDLE";
public String getPrepositionStepId() {
return prepositionStepId;
}
public void setPrepositionStepId(String prepositionStepId) {
this.prepositionStepId = prepositionStepId;
}
public static final String HANDLE = "HANDLE";
public static final String SITE = "SITE";
public static final String SITE = "SITE";
public static final String SHOP_ORDER = "SHOP_ORDER";
public static final String SHOP_ORDER = "SHOP_ORDER";
public static final String SFC = "SFC";
public static final String SFC = "SFC";
public static final String BLANKING_SIZE = "BLANKING_SIZE";
public static final String BLANKING_SIZE = "BLANKING_SIZE";
public static final String DISPATCH_SEQ = "DISPATCH_SEQ";
public static final String DISPATCH_SEQ = "DISPATCH_SEQ";
public static final String DISPATCH_NO = "DISPATCH_NO";
public static final String DISPATCH_NO = "DISPATCH_NO";
public static final String DISPATCH_STATUS = "DISPATCH_STATUS";
public static final String DISPATCH_STATUS = "DISPATCH_STATUS";
public static final String DRAWINGS_NO = "DRAWINGS_NO";
public static final String DRAWINGS_NO = "DRAWINGS_NO";
public static final String DRAWINGS_REVISION = "DRAWINGS_REVISION";
public static final String DRAWINGS_REVISION = "DRAWINGS_REVISION";
public static final String IS_LOCK = "IS_LOCK";
public static final String IS_LOCK = "IS_LOCK";
public static final String ROUTER_BO = "ROUTER_BO";
public static final String ROUTER_BO = "ROUTER_BO";
public static final String STEP_ID = "STEP_ID";
public static final String STEP_ID = "STEP_ID";
public static final String OPERATION = "OPERATION";
public static final String OPERATION = "OPERATION";
public static final String RESOURCE_TYPE = "RESOURCE_TYPE";
public static final String RESOURCE_TYPE = "RESOURCE_TYPE";
public static final String WORK_CENTER = "WORK_CENTER";
public static final String WORK_CENTER = "WORK_CENTER";
public static final String RESRCE = "RESRCE";
public static final String RESRCE = "RESRCE";
public static final String EMPLOYEE = "EMPLOYEE";
public static final String EMPLOYEE = "EMPLOYEE";
public static final String TURN_OPERATION = "TURN_OPERATION";
public static final String TURN_OPERATION = "TURN_OPERATION";
public static final String DISPATCH_QTY = "DISPATCH_QTY";
public static final String DISPATCH_QTY = "DISPATCH_QTY";
public static final String PROD_HOURS = "PROD_HOURS";
public static final String PROD_HOURS = "PROD_HOURS";
public static final String PLANNED_START_DATE = "PLANNED_START_DATE";
public static final String PLANNED_START_DATE = "PLANNED_START_DATE";
public static final String PLANNED_COMP_DATE = "PLANNED_COMP_DATE";
public static final String PLANNED_COMP_DATE = "PLANNED_COMP_DATE";
public static final String EARLIEST_START_DATE = "EARLIEST_START_DATE";
public static final String EARLIEST_START_DATE = "EARLIEST_START_DATE";
public static final String LATEST_END_DATE = "LATEST_END_DATE";
public static final String LATEST_END_DATE = "LATEST_END_DATE";
public static final String SO_RELEASED_DATE = "SO_RELEASED_DATE";
public static final String SO_RELEASED_DATE = "SO_RELEASED_DATE";
public static final String SFC_RELEASED_DATE = "SFC_RELEASED_DATE";
public static final String SFC_RELEASED_DATE = "SFC_RELEASED_DATE";
public static final String RELEASED_COMPLETE_DATE = "RELEASED_COMPLETE_DATE";
public static final String RELEASED_COMPLETE_DATE = "RELEASED_COMPLETE_DATE";
public static final String ACTUAL_START_DATE = "ACTUAL_START_DATE";
public static final String ACTUAL_START_DATE = "ACTUAL_START_DATE";
public static final String ACTUAL_COMPLETE_DATE = "ACTUAL_COMPLETE_DATE";
public static final String ACTUAL_COMPLETE_DATE = "ACTUAL_COMPLETE_DATE";
public static final String IS_DISPATCH = "IS_DISPATCH";
public static final String IS_DISPATCH = "IS_DISPATCH";
public static final String IS_IMPORT = "IS_IMPORT";
public static final String IS_IMPORT = "IS_IMPORT";
public static final String REMARK = "REMARK";
public static final String REMARK = "REMARK";
public static final String PREPOSITION_OPERATION = "PREPOSITION_OPERATION";
public static final String PREPOSITION_OPERATION = "PREPOSITION_OPERATION";
public static final String IS_FIRST_OPERATION = "IS_FIRST_OPERATION";
public static final String IS_FIRST_OPERATION = "IS_FIRST_OPERATION";
public static final String CREATE_USER = "CREATE_USER";
public static final String CREATE_USER = "CREATE_USER";
public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
public static final String MODIFY_USER = "MODIFY_USER";
public static final String MODIFY_USER = "MODIFY_USER";
public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
public static final String OTHER_1 = "OTHER_1";
public static final String OTHER_1 = "OTHER_1";
public static final String OTHER_2 = "OTHER_2";
public static final String OTHER_2 = "OTHER_2";
public static final String OTHER_3 = "OTHER_3";
public static final String OTHER_3 = "OTHER_3";
public static final String OTHER_4 = "OTHER_4";
public static final String OTHER_4 = "OTHER_4";
public static final String OTHER_5 = "OTHER_5";
public static final String OTHER_5 = "OTHER_5";
public static final String PREPOSITION_STEP_ID = "PREPOSITION_STEP_ID";
@Override
@ -716,6 +729,7 @@ public static final String OTHER_5 = "OTHER_5";
", isDispatch = " + isDispatch +
", isImport = " + isImport +
", remark = " + remark +
", prepositionStepId = " + prepositionStepId +
", prepositionOperation = " + prepositionOperation +
", isFirstOperation = " + isFirstOperation +
", createUser = " + createUser +

@ -35,6 +35,7 @@ public class ShopOrderRelease extends SfcDispatch {
/**
* &
*/
private String itemBo;
private String item;
private String itemDescription;
private String qtyToBuild;
@ -101,6 +102,14 @@ public class ShopOrderRelease extends SfcDispatch {
this.statusName = statusName;
}
public String getItemBo() {
return itemBo;
}
public void setItemBo(String itemBo) {
this.itemBo = itemBo;
}
public String getItem() {
return item;
}

@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.common.dto.SfcDispatchDto;
import com.foreverwin.mesnac.dispatch.model.CallItem;
import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.mesnac.dispatch.model.ShopOrderRelease;
import com.foreverwin.modular.core.util.FrontPage;
import java.util.List;
@ -15,7 +14,7 @@ import java.util.List;
* </p>
*
* @author Leon.L
* @since 2021-06-24
* @since 2021-06-30
*/
public interface CallItemService extends IService<CallItem> {
@ -28,5 +27,12 @@ public interface CallItemService extends IService<CallItem> {
List<CallItem> selectList(CallItem callItem);
/**
*
*
* @param site
* @param user
* @param sfcDispatchList
*/
void saveCallItem(String site, String user, List<SfcDispatchDto> sfcDispatchList);
}

@ -53,6 +53,7 @@ public interface SfcDispatchService extends IService<SfcDispatch> {
* 1.
* 2.
* 3.
*
* @param site
* @param user
* @param message |

@ -1,7 +1,10 @@
package com.foreverwin.mesnac.dispatch.service.impl;
import com.foreverwin.mesnac.common.constant.Constants;
import com.foreverwin.mesnac.common.dto.SfcDispatchDto;
import com.foreverwin.mesnac.dispatch.model.ShopOrderRelease;
import com.foreverwin.mesnac.common.enums.HandleEnum;
import com.foreverwin.mesnac.common.util.StringUtil;
import com.foreverwin.modular.core.exception.BusinessException;
import com.foreverwin.modular.core.util.FrontPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -13,6 +16,8 @@ import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
/**
* <p>
@ -20,7 +25,7 @@ import java.util.List;
* </p>
*
* @author Leon.L
* @since 2021-06-24
* @since 2021-06-30
*/
@Service
@Transactional(rollbackFor = Exception.class)
@ -49,9 +54,73 @@ public class CallItemServiceImpl extends ServiceImpl<CallItemMapper, CallItem> i
if (sfcDispatchList == null || sfcDispatchList.size() <= 0) {
return;
}
LocalDateTime nowDate = LocalDateTime.now();
//查询叫料组件
List<CallItem> callItemList = callItemMapper.selectDispatchCallItem(sfcDispatchList);
if (callItemList == null || callItemList.size() <= 0) {
throw BusinessException.build("发布的派工单没有物料清单组件");
}
List<CallItem> list = new ArrayList<>();
}
//删除原来的数据
callItemMapper.deleteDispatchCallItem(sfcDispatchList);
//工序叫料数据
for (SfcDispatchDto sfcDispatchDto : sfcDispatchList) {
String prepositionStepId = sfcDispatchDto.getPrepositionStepId();
if (StringUtil.isBlank(prepositionStepId)) {
continue;
}
String callItemNo = sfcDispatchDto.getSfc() + sfcDispatchDto.getStepId() + prepositionStepId;
CallItem callItem = new CallItem();
callItem.setCallItemNo(callItemNo);
callItem.setHandle(HandleEnum.CALL_ITEM.getHandle(site, callItemNo));
callItem.setSite(site);
callItem.setShopOrder(sfcDispatchDto.getShopOrder());
callItem.setSfc(sfcDispatchDto.getSfc());
callItem.setSfcDispatchBo(sfcDispatchDto.getHandle());
callItem.setOperation(sfcDispatchDto.getOperation());
callItem.setStepId(sfcDispatchDto.getStepId());
callItem.setResrce(sfcDispatchDto.getResrce());
callItem.setCallType(Constants.CALL_TYPE_OPERATION);
callItem.setComponentBo(sfcDispatchDto.getItemBo());
callItem.setRequiredQty(sfcDispatchDto.getDispatchQty());
callItem.setRequiredDateTime(sfcDispatchDto.getPlannedStartDate());
callItem.setStatus(Constants.STATUS_NEW);
callItem.setCallStatus(Constants.STATUS_NEW);
callItem.setIssueStatus(Constants.STATUS_NEW);
callItem.setCreateUser(user);
callItem.setCreatedDateTime(nowDate);
callItem.setUpdateUser(user);
callItem.setUpdatedDateTime(nowDate);
list.add(callItem);
}
//组件叫料数据
for (int i = 0; i< callItemList.size(); i++) {
CallItem callItem = callItemList.get(i);
String component = StringUtil.trimHandle(callItem.getComponentBo());
String callItemNo = callItem.getSfc() + callItem.getStepId() + callItem.getOperation() + component;
callItem.setCallItemNo(callItemNo);
callItem.setHandle(HandleEnum.CALL_ITEM.getHandle(site, callItemNo));
callItem.setCallType(Constants.CALL_TYPE_MATERIAL);
callItem.setStatus(Constants.STATUS_NEW);
callItem.setCallStatus(Constants.STATUS_NEW);
callItem.setIssueStatus(Constants.STATUS_NEW);
callItem.setCreateUser(user);
callItem.setCreatedDateTime(nowDate);
callItem.setUpdateUser(user);
callItem.setUpdatedDateTime(nowDate);
list.add(callItem);
}
//数据保存
if (list != null && list.size() > 0) {
this.saveBatch(list);
}
}
}

@ -73,8 +73,10 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
public Boolean releaseDispatch(String site, String user, StringBuffer message, List<SfcDispatchDto> sfcDispatchList) {
Boolean flag = this.sfcDispatch(site, user, DispatchStatusEnum.RELEASE.getCode(), message, sfcDispatchList);
//保存叫料数据
callItemService.saveCallItem(site, user, sfcDispatchList);
if (flag) {
//保存叫料数据
callItemService.saveCallItem(site, user, sfcDispatchList);
}
return flag;
}
@ -387,6 +389,11 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
sfcDispatch.setBlankingSize(sfcDispatchDto.getBlankingSize());
sfcDispatch.setPlannedStartDate(sfcDispatchDto.getPlannedStartDate());
sfcDispatch.setPlannedCompDate(sfcDispatchDto.getPlannedCompDate());
//是否分配资源
if (StringUtil.notBlank(resource)) {
sfcDispatch.setIsDispatch("true");
}
list.add(sfcDispatch);
}

@ -195,6 +195,10 @@ public class ShopOrderReleaseServiceImpl implements ShopOrderReleaseService {
//LocalDateTime plannedStartDate = shopOrderModel.getPlannedStartDate();
//LocalDateTime plannedCompleteDate = shopOrderModel.getPlannedStartDate();
//前置步骤&工序
String prepositionStepId = null;
String prepositionOperation = null;
//派工表集合
List<SfcDispatch> sfcDispatchList = new ArrayList<>();
//--------------------------------------------------------------------------------------------------------------
@ -247,6 +251,8 @@ public class ShopOrderReleaseServiceImpl implements ShopOrderReleaseService {
sfcDispatchModel.setIsDispatch(Constants.BOOL_FALSE);
sfcDispatchModel.setIsImport(Constants.BOOL_FALSE);
sfcDispatchModel.setIsFirstOperation(isFirstOperation);
sfcDispatchModel.setPrepositionStepId(prepositionStepId);
sfcDispatchModel.setPrepositionOperation(prepositionOperation);
sfcDispatchModel.setCreateUser(user);
sfcDispatchModel.setCreatedDateTime(nowDate);
sfcDispatchModel.setModifyUser(user);
@ -259,6 +265,10 @@ public class ShopOrderReleaseServiceImpl implements ShopOrderReleaseService {
//赋值下一步骤
routerStepBo = routerDTO.getNextStepBo();
//前置工序&步骤赋值
prepositionStepId = stepId;
prepositionOperation = operation;
}
//批量插入工位&人员派工数据

@ -6,10 +6,10 @@
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.dispatch.model.CallItem">
<id column="HANDLE" property="handle" />
<result column="SITE" property="site" />
<result column="SFC_DISPATCH_BO" property="sfcDispatchBo" />
<result column="CALL_ITEM_NO" property="callItemNo" />
<result column="SHOP_ORDER" property="shopOrder" />
<result column="SFC" property="sfc" />
<result column="DISPATCH_NO" property="dispatchNo" />
<result column="OPERATION" property="operation" />
<result column="STEP_ID" property="stepId" />
<result column="RESRCE" property="resrce" />
@ -19,16 +19,25 @@
<result column="REQUIRED_DATE_TIME" property="requiredDateTime" />
<result column="STATUS" property="status" />
<result column="CALL_STATUS" property="callStatus" />
<result column="SEND_STATUS" property="sendStatus" />
<result column="CREATE_USER_BO" property="createUserBo" />
<result column="ISSUE_STATUS" property="issueStatus" />
<result column="CREATE_USER" property="createUser" />
<result column="CREATED_DATE_TIME" property="createdDateTime" />
<result column="UPDATE_USER_BO" property="updateUserBo" />
<result column="UPDATE_USER" property="updateUser" />
<result column="UPDATED_DATE_TIME" property="updatedDateTime" />
<result column="WORK_ORDER" property="workOrder" />
<result column="RESOURCE_TYPE" property="resourceType" />
<result column="DISPATCH_QTY" property="dispatchQty" />
<result column="BLANKING_SIZE" property="blankingSize" />
<result column="ITEM_DESCRIPTION" property="itemDescription" />
<result column="OPERATION_DESCRIPTION" property="operationDescription" />
<result column="REMARK" property="remark" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, SITE, CALL_ITEM_NO, SHOP_ORDER, SFC, DISPATCH_NO, OPERATION, STEP_ID, RESRCE, COMPONENT_BO, CALL_TYPE, REQUIRED_QTY, REQUIRED_DATE_TIME, STATUS, CALL_STATUS, SEND_STATUS, CREATE_USER_BO, CREATED_DATE_TIME, UPDATE_USER_BO, UPDATED_DATE_TIME
HANDLE, SITE, SFC_DISPATCH_BO, CALL_ITEM_NO, SHOP_ORDER, SFC, OPERATION, STEP_ID, RESRCE, COMPONENT_BO, CALL_TYPE, REQUIRED_QTY, REQUIRED_DATE_TIME, STATUS, CALL_STATUS, ISSUE_STATUS, CREATE_USER, CREATED_DATE_TIME, UPDATE_USER, UPDATED_DATE_TIME
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
@ -61,13 +70,13 @@
SELECT <include refid="Base_Column_List"></include> FROM Z_CALL_ITEM
<where>
<if test="ew.entity.handle!=null">
HANDLE=#{ew.handle}
HANDLE=#{ew.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
@ -75,12 +84,13 @@
<if test="ew.entity.callType!=null"> AND CALL_TYPE=#{ew.entity.callType}</if>
<if test="ew.entity.requiredQty!=null"> AND REQUIRED_QTY=#{ew.entity.requiredQty}</if>
<if test="ew.entity.requiredDateTime!=null"> AND REQUIRED_DATE_TIME=#{ew.entity.requiredDateTime}</if>
<if test="ew.entity.issueQty!=null"> AND ISSUE_QTY=#{ew.entity.issueQty}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.callStatus!=null"> AND CALL_STATUS=#{ew.entity.callStatus}</if>
<if test="ew.entity.sendStatus!=null"> AND SEND_STATUS=#{ew.entity.sendStatus}</if>
<if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if>
<if test="ew.entity.issueStatus!=null"> AND ISSUE_STATUS=#{ew.entity.issueStatus}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if>
<if test="ew.entity.updateUser!=null"> AND UPDATE_USER=#{ew.entity.updateUser}</if>
<if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if>
</where>
</select>
@ -90,28 +100,29 @@
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.componentBo!=null"> AND COMPONENT_BO=#{ew.entity.componentBo}</if>
<if test="ew.entity.callType!=null"> AND CALL_TYPE=#{ew.entity.callType}</if>
<if test="ew.entity.requiredQty!=null"> AND REQUIRED_QTY=#{ew.entity.requiredQty}</if>
<if test="ew.entity.requiredDateTime!=null"> AND REQUIRED_DATE_TIME=#{ew.entity.requiredDateTime}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.callStatus!=null"> AND CALL_STATUS=#{ew.entity.callStatus}</if>
<if test="ew.entity.sendStatus!=null"> AND SEND_STATUS=#{ew.entity.sendStatus}</if>
<if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if>
<if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if>
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.componentBo!=null"> AND COMPONENT_BO=#{ew.entity.componentBo}</if>
<if test="ew.entity.callType!=null"> AND CALL_TYPE=#{ew.entity.callType}</if>
<if test="ew.entity.requiredQty!=null"> AND REQUIRED_QTY=#{ew.entity.requiredQty}</if>
<if test="ew.entity.requiredDateTime!=null"> AND REQUIRED_DATE_TIME=#{ew.entity.requiredDateTime}</if>
<if test="ew.entity.issueQty!=null"> AND ISSUE_QTY=#{ew.entity.issueQty}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.callStatus!=null"> AND CALL_STATUS=#{ew.entity.callStatus}</if>
<if test="ew.entity.issueStatus!=null"> AND ISSUE_STATUS=#{ew.entity.issueStatus}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.updateUser!=null"> AND UPDATE_USER=#{ew.entity.updateUser}</if>
<if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -132,10 +143,10 @@
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
@ -143,12 +154,13 @@
<if test="ew.entity.callType!=null"> AND CALL_TYPE=#{ew.entity.callType}</if>
<if test="ew.entity.requiredQty!=null"> AND REQUIRED_QTY=#{ew.entity.requiredQty}</if>
<if test="ew.entity.requiredDateTime!=null"> AND REQUIRED_DATE_TIME=#{ew.entity.requiredDateTime}</if>
<if test="ew.entity.issueQty!=null"> AND ISSUE_QTY=#{ew.entity.issueQty}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.callStatus!=null"> AND CALL_STATUS=#{ew.entity.callStatus}</if>
<if test="ew.entity.sendStatus!=null"> AND SEND_STATUS=#{ew.entity.sendStatus}</if>
<if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if>
<if test="ew.entity.issueStatus!=null"> AND ISSUE_STATUS=#{ew.entity.issueStatus}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if>
<if test="ew.entity.updateUser!=null"> AND UPDATE_USER=#{ew.entity.updateUser}</if>
<if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
@ -170,10 +182,10 @@
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
@ -181,12 +193,13 @@
<if test="ew.entity.callType!=null"> AND CALL_TYPE=#{ew.entity.callType}</if>
<if test="ew.entity.requiredQty!=null"> AND REQUIRED_QTY=#{ew.entity.requiredQty}</if>
<if test="ew.entity.requiredDateTime!=null"> AND REQUIRED_DATE_TIME=#{ew.entity.requiredDateTime}</if>
<if test="ew.entity.issueQty!=null"> AND ISSUE_QTY=#{ew.entity.issueQty}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.callStatus!=null"> AND CALL_STATUS=#{ew.entity.callStatus}</if>
<if test="ew.entity.sendStatus!=null"> AND SEND_STATUS=#{ew.entity.sendStatus}</if>
<if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if>
<if test="ew.entity.issueStatus!=null"> AND ISSUE_STATUS=#{ew.entity.issueStatus}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if>
<if test="ew.entity.updateUser!=null"> AND UPDATE_USER=#{ew.entity.updateUser}</if>
<if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
@ -208,10 +221,10 @@
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
@ -219,12 +232,13 @@
<if test="ew.entity.callType!=null"> AND CALL_TYPE=#{ew.entity.callType}</if>
<if test="ew.entity.requiredQty!=null"> AND REQUIRED_QTY=#{ew.entity.requiredQty}</if>
<if test="ew.entity.requiredDateTime!=null"> AND REQUIRED_DATE_TIME=#{ew.entity.requiredDateTime}</if>
<if test="ew.entity.issueQty!=null"> AND ISSUE_QTY=#{ew.entity.issueQty}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.callStatus!=null"> AND CALL_STATUS=#{ew.entity.callStatus}</if>
<if test="ew.entity.sendStatus!=null"> AND SEND_STATUS=#{ew.entity.sendStatus}</if>
<if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if>
<if test="ew.entity.issueStatus!=null"> AND ISSUE_STATUS=#{ew.entity.issueStatus}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if>
<if test="ew.entity.updateUser!=null"> AND UPDATE_USER=#{ew.entity.updateUser}</if>
<if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
@ -246,10 +260,10 @@
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
@ -257,12 +271,13 @@
<if test="ew.entity.callType!=null"> AND CALL_TYPE=#{ew.entity.callType}</if>
<if test="ew.entity.requiredQty!=null"> AND REQUIRED_QTY=#{ew.entity.requiredQty}</if>
<if test="ew.entity.requiredDateTime!=null"> AND REQUIRED_DATE_TIME=#{ew.entity.requiredDateTime}</if>
<if test="ew.entity.issueQty!=null"> AND ISSUE_QTY=#{ew.entity.issueQty}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.callStatus!=null"> AND CALL_STATUS=#{ew.entity.callStatus}</if>
<if test="ew.entity.sendStatus!=null"> AND SEND_STATUS=#{ew.entity.sendStatus}</if>
<if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if>
<if test="ew.entity.issueStatus!=null"> AND ISSUE_STATUS=#{ew.entity.issueStatus}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if>
<if test="ew.entity.updateUser!=null"> AND UPDATE_USER=#{ew.entity.updateUser}</if>
<if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
@ -284,10 +299,10 @@
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
@ -295,12 +310,13 @@
<if test="ew.entity.callType!=null"> AND CALL_TYPE=#{ew.entity.callType}</if>
<if test="ew.entity.requiredQty!=null"> AND REQUIRED_QTY=#{ew.entity.requiredQty}</if>
<if test="ew.entity.requiredDateTime!=null"> AND REQUIRED_DATE_TIME=#{ew.entity.requiredDateTime}</if>
<if test="ew.entity.issueQty!=null"> AND ISSUE_QTY=#{ew.entity.issueQty}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.callStatus!=null"> AND CALL_STATUS=#{ew.entity.callStatus}</if>
<if test="ew.entity.sendStatus!=null"> AND SEND_STATUS=#{ew.entity.sendStatus}</if>
<if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if>
<if test="ew.entity.issueStatus!=null"> AND ISSUE_STATUS=#{ew.entity.issueStatus}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if>
<if test="ew.entity.updateUser!=null"> AND UPDATE_USER=#{ew.entity.updateUser}</if>
<if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
@ -318,10 +334,10 @@
<trim prefix="(" suffix=")" suffixOverrides=",">
HANDLE,
<if test="site!=null">SITE,</if>
<if test="sfcDispatchBo!=null">SFC_DISPATCH_BO,</if>
<if test="callItemNo!=null">CALL_ITEM_NO,</if>
<if test="shopOrder!=null">SHOP_ORDER,</if>
<if test="sfc!=null">SFC,</if>
<if test="dispatchNo!=null">DISPATCH_NO,</if>
<if test="operation!=null">OPERATION,</if>
<if test="stepId!=null">STEP_ID,</if>
<if test="resrce!=null">RESRCE,</if>
@ -329,21 +345,22 @@
<if test="callType!=null">CALL_TYPE,</if>
<if test="requiredQty!=null">REQUIRED_QTY,</if>
<if test="requiredDateTime!=null">REQUIRED_DATE_TIME,</if>
<if test="issueQty!=null">ISSUE_QTY,</if>
<if test="status!=null">STATUS,</if>
<if test="callStatus!=null">CALL_STATUS,</if>
<if test="sendStatus!=null">SEND_STATUS,</if>
<if test="createUserBo!=null">CREATE_USER_BO,</if>
<if test="issueStatus!=null">ISSUE_STATUS,</if>
<if test="createUser!=null">CREATE_USER,</if>
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
<if test="updateUserBo!=null">UPDATE_USER_BO,</if>
<if test="updateUser!=null">UPDATE_USER,</if>
<if test="updatedDateTime!=null">UPDATED_DATE_TIME,</if>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
<if test="site!=null">#{site},</if>
<if test="sfcDispatchBo!=null">#{sfcDispatchBo},</if>
<if test="callItemNo!=null">#{callItemNo},</if>
<if test="shopOrder!=null">#{shopOrder},</if>
<if test="sfc!=null">#{sfc},</if>
<if test="dispatchNo!=null">#{dispatchNo},</if>
<if test="operation!=null">#{operation},</if>
<if test="stepId!=null">#{stepId},</if>
<if test="resrce!=null">#{resrce},</if>
@ -351,12 +368,13 @@
<if test="callType!=null">#{callType},</if>
<if test="requiredQty!=null">#{requiredQty},</if>
<if test="requiredDateTime!=null">#{requiredDateTime},</if>
<if test="issueQty!=null">#{issueQty},</if>
<if test="status!=null">#{status},</if>
<if test="callStatus!=null">#{callStatus},</if>
<if test="sendStatus!=null">#{sendStatus},</if>
<if test="createUserBo!=null">#{createUserBo},</if>
<if test="issueStatus!=null">#{issueStatus},</if>
<if test="createUser!=null">#{createUser},</if>
<if test="createdDateTime!=null">#{createdDateTime},</if>
<if test="updateUserBo!=null">#{updateUserBo},</if>
<if test="updateUser!=null">#{updateUser},</if>
<if test="updatedDateTime!=null">#{updatedDateTime},</if>
</trim>
</insert>
@ -369,10 +387,10 @@
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
#{site},
#{sfcDispatchBo},
#{callItemNo},
#{shopOrder},
#{sfc},
#{dispatchNo},
#{operation},
#{stepId},
#{resrce},
@ -380,12 +398,13 @@
#{callType},
#{requiredQty},
#{requiredDateTime},
#{issueQty},
#{status},
#{callStatus},
#{sendStatus},
#{createUserBo},
#{issueStatus},
#{createUser},
#{createdDateTime},
#{updateUserBo},
#{updateUser},
#{updatedDateTime},
</trim>
</insert>
@ -394,10 +413,10 @@
<update id="updateById">
UPDATE Z_CALL_ITEM <trim prefix="SET" suffixOverrides=",">
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.sfcDispatchBo!=null">SFC_DISPATCH_BO=#{et.sfcDispatchBo},</if>
<if test="et.callItemNo!=null">CALL_ITEM_NO=#{et.callItemNo},</if>
<if test="et.shopOrder!=null">SHOP_ORDER=#{et.shopOrder},</if>
<if test="et.sfc!=null">SFC=#{et.sfc},</if>
<if test="et.dispatchNo!=null">DISPATCH_NO=#{et.dispatchNo},</if>
<if test="et.operation!=null">OPERATION=#{et.operation},</if>
<if test="et.stepId!=null">STEP_ID=#{et.stepId},</if>
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
@ -405,24 +424,25 @@
<if test="et.callType!=null">CALL_TYPE=#{et.callType},</if>
<if test="et.requiredQty!=null">REQUIRED_QTY=#{et.requiredQty},</if>
<if test="et.requiredDateTime!=null">REQUIRED_DATE_TIME=#{et.requiredDateTime},</if>
<if test="et.issueQty!=null">ISSUE_QTY=#{et.issueQty},</if>
<if test="et.status!=null">STATUS=#{et.status},</if>
<if test="et.callStatus!=null">CALL_STATUS=#{et.callStatus},</if>
<if test="et.sendStatus!=null">SEND_STATUS=#{et.sendStatus},</if>
<if test="et.createUserBo!=null">CREATE_USER_BO=#{et.createUserBo},</if>
<if test="et.issueStatus!=null">ISSUE_STATUS=#{et.issueStatus},</if>
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.updateUserBo!=null">UPDATE_USER_BO=#{et.updateUserBo},</if>
<if test="et.updateUser!=null">UPDATE_USER=#{et.updateUser},</if>
<if test="et.updatedDateTime!=null">UPDATED_DATE_TIME=#{et.updatedDateTime},</if>
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</update>
<update id="updateAllColumnById">
UPDATE Z_CALL_ITEM <trim prefix="SET" suffixOverrides=",">
SITE=#{et.site},
SFC_DISPATCH_BO=#{et.sfcDispatchBo},
CALL_ITEM_NO=#{et.callItemNo},
SHOP_ORDER=#{et.shopOrder},
SFC=#{et.sfc},
DISPATCH_NO=#{et.dispatchNo},
OPERATION=#{et.operation},
STEP_ID=#{et.stepId},
RESRCE=#{et.resrce},
@ -430,24 +450,25 @@
CALL_TYPE=#{et.callType},
REQUIRED_QTY=#{et.requiredQty},
REQUIRED_DATE_TIME=#{et.requiredDateTime},
ISSUE_QTY=#{et.issueQty},
STATUS=#{et.status},
CALL_STATUS=#{et.callStatus},
SEND_STATUS=#{et.sendStatus},
CREATE_USER_BO=#{et.createUserBo},
ISSUE_STATUS=#{et.issueStatus},
CREATE_USER=#{et.createUser},
CREATED_DATE_TIME=#{et.createdDateTime},
UPDATE_USER_BO=#{et.updateUserBo},
UPDATE_USER=#{et.updateUser},
UPDATED_DATE_TIME=#{et.updatedDateTime},
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</update>
<update id="update">
UPDATE Z_CALL_ITEM <trim prefix="SET" suffixOverrides=",">
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.sfcDispatchBo!=null">SFC_DISPATCH_BO=#{et.sfcDispatchBo},</if>
<if test="et.callItemNo!=null">CALL_ITEM_NO=#{et.callItemNo},</if>
<if test="et.shopOrder!=null">SHOP_ORDER=#{et.shopOrder},</if>
<if test="et.sfc!=null">SFC=#{et.sfc},</if>
<if test="et.dispatchNo!=null">DISPATCH_NO=#{et.dispatchNo},</if>
<if test="et.operation!=null">OPERATION=#{et.operation},</if>
<if test="et.stepId!=null">STEP_ID=#{et.stepId},</if>
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
@ -455,12 +476,13 @@
<if test="et.callType!=null">CALL_TYPE=#{et.callType},</if>
<if test="et.requiredQty!=null">REQUIRED_QTY=#{et.requiredQty},</if>
<if test="et.requiredDateTime!=null">REQUIRED_DATE_TIME=#{et.requiredDateTime},</if>
<if test="et.issueQty!=null">ISSUE_QTY=#{et.issueQty},</if>
<if test="et.status!=null">STATUS=#{et.status},</if>
<if test="et.callStatus!=null">CALL_STATUS=#{et.callStatus},</if>
<if test="et.sendStatus!=null">SEND_STATUS=#{et.sendStatus},</if>
<if test="et.createUserBo!=null">CREATE_USER_BO=#{et.createUserBo},</if>
<if test="et.issueStatus!=null">ISSUE_STATUS=#{et.issueStatus},</if>
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.updateUserBo!=null">UPDATE_USER_BO=#{et.updateUserBo},</if>
<if test="et.updateUser!=null">UPDATE_USER=#{et.updateUser},</if>
<if test="et.updatedDateTime!=null">UPDATED_DATE_TIME=#{et.updatedDateTime},</if>
</trim>
<where>
@ -468,10 +490,10 @@
<if test="ew.entity!=null">
HANDLE=#{ew.entity.handle}
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
@ -479,12 +501,13 @@
<if test="ew.entity.callType!=null"> AND CALL_TYPE=#{ew.entity.callType}</if>
<if test="ew.entity.requiredQty!=null"> AND REQUIRED_QTY=#{ew.entity.requiredQty}</if>
<if test="ew.entity.requiredDateTime!=null"> AND REQUIRED_DATE_TIME=#{ew.entity.requiredDateTime}</if>
<if test="ew.entity.issueQty!=null"> AND ISSUE_QTY=#{ew.entity.issueQty}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.callStatus!=null"> AND CALL_STATUS=#{ew.entity.callStatus}</if>
<if test="ew.entity.sendStatus!=null"> AND SEND_STATUS=#{ew.entity.sendStatus}</if>
<if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if>
<if test="ew.entity.issueStatus!=null"> AND ISSUE_STATUS=#{ew.entity.issueStatus}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if>
<if test="ew.entity.updateUser!=null"> AND UPDATE_USER=#{ew.entity.updateUser}</if>
<if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
@ -523,10 +546,10 @@
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
@ -534,12 +557,13 @@
<if test="ew.entity.callType!=null"> AND CALL_TYPE=#{ew.entity.callType}</if>
<if test="ew.entity.requiredQty!=null"> AND REQUIRED_QTY=#{ew.entity.requiredQty}</if>
<if test="ew.entity.requiredDateTime!=null"> AND REQUIRED_DATE_TIME=#{ew.entity.requiredDateTime}</if>
<if test="ew.entity.issueQty!=null"> AND ISSUE_QTY=#{ew.entity.issueQty}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.callStatus!=null"> AND CALL_STATUS=#{ew.entity.callStatus}</if>
<if test="ew.entity.sendStatus!=null"> AND SEND_STATUS=#{ew.entity.sendStatus}</if>
<if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if>
<if test="ew.entity.issueStatus!=null"> AND ISSUE_STATUS=#{ew.entity.issueStatus}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if>
<if test="ew.entity.updateUser!=null"> AND UPDATE_USER=#{ew.entity.updateUser}</if>
<if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
@ -559,4 +583,40 @@
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
<delete id="deleteDispatchCallItem">
DELETE FROM Z_CALL_ITEM WHERE SFC_DISPATCH_BO IN
<foreach item="item" collection="list" separator="," open="(" close=")" index="">
#{item.handle}
</foreach>
</delete>
<select id="selectDispatchCallItem" resultMap="BaseResultMap">
SELECT ZSD.HANDLE SFC_DISPATCH_BO, ZSD.SITE, ZSD.SHOP_ORDER, ZSD.SFC, ZSD.DISPATCH_NO, ZSD.OPERATION, ZSD.STEP_ID, ZSD.RESRCE, BC.COMPONENT_GBO COMPONENT_BO,
SC.QTY*BC.QTY REQUIRED_QTY, ZSD.PLANNED_START_DATE REQUIRED_DATE_TIME
FROM Z_SFC_DISPATCH ZSD
INNER JOIN SFC SC ON SC.SITE = ZSD.SITE AND SC.SFC = ZSD.SFC
INNER JOIN SFC_BOM SB ON SB.SFC_BO = SC.HANDLE
INNER JOIN BOM_COMPONENT BC ON BC.BOM_BO = SB.BOM_BO
INNER JOIN ITEM CP ON CP.HANDLE = BC.COMPONENT_GBO
INNER JOIN BOM_OPERATION BO ON BO.BOM_COMPONENT_BO = BC.HANDLE AND BO.OPERATION_BO = 'OperationBO:'||SC.SITE||','||ZSD.OPERATION||',#'
INNER JOIN CUSTOM_FIELDS CF ON CF.HANDLE = BC.HANDLE AND CF."ATTRIBUTE" = 'STEP_ID' AND CF.VALUE = ZSD.STEP_ID
WHERE ZSD.HANDLE IN
<foreach item="item" collection="list" separator="," open="(" close=")" index="">
#{item.handle}
</foreach>
</select>
<select id="findCallItemList" resultMap="BaseResultMap">
SELECT ZCI.HANDLE, ZCI.SITE, CF.VALUE WORK_ORDER, ZSD.WORK_CENTER, ZSD.SHOP_ORDER, ZSD.SFC, ZSD.DISPATCH_NO, CP.ITEM, IT.DESCRIPTION ITEM_DESCRIPTION, ZSD.BLANKING_SIZE,
ZSD.DISPATCH_STATUS, ZCI.OPERATION, OPT.DESCRIPTION OPERATION_DESCRIPTION, ZSD.RESOURCE_TYPE, ZCI.RESRCE, ZSD.DISPATCH_QTY, ZSD.PLANNED_START_DATE, ZSD.REMARK
FROM Z_SFC_DISPATCH ZSD
INNER JOIN Z_CALL_ITEM ZCI ON ZCI.SFC_DISPATCH_BO = ZSD.HANDLE
INNER JOIN SHOP_ORDER SO ON SO.SITE = ZSD.SITE AND ZSD.SHOP_ORDER = SO.SHOP_ORDER
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = SO.HANDLE AND CF.ATTRIBUTE = 'WORK_ORDER'
INNER JOIN ITEM CP ON CP.HANDLE = ZCI.COMPONENT_BO
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = CP.HANDLE AND IT.LOCALE = 'zh'
INNER JOIN OPERATION OP ON OP.SITE = ZCI.SITE AND OP.OPERATION = ZCI.OPERATION AND OP.CURRENT_REVISION = 'true'
LEFT JOIN OPERATION_T OPT ON OPT.OPERATION_BO = OP.HANDLE AND OPT.LOCALE = 'zh'
ORDER BY ZSD.SFC, ZSD.STEP_ID, ZCI.CALL_TYPE
</select>
</mapper>

@ -37,6 +37,7 @@
<result column="IS_DISPATCH" property="isDispatch" />
<result column="IS_IMPORT" property="isImport" />
<result column="REMARK" property="remark" />
<result column="PREPOSITION_STEP_ID" property="prepositionStepId" />
<result column="PREPOSITION_OPERATION" property="prepositionOperation" />
<result column="IS_FIRST_OPERATION" property="isFirstOperation" />
<result column="CREATE_USER" property="createUser" />
@ -52,6 +53,7 @@
<resultMap id="FullResultMap" type="com.foreverwin.mesnac.dispatch.model.ShopOrderRelease">
<result column="IS_COMPLETED" property="isCompleted" />
<result column="ITEM_BO" property="itemBo" />
<result column="ITEM" property="item" />
<result column="STATUS_NAME" property="statusName" />
<result column="IS_MAJOR" property="isMajor" />
@ -69,7 +71,7 @@
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, SITE, SHOP_ORDER, SFC, BLANKING_SIZE, DISPATCH_SEQ, DISPATCH_NO, DISPATCH_STATUS, DRAWINGS_NO, DRAWINGS_REVISION, IS_LOCK, ROUTER_BO, STEP_ID, OPERATION, RESOURCE_TYPE, WORK_CENTER, RESRCE, EMPLOYEE, TURN_OPERATION, DISPATCH_QTY, PROD_HOURS, PLANNED_START_DATE, PLANNED_COMP_DATE, EARLIEST_START_DATE, LATEST_END_DATE, SO_RELEASED_DATE, SFC_RELEASED_DATE, RELEASED_COMPLETE_DATE, ACTUAL_START_DATE, ACTUAL_COMPLETE_DATE, IS_DISPATCH, IS_IMPORT, REMARK, PREPOSITION_OPERATION, IS_FIRST_OPERATION, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME, OTHER_1, OTHER_2, OTHER_3, OTHER_4, OTHER_5
HANDLE, SITE, SHOP_ORDER, SFC, BLANKING_SIZE, DISPATCH_SEQ, DISPATCH_NO, DISPATCH_STATUS, DRAWINGS_NO, DRAWINGS_REVISION, IS_LOCK, ROUTER_BO, STEP_ID, OPERATION, RESOURCE_TYPE, WORK_CENTER, RESRCE, EMPLOYEE, TURN_OPERATION, DISPATCH_QTY, PROD_HOURS, PLANNED_START_DATE, PLANNED_COMP_DATE, EARLIEST_START_DATE, LATEST_END_DATE, SO_RELEASED_DATE, SFC_RELEASED_DATE, RELEASED_COMPLETE_DATE, ACTUAL_START_DATE, ACTUAL_COMPLETE_DATE, IS_DISPATCH, IS_IMPORT, REMARK, PREPOSITION_STEP_ID, PREPOSITION_OPERATION, IS_FIRST_OPERATION, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME, OTHER_1, OTHER_2, OTHER_3, OTHER_4, OTHER_5
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
@ -136,6 +138,8 @@
<if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if>
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if>
<if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if>
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
@ -189,6 +193,8 @@
<if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if>
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if>
<if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if>
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
@ -250,6 +256,8 @@
<if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if>
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if>
<if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if>
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
@ -311,6 +319,8 @@
<if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if>
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if>
<if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if>
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
@ -372,6 +382,8 @@
<if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if>
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if>
<if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if>
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
@ -433,6 +445,8 @@
<if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if>
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if>
<if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if>
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
@ -494,6 +508,8 @@
<if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if>
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if>
<if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if>
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
@ -551,6 +567,7 @@
<if test="isDispatch!=null">IS_DISPATCH,</if>
<if test="isImport!=null">IS_IMPORT,</if>
<if test="remark!=null">REMARK,</if>
<if test="prepositionStepId!=null">PREPOSITION_STEP_ID,</if>
<if test="prepositionOperation!=null">PREPOSITION_OPERATION,</if>
<if test="isFirstOperation!=null">IS_FIRST_OPERATION,</if>
<if test="createUser!=null">CREATE_USER,</if>
@ -597,6 +614,7 @@
<if test="isDispatch!=null">#{isDispatch},</if>
<if test="isImport!=null">#{isImport},</if>
<if test="remark!=null">#{remark},</if>
<if test="prepositionStepId!=null">#{prepositionStepId},</if>
<if test="prepositionOperation!=null">#{prepositionOperation},</if>
<if test="isFirstOperation!=null">#{isFirstOperation},</if>
<if test="createUser!=null">#{createUser},</if>
@ -650,6 +668,7 @@
#{isDispatch},
#{isImport},
#{remark},
#{prepositionStepId},
#{prepositionOperation},
#{isFirstOperation},
#{createUser},
@ -699,6 +718,7 @@
<if test="et.isDispatch!=null">IS_DISPATCH=#{et.isDispatch},</if>
<if test="et.isImport!=null">IS_IMPORT=#{et.isImport},</if>
<if test="et.remark!=null">REMARK=#{et.remark},</if>
<if test="et.prepositionStepId!=null">PREPOSITION_STEP_ID=#{et.prepositionStepId},</if>
<if test="et.prepositionOperation!=null">PREPOSITION_OPERATION=#{et.prepositionOperation},</if>
<if test="et.isFirstOperation!=null">IS_FIRST_OPERATION=#{et.isFirstOperation},</if>
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
@ -748,6 +768,7 @@
IS_DISPATCH=#{et.isDispatch},
IS_IMPORT=#{et.isImport},
REMARK=#{et.remark},
PREPOSITION_STEP_ID=#{et.prepositionStepId},
PREPOSITION_OPERATION=#{et.prepositionOperation},
IS_FIRST_OPERATION=#{et.isFirstOperation},
CREATE_USER=#{et.createUser},
@ -797,6 +818,7 @@
<if test="et.isDispatch!=null">IS_DISPATCH=#{et.isDispatch},</if>
<if test="et.isImport!=null">IS_IMPORT=#{et.isImport},</if>
<if test="et.remark!=null">REMARK=#{et.remark},</if>
<if test="et.prepositionStepId!=null">PREPOSITION_STEP_ID=#{et.prepositionStepId},</if>
<if test="et.prepositionOperation!=null">PREPOSITION_OPERATION=#{et.prepositionOperation},</if>
<if test="et.isFirstOperation!=null">IS_FIRST_OPERATION=#{et.isFirstOperation},</if>
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
@ -845,6 +867,7 @@
<if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if>
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if>
<if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if>
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
@ -924,6 +947,8 @@
<if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if>
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if>
<if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if>
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
@ -969,12 +994,13 @@
<select id="findSfcDispatchList" resultMap="FullResultMap">
SELECT WIP.*, CASE WHEN WIP.DISPATCH_SEQ = 1 THEN WIP.PLANNED_START_DATE ELSE V1.PLANNED_COMP_DATE END EARLIEST_START_DATE,
CASE WHEN V2.HANDLE IS NOT NULL THEN V2.PLANNED_START_DATE ELSE WIP.PLANNED_COMP_DATE END LATEST_END_DATE,
V1.STEP_ID PREPOSITION_STEP_ID, V1.OPERATION PREPOSITION_OPERATION,
CASE WHEN WIP.DISPATCH_SEQ = 1 OR V1.OTHER_1 = 'true' THEN N'是' ELSE N'否' END IS_COMPLETED,
CASE WHEN WIP.DISPATCH_STATUS = 'NEW' THEN N'新建' WHEN WIP.DISPATCH_STATUS = 'CANCEL' THEN N'取消'
WHEN WIP.DISPATCH_STATUS = 'PAUSE' THEN N'暂停' WHEN WIP.DISPATCH_STATUS = 'RELEASE' THEN N'发布'
END AS STATUS_NAME
FROM (
SELECT DISTINCT SD.HANDLE, SD.SITE, SD.SHOP_ORDER, SD.DISPATCH_NO, C1.VALUE WORK_ORDER, IM.ITEM, IT.DESCRIPTION ITEM_DESCRIPTION, SD.SFC, SD.DISPATCH_STATUS,
SELECT DISTINCT SD.HANDLE, SD.SITE, SD.SHOP_ORDER, SD.DISPATCH_NO, C1.VALUE WORK_ORDER, IM.HANDLE ITEM_BO, IM.ITEM, IT.DESCRIPTION ITEM_DESCRIPTION, SD.SFC, SD.DISPATCH_STATUS,
SD.STEP_ID, SD.OPERATION, OT.DESCRIPTION OPERATION_DESCRIPTION, SD.RESOURCE_TYPE, SD.RESRCE, SD.EMPLOYEE, SD.EMPLOYEE USER_NAME, SD.DISPATCH_QTY, SD.PROD_HOURS,
CASE WHEN OTHER_1 = 'true' THEN SD.DISPATCH_QTY ELSE 0 END COMPLETED_QTY, SD.PLANNED_START_DATE, SD.PLANNED_COMP_DATE, SD.WORK_CENTER, SD.IS_DISPATCH,
SD.ACTUAL_START_DATE, SD.ACTUAL_COMPLETE_DATE, SD.REMARK, SD.DISPATCH_SEQ, SD.DISPATCH_SEQ-1 BEFORE_SEQ, SD.DISPATCH_SEQ+1 AFTER_SEQ,

@ -46,6 +46,8 @@ public class NcCodeController {
public R getNcCodeList(NcCode ncCode){
List<NcCode> result;
QueryWrapper<NcCode> queryWrapper = new QueryWrapper<>();
String site = CommonMethods.getSite();
ncCode.setSite(site);
queryWrapper.setEntity(ncCode);
result = ncCodeService.list(queryWrapper);
return R.ok(result);

@ -46,6 +46,8 @@ public class NcGroupController {
public R getNcGroupList(NcGroup ncGroup){
List<NcGroup> result;
QueryWrapper<NcGroup> queryWrapper = new QueryWrapper<>();
String site = CommonMethods.getSite();
ncGroup.setSite(site);
queryWrapper.setEntity(ncGroup);
result = ncGroupService.list(queryWrapper);
return R.ok(result);

@ -74,4 +74,21 @@ public class OperationController {
return R.ok(result);
}
@ResponseBody
@GetMapping("/getOperationStep")
public R getOperationStep(FrontPage<Operation> frontPage, Operation operation){
IPage result;
try {
QueryWrapper<Operation> queryWrapper = new QueryWrapper<>();
operation.setSite(CommonMethods.getSite());
operation.setOperation(frontPage.getGlobalQuery());
queryWrapper.setEntity(operation);
result = operationService.selectOperationStep(frontPage.getPagePlus(), queryWrapper);
} catch (Exception e) {
return R.failed(e.getMessage());
}
return R.ok(result);
}
}

@ -19,7 +19,7 @@ import java.util.List;
* @since 2021-05-26
*/
@RestController
@RequestMapping("/RESOURCE")
@RequestMapping("/RESOURCE")
public class ResrceController {
@Autowired
@ -41,6 +41,27 @@ public class ResrceController {
return R.ok(result);
}
@ResponseBody
@GetMapping("getEnabledResourceList")
public R getEnabledResourceList(Resrce resrce) {
List<Resrce> result;
try {
String site = CommonMethods.getSite();
//已启用状态
String status301Bo = "StatusBO:" + site + ",301";
resrce.setSite(site);
resrce.setStatusBo(status301Bo);
QueryWrapper<Resrce> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(resrce);
result = resrceService.list(queryWrapper);
} catch (Exception e) {
return R.failed(e.getMessage());
}
return R.ok(result);
}
@GetMapping("/getResourceListByType")
public R getResourceListByType(String resourceType) {
List<Resrce> result;

@ -25,4 +25,7 @@ public interface OperationMapper extends BaseMapper<Operation> {
Operation getCurrentRevisionRef(@Param("site") String site, @Param("operation") String operation);
IPage<Operation> selectOperationStep( IPage<Operation> page, @Param("locale") String locale,@Param("ew") Wrapper<Operation> wrapper);
}

@ -25,6 +25,8 @@ public interface OperationService extends IService<Operation> {
*/
IPage<Operation> selectPage(Page<Operation> page, QueryWrapper<Operation> operation);
IPage<Operation> selectOperationStep(Page<Operation> page, QueryWrapper<Operation> queryWrapper);
List<Operation> selectList(Operation operation);
Operation getCurrentRevisionRef(String site, String operation);

@ -40,6 +40,11 @@ public class OperationServiceImpl extends ServiceImpl<OperationMapper, Operation
return page;
}
@Override
public IPage<Operation> selectOperationStep(Page<Operation> page, QueryWrapper<Operation> queryWrapper) {
Locale locale = LocaleContextHolder.getLocale();
return operationMapper.selectOperationStep(page,locale.getLanguage(),queryWrapper);
}
@Override
public List<Operation> selectList(Operation operation) {
QueryWrapper<Operation> queryWrapper = new QueryWrapper<>();

@ -183,12 +183,12 @@
<if test="ew.entity.dpmoCategoryBo!=null"> AND DPMO_CATEGORY_BO=#{ew.entity.dpmoCategoryBo}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
AND ${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
AND ${ew.sqlSegment}
</if>
</select>

@ -180,12 +180,12 @@
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
AND ${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
AND ${ew.sqlSegment}
</if>
</select>

@ -615,4 +615,16 @@
AND OPERATION = #{operation}
AND CURRENT_REVISION = 'true'
</select>
<select id="selectOperationStep" resultMap="BaseResultMap">
SELECT DISTINCT O.OPERATION,RS.STEP_ID,OT.DESCRIPTION
FROM OPERATION O
LEFT JOIN OPERATION_T OT ON O.HANDLE = OT.OPERATION_BO AND OT.LOCALE = #{locale}
INNER JOIN ROUTER_OPERATION RO ON (RO.OPERATION_BO = O.HANDLE or 'OperationBO:'|| O.SITE ||','|| O.OPERATION||',#'=RO.OPERATION_BO )
INNER JOIN ROUTER_STEP RS ON rs.HANDLE = RO.ROUTER_STEP_BO
where O.SITE = #{ew.entity.site}
<if test="ew.entity.operation!=null and ew.entity.operation!='' " >
AND (O.OPERATION LIKE '%${ew.entity.operation}%' OR O.REVISION LIKE '%${ew.entity.operation}%' OR OT.DESCRIPTION LIKE '%${ew.entity.operation}%')
</if>
ORDER BY RS.STEP_ID
</select>
</mapper>

@ -15,4 +15,5 @@ import org.springframework.stereotype.Repository;
@Repository
public interface SfcDataMapper extends BaseMapper<SfcData> {
void updateDataAttr(SfcData sfcData);
}

@ -97,16 +97,11 @@ public class SfcDataServiceImpl extends ServiceImpl<SfcDataMapper, SfcData> impl
} else {
//更新位置到SFC
SfcData sfcData = sfcDataList.get(0);
sfcData.setSfcBo(sfcBo);
sfcData.setDataField(CustomFieldConstant.SFC_DATA_LOCATION);
sfcData.setDataAttr(location);
sfcData.setDateTime(nowDate);
sfcData.setModifiedDateTime(nowDate);
Wrapper<SfcData> updateWrapper = new UpdateWrapper<>();
SfcData tjSfcData = new SfcData();
tjSfcData.setSfcBo(sfcBo);
tjSfcData.setDataField(CustomFieldConstant.SFC_DATA_LOCATION);
((UpdateWrapper<SfcData>) updateWrapper).setEntity(tjSfcData);
sfcDataMapper.update(sfcData, updateWrapper);
sfcDataMapper.updateDataAttr(sfcData);
}
}

@ -329,4 +329,8 @@
<!-- BaseMapper标准查询/修改/删除 -->
<update id="updateDataAttr">
UPDATE SFC_DATA SET DATA_ATTR = #{dataAttr}, MODIFIED_DATE_TIME = #{modifiedDateTime}
WHERE SFC_BO = #{sfcBo} AND DATA_FIELD = #{dataField}
</update>
</mapper>

Loading…
Cancel
Save