0820-需求变更
This commit is contained in:
@@ -15,6 +15,7 @@ import com.ktg.common.core.page.TableDataInfo;
|
|||||||
import com.ktg.common.utils.StringUtils;
|
import com.ktg.common.utils.StringUtils;
|
||||||
import com.ktg.mes.md.domain.MdItem;
|
import com.ktg.mes.md.domain.MdItem;
|
||||||
import com.ktg.mes.md.domain.MdProductBom;
|
import com.ktg.mes.md.domain.MdProductBom;
|
||||||
|
import com.ktg.mes.md.service.IMdItemService;
|
||||||
import com.ktg.mes.md.service.IMdProductBomService;
|
import com.ktg.mes.md.service.IMdProductBomService;
|
||||||
import com.ktg.mes.pro.domain.ProMachineryJob;
|
import com.ktg.mes.pro.domain.ProMachineryJob;
|
||||||
import com.ktg.mes.pro.domain.ProTask;
|
import com.ktg.mes.pro.domain.ProTask;
|
||||||
@@ -78,6 +79,9 @@ public class ProWorkorderController extends BaseController
|
|||||||
@Resource
|
@Resource
|
||||||
private ISaleOrderInfoService saleOrderInfoService;
|
private ISaleOrderInfoService saleOrderInfoService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IMdItemService mdItemService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询生产工单列表
|
* 查询生产工单列表
|
||||||
*/
|
*/
|
||||||
@@ -162,6 +166,14 @@ public class ProWorkorderController extends BaseController
|
|||||||
public AjaxResult edit(@RequestBody ProWorkorder proWorkorder)
|
public AjaxResult edit(@RequestBody ProWorkorder proWorkorder)
|
||||||
{
|
{
|
||||||
ProWorkorder workorder = proWorkorderService.selectProWorkorderByWorkorderId(proWorkorder.getWorkorderId());
|
ProWorkorder workorder = proWorkorderService.selectProWorkorderByWorkorderId(proWorkorder.getWorkorderId());
|
||||||
|
//如果修改产品编码,就判断一下只能修改同类的产品,且后续小程序的数据也跟着变化
|
||||||
|
if (!workorder.getProductId().equals(proWorkorder.getProductId())){
|
||||||
|
MdItem savedItem = mdItemService.selectMdItemById(workorder.getProductId());
|
||||||
|
MdItem newItem = mdItemService.selectMdItemById(proWorkorder.getProductId());
|
||||||
|
if (!savedItem.getItemCode().equals(newItem.getItemCode())){
|
||||||
|
return AjaxResult.error("修改产品时,只能修改同类产品");
|
||||||
|
}
|
||||||
|
}
|
||||||
int ret =proWorkorderService.updateProWorkorder(proWorkorder);
|
int ret =proWorkorderService.updateProWorkorder(proWorkorder);
|
||||||
//如果是产品和数量发生变化则需要重新生成BOM组成
|
//如果是产品和数量发生变化则需要重新生成BOM组成
|
||||||
if(ret >0){
|
if(ret >0){
|
||||||
|
@@ -60,7 +60,7 @@ public class ProMachineryJob {
|
|||||||
private Date endTime;
|
private Date endTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 作业状态(WORKING 进行中,FINISHED 已完成)
|
* 作业状态(WORKING 进行中,FINISHED 已完成,CANCEL 已撤销)
|
||||||
*/
|
*/
|
||||||
private String jobStatus;
|
private String jobStatus;
|
||||||
|
|
||||||
|
@@ -2,6 +2,8 @@ package com.ktg.mes.pro.dto;
|
|||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备生产记录-分页查询对象
|
* 设备生产记录-分页查询对象
|
||||||
*
|
*
|
||||||
@@ -50,4 +52,8 @@ public class ProMachineryJobQueryPage {
|
|||||||
* 生产状态
|
* 生产状态
|
||||||
*/
|
*/
|
||||||
private String jobStatus;
|
private String jobStatus;
|
||||||
|
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
private Date endTime;
|
||||||
}
|
}
|
||||||
|
@@ -37,6 +37,8 @@ public interface IProMachineryJobService extends IService<ProMachineryJob> {
|
|||||||
|
|
||||||
Long jl(ProJLRequest req, SysUser currentUser);
|
Long jl(ProJLRequest req, SysUser currentUser);
|
||||||
|
|
||||||
|
int cancel(Long jobId, SysUser currentUser);
|
||||||
|
|
||||||
Long khsw(ProKHSWRequest req, SysUser currentUser);
|
Long khsw(ProKHSWRequest req, SysUser currentUser);
|
||||||
|
|
||||||
void startJb(ProJBRequest req, SysUser currentUser);
|
void startJb(ProJBRequest req, SysUser currentUser);
|
||||||
|
@@ -167,6 +167,28 @@ public class ProMachineryJobServiceImpl extends ServiceImpl<ProMachineryJobMappe
|
|||||||
return newProgress.getProgressId();
|
return newProgress.getProgressId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public int cancel(Long jobId, SysUser currentUser) {
|
||||||
|
ProMachineryJob job = machineryJobMapper.selectById(jobId);
|
||||||
|
if (job == null) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
job.setJobStatus("CANCEL");
|
||||||
|
job.setUpdateTime(new Date());
|
||||||
|
job.setUpdateBy(currentUser.getUserName());
|
||||||
|
int result = machineryJobMapper.updateById(job);
|
||||||
|
if (result > 0) {
|
||||||
|
// 修改设备状态、设备生产工单id
|
||||||
|
DvMachinery dvMachineryUpdate = new DvMachinery();
|
||||||
|
dvMachineryUpdate.setMachineryId(job.getMachineryId());
|
||||||
|
dvMachineryUpdate.setMachineryJobId(0L);
|
||||||
|
dvMachineryUpdate.setStatus("STOP");
|
||||||
|
machineryMapper.updateDvMachinery(dvMachineryUpdate);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Long khsw(ProKHSWRequest req, SysUser currentUser) {
|
public Long khsw(ProKHSWRequest req, SysUser currentUser) {
|
||||||
|
@@ -6,8 +6,13 @@ import com.ktg.mes.pro.domain.ProMeterialConsume;
|
|||||||
import com.ktg.mes.pro.dto.ProMeterialConsumeDto;
|
import com.ktg.mes.pro.dto.ProMeterialConsumeDto;
|
||||||
import com.ktg.mes.pro.mapper.ProMeterialConsumeMapper;
|
import com.ktg.mes.pro.mapper.ProMeterialConsumeMapper;
|
||||||
import com.ktg.mes.pro.service.IProMeterialConsumeService;
|
import com.ktg.mes.pro.service.IProMeterialConsumeService;
|
||||||
|
import com.ktg.mes.pro.service.IProMonthReportService;
|
||||||
|
import com.ktg.mes.pro.service.IProYearReportService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.Year;
|
||||||
|
import java.time.YearMonth;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -19,6 +24,11 @@ import java.util.List;
|
|||||||
@Service
|
@Service
|
||||||
public class ProMeterialConsumeServiceImpl extends ServiceImpl<ProMeterialConsumeMapper, ProMeterialConsume> implements IProMeterialConsumeService {
|
public class ProMeterialConsumeServiceImpl extends ServiceImpl<ProMeterialConsumeMapper, ProMeterialConsume> implements IProMeterialConsumeService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IProMonthReportService proMonthReportService;
|
||||||
|
@Autowired
|
||||||
|
private IProYearReportService proYearReportService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProMeterialConsumeDto> getPageList(ProMeterialConsume proMeterialConsume) {
|
public List<ProMeterialConsumeDto> getPageList(ProMeterialConsume proMeterialConsume) {
|
||||||
return this.getBaseMapper().getPageList(proMeterialConsume);
|
return this.getBaseMapper().getPageList(proMeterialConsume);
|
||||||
@@ -37,5 +47,8 @@ public class ProMeterialConsumeServiceImpl extends ServiceImpl<ProMeterialConsum
|
|||||||
}
|
}
|
||||||
this.updateById(ProMeterialConsume.builder().id(obj.getId()).productQuantity(obj.getProductQuantity())
|
this.updateById(ProMeterialConsume.builder().id(obj.getId()).productQuantity(obj.getProductQuantity())
|
||||||
.itemQuantity(obj.getItemQuantity()).build());
|
.itemQuantity(obj.getItemQuantity()).build());
|
||||||
|
//修改以后更新月报表
|
||||||
|
proMonthReportService.computeReport(YearMonth.now());
|
||||||
|
proYearReportService.computeReport(Year.now());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -89,21 +89,22 @@ public class ProMonthReportServiceImpl extends ServiceImpl<ProMonthReportMapper,
|
|||||||
}
|
}
|
||||||
ProMonthReport proMonthReport = this.getById(obj.getId());
|
ProMonthReport proMonthReport = this.getById(obj.getId());
|
||||||
proMonthReport.setMachinePower(obj.getMachinePower());
|
proMonthReport.setMachinePower(obj.getMachinePower());
|
||||||
// 机修房电消耗 每月进行一次抄表,计算公式=(上一月抄表数-当月抄表数)*400
|
// 机修房电消耗 每月进行一次抄表,计算公式=(上一月抄表数-当月抄表数)*400 0821 去掉这个需求,直接写入获取的字段
|
||||||
Date previousMonth = DateUtils.addMonths(DateUtils.parseDate(proMonthReport.getReportMonth()), -1);
|
// Date previousMonth = DateUtils.addMonths(DateUtils.parseDate(proMonthReport.getReportMonth()), -1);
|
||||||
String lastMonth = DateUtils.parseDateToStr(DateUtils.YYYY_MM, previousMonth);
|
// String lastMonth = DateUtils.parseDateToStr(DateUtils.YYYY_MM, previousMonth);
|
||||||
|
//
|
||||||
LambdaQueryWrapper<ProMonthReport> queryWrapper = new LambdaQueryWrapper<>();
|
// LambdaQueryWrapper<ProMonthReport> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(ProMonthReport::getReportMonth, lastMonth);
|
// queryWrapper.eq(ProMonthReport::getReportMonth, lastMonth);
|
||||||
ProMonthReport lastMonthReport = this.getOne(queryWrapper);
|
// ProMonthReport lastMonthReport = this.getOne(queryWrapper);
|
||||||
|
//
|
||||||
if (lastMonthReport == null) {
|
// if (lastMonthReport == null) {
|
||||||
|
// proMonthReport.setMachineShopPower(obj.getMachinePower());
|
||||||
|
// }
|
||||||
|
// if (lastMonthReport != null && lastMonthReport.getMachinePower().compareTo(BigDecimal.ZERO) != 0) {
|
||||||
|
// BigDecimal machinePower = obj.getMachinePower().subtract(lastMonthReport.getMachinePower()).multiply(new BigDecimal(400));
|
||||||
|
// proMonthReport.setMachineShopPower(machinePower);
|
||||||
|
// }
|
||||||
proMonthReport.setMachineShopPower(obj.getMachinePower());
|
proMonthReport.setMachineShopPower(obj.getMachinePower());
|
||||||
}
|
|
||||||
if (lastMonthReport != null && lastMonthReport.getMachinePower().compareTo(BigDecimal.ZERO) != 0) {
|
|
||||||
BigDecimal machinePower = obj.getMachinePower().subtract(lastMonthReport.getMachinePower()).multiply(new BigDecimal(400));
|
|
||||||
proMonthReport.setMachineShopPower(machinePower);
|
|
||||||
}
|
|
||||||
// 吨/度=当月(南北电消耗+机修房电消耗)/成品
|
// 吨/度=当月(南北电消耗+机修房电消耗)/成品
|
||||||
BigDecimal power = proMonthReport.getPower().add(proMonthReport.getMachineShopPower());
|
BigDecimal power = proMonthReport.getPower().add(proMonthReport.getMachineShopPower());
|
||||||
BigDecimal powerProduce = proMonthReport.getProductQuantity().divide(power, 4, BigDecimal.ROUND_HALF_UP);
|
BigDecimal powerProduce = proMonthReport.getProductQuantity().divide(power, 4, BigDecimal.ROUND_HALF_UP);
|
||||||
|
@@ -47,6 +47,7 @@ public class ProConsumeTask {
|
|||||||
|
|
||||||
// 任务处理入口(每日0点生成当天记录)
|
// 任务处理入口(每日0点生成当天记录)
|
||||||
@Scheduled(cron = "1 0 0 * * ?")
|
@Scheduled(cron = "1 0 0 * * ?")
|
||||||
|
// @Scheduled(cron = "* 0/1 * * * ?")
|
||||||
public void run() {
|
public void run() {
|
||||||
Date now = DateUtils.getNowDate();
|
Date now = DateUtils.getNowDate();
|
||||||
genPower(now);
|
genPower(now);
|
||||||
|
@@ -34,6 +34,6 @@ public class ProJLRequest {
|
|||||||
|
|
||||||
private BigDecimal saAux;
|
private BigDecimal saAux;
|
||||||
|
|
||||||
@NotNull(message = "天然气表数不能为空")
|
//@NotNull(message = "天然气表数不能为空")
|
||||||
private BigDecimal gas;
|
private BigDecimal gas;
|
||||||
}
|
}
|
||||||
|
@@ -12,6 +12,6 @@ import java.math.BigDecimal;
|
|||||||
@Data
|
@Data
|
||||||
public class ProZJRequest extends ProQYHYRequest {
|
public class ProZJRequest extends ProQYHYRequest {
|
||||||
|
|
||||||
@NotNull(message = "天然气表数不能为空")
|
//@NotNull(message = "天然气表数不能为空")
|
||||||
private BigDecimal gas;
|
private BigDecimal gas;
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
package com.ktg.mes.pro.vo.res;
|
package com.ktg.mes.pro.vo.res;
|
||||||
|
|
||||||
|
import com.ktg.common.annotation.Excel;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
@@ -40,4 +41,14 @@ public class ProWorkorderResponse implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规格型号
|
||||||
|
*/
|
||||||
|
private String productSpc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 炉号
|
||||||
|
*/
|
||||||
|
private String machineryNo;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -22,6 +22,7 @@ import com.ktg.mes.wm.service.IWmIssueLineService;
|
|||||||
import com.ktg.mes.wm.service.IWmStorageAreaService;
|
import com.ktg.mes.wm.service.IWmStorageAreaService;
|
||||||
import com.ktg.mes.wm.service.IWmStorageLocationService;
|
import com.ktg.mes.wm.service.IWmStorageLocationService;
|
||||||
import com.ktg.mes.wm.service.IWmWarehouseService;
|
import com.ktg.mes.wm.service.IWmWarehouseService;
|
||||||
|
import com.ktg.mes.wm.vo.WmIssueHeaderExportVo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -85,8 +86,8 @@ public class WmIssueHeaderController extends BaseController
|
|||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, WmIssueHeader wmIssueHeader)
|
public void export(HttpServletResponse response, WmIssueHeader wmIssueHeader)
|
||||||
{
|
{
|
||||||
List<WmIssueHeader> list = wmIssueHeaderService.selectWmIssueHeaderList(wmIssueHeader);
|
List<WmIssueHeaderExportVo> list = wmIssueHeaderService.selectWmIssueHeaderListForExport(wmIssueHeader);
|
||||||
ExcelUtil<WmIssueHeader> util = new ExcelUtil<WmIssueHeader>(WmIssueHeader.class);
|
ExcelUtil<WmIssueHeaderExportVo> util = new ExcelUtil<WmIssueHeaderExportVo>(WmIssueHeaderExportVo.class);
|
||||||
util.exportExcel(response, list, "生产领料数据");
|
util.exportExcel(response, list, "生产领料数据");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,11 +1,13 @@
|
|||||||
package com.ktg.mes.wm.domain;
|
package com.ktg.mes.wm.domain;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ktg.common.annotation.Excel;
|
import com.ktg.common.annotation.Excel;
|
||||||
import com.ktg.common.core.domain.BaseEntity;
|
import com.ktg.common.core.domain.BaseEntity;
|
||||||
|
import org.springframework.data.annotation.Transient;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物料入库单对象 wm_item_recpt
|
* 物料入库单对象 wm_item_recpt
|
||||||
@@ -119,6 +121,20 @@ public class WmItemRecpt extends BaseEntity
|
|||||||
/** 预留字段4 */
|
/** 预留字段4 */
|
||||||
private Long attr4;
|
private Long attr4;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private String itemCode;
|
||||||
|
|
||||||
|
/** 产品物料名称 */
|
||||||
|
@Transient
|
||||||
|
private String itemName;
|
||||||
|
|
||||||
|
/** 规格型号 */
|
||||||
|
@Transient
|
||||||
|
private String specification;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private BigDecimal quantityRecived;
|
||||||
|
|
||||||
public void setRecptId(Long recptId)
|
public void setRecptId(Long recptId)
|
||||||
{
|
{
|
||||||
this.recptId = recptId;
|
this.recptId = recptId;
|
||||||
@@ -353,6 +369,38 @@ public class WmItemRecpt extends BaseEntity
|
|||||||
this.cancelRemark = cancelRemark;
|
this.cancelRemark = cancelRemark;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getItemCode() {
|
||||||
|
return itemCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItemCode(String itemCode) {
|
||||||
|
this.itemCode = itemCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getItemName() {
|
||||||
|
return itemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItemName(String itemName) {
|
||||||
|
this.itemName = itemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSpecification() {
|
||||||
|
return specification;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSpecification(String specification) {
|
||||||
|
this.specification = specification;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQuantityRecived() {
|
||||||
|
return quantityRecived;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQuantityRecived(BigDecimal quantityRecived) {
|
||||||
|
this.quantityRecived = quantityRecived;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
@@ -127,6 +127,23 @@ public class WmProductSalse extends BaseEntity
|
|||||||
@Transient
|
@Transient
|
||||||
private BigDecimal sumQuantity;
|
private BigDecimal sumQuantity;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private String itemName;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private String specification;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发货日期
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date sendDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发货车号
|
||||||
|
*/
|
||||||
|
private String sendCarCode;
|
||||||
|
|
||||||
public void setSalseId(Long salseId)
|
public void setSalseId(Long salseId)
|
||||||
{
|
{
|
||||||
this.salseId = salseId;
|
this.salseId = salseId;
|
||||||
@@ -369,6 +386,38 @@ public class WmProductSalse extends BaseEntity
|
|||||||
this.cancelRemark = cancelRemark;
|
this.cancelRemark = cancelRemark;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getItemName() {
|
||||||
|
return itemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItemName(String itemName) {
|
||||||
|
this.itemName = itemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSpecification() {
|
||||||
|
return specification;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSpecification(String specification) {
|
||||||
|
this.specification = specification;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getSendDate() {
|
||||||
|
return sendDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSendDate(Date sendDate) {
|
||||||
|
this.sendDate = sendDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSendCarCode() {
|
||||||
|
return sendCarCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSendCarCode(String sendCarCode) {
|
||||||
|
this.sendCarCode = sendCarCode;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
@@ -4,6 +4,7 @@ import java.util.Date;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ktg.mes.wm.domain.WmIssueHeader;
|
import com.ktg.mes.wm.domain.WmIssueHeader;
|
||||||
import com.ktg.mes.wm.domain.tx.IssueTxBean;
|
import com.ktg.mes.wm.domain.tx.IssueTxBean;
|
||||||
|
import com.ktg.mes.wm.vo.WmIssueHeaderExportVo;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -30,6 +31,9 @@ public interface WmIssueHeaderMapper
|
|||||||
*/
|
*/
|
||||||
public List<WmIssueHeader> selectWmIssueHeaderList(WmIssueHeader wmIssueHeader);
|
public List<WmIssueHeader> selectWmIssueHeaderList(WmIssueHeader wmIssueHeader);
|
||||||
|
|
||||||
|
|
||||||
|
public List<WmIssueHeaderExportVo> selectWmIssueHeaderListForExport(WmIssueHeader wmIssueHeader);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查生产领料单编号是否唯一
|
* 检查生产领料单编号是否唯一
|
||||||
* @param wmIssueHeader
|
* @param wmIssueHeader
|
||||||
|
@@ -3,6 +3,7 @@ package com.ktg.mes.wm.service;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ktg.mes.wm.domain.WmIssueHeader;
|
import com.ktg.mes.wm.domain.WmIssueHeader;
|
||||||
import com.ktg.mes.wm.domain.tx.IssueTxBean;
|
import com.ktg.mes.wm.domain.tx.IssueTxBean;
|
||||||
|
import com.ktg.mes.wm.vo.WmIssueHeaderExportVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生产领料单头Service接口
|
* 生产领料单头Service接口
|
||||||
@@ -28,6 +29,13 @@ public interface IWmIssueHeaderService
|
|||||||
*/
|
*/
|
||||||
public List<WmIssueHeader> selectWmIssueHeaderList(WmIssueHeader wmIssueHeader);
|
public List<WmIssueHeader> selectWmIssueHeaderList(WmIssueHeader wmIssueHeader);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产领料导出
|
||||||
|
* @param wmIssueHeader
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<WmIssueHeaderExportVo> selectWmIssueHeaderListForExport(WmIssueHeader wmIssueHeader);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查生产领料单编号是否唯一
|
* 检查生产领料单编号是否唯一
|
||||||
* @param wmIssueHeader
|
* @param wmIssueHeader
|
||||||
|
@@ -6,6 +6,7 @@ import com.ktg.common.constant.UserConstants;
|
|||||||
import com.ktg.common.utils.DateUtils;
|
import com.ktg.common.utils.DateUtils;
|
||||||
import com.ktg.common.utils.StringUtils;
|
import com.ktg.common.utils.StringUtils;
|
||||||
import com.ktg.mes.wm.domain.tx.IssueTxBean;
|
import com.ktg.mes.wm.domain.tx.IssueTxBean;
|
||||||
|
import com.ktg.mes.wm.vo.WmIssueHeaderExportVo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.ktg.mes.wm.mapper.WmIssueHeaderMapper;
|
import com.ktg.mes.wm.mapper.WmIssueHeaderMapper;
|
||||||
@@ -48,6 +49,12 @@ public class WmIssueHeaderServiceImpl implements IWmIssueHeaderService
|
|||||||
return wmIssueHeaderMapper.selectWmIssueHeaderList(wmIssueHeader);
|
return wmIssueHeaderMapper.selectWmIssueHeaderList(wmIssueHeader);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<WmIssueHeaderExportVo> selectWmIssueHeaderListForExport(WmIssueHeader wmIssueHeader)
|
||||||
|
{
|
||||||
|
return wmIssueHeaderMapper.selectWmIssueHeaderListForExport(wmIssueHeader);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String checkIssueCodeUnique(WmIssueHeader wmIssueHeader) {
|
public String checkIssueCodeUnique(WmIssueHeader wmIssueHeader) {
|
||||||
WmIssueHeader header = wmIssueHeaderMapper.checkIssueCodeUnique(wmIssueHeader);
|
WmIssueHeader header = wmIssueHeaderMapper.checkIssueCodeUnique(wmIssueHeader);
|
||||||
|
@@ -0,0 +1,40 @@
|
|||||||
|
package com.ktg.mes.wm.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ktg.common.annotation.Excel;
|
||||||
|
import com.ktg.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产领料单头对象 wm_issue_header
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-07-14
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WmIssueHeaderExportVo
|
||||||
|
{
|
||||||
|
/** 领料日期 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "领料日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date issueDate;
|
||||||
|
|
||||||
|
/** 产品物料编码 */
|
||||||
|
@Excel(name = "产品物料编码")
|
||||||
|
private String itemCode;
|
||||||
|
|
||||||
|
/** 产品物料名称 */
|
||||||
|
@Excel(name = "产品物料名称")
|
||||||
|
private String itemName;
|
||||||
|
|
||||||
|
/** 规格型号 */
|
||||||
|
@Excel(name = "规格型号")
|
||||||
|
private String specification;
|
||||||
|
|
||||||
|
/** 领料数量 */
|
||||||
|
@Excel(name = "领料数量")
|
||||||
|
private BigDecimal quantityIssued;
|
||||||
|
}
|
@@ -70,7 +70,7 @@ public class WmProductRecptExportVO {
|
|||||||
/**
|
/**
|
||||||
* 重量
|
* 重量
|
||||||
*/
|
*/
|
||||||
@Excel(name = "重量")
|
@Excel(name = "总重量")
|
||||||
private BigDecimal quantityRecived;
|
private BigDecimal quantityRecived;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -79,23 +79,6 @@ public class WmProductRecptExportVO {
|
|||||||
@Excel(name = "单位")
|
@Excel(name = "单位")
|
||||||
private String unitOfMeasure;
|
private String unitOfMeasure;
|
||||||
|
|
||||||
/**
|
@Excel(name = "备注")
|
||||||
* 出库日期
|
private String remark;
|
||||||
*/
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
|
||||||
@Excel(name = "出库日期", width = 30, dateFormat = "yyyy-MM-dd")
|
|
||||||
private Date salseDate;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 客户名称
|
|
||||||
*/
|
|
||||||
@Excel(name = "客户名称")
|
|
||||||
private String clientName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 退货日期
|
|
||||||
*/
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
|
||||||
@Excel(name = "退货日期", width = 30, dateFormat = "yyyy-MM-dd")
|
|
||||||
private Date rtDate;
|
|
||||||
}
|
}
|
||||||
|
@@ -3,6 +3,7 @@ package com.ktg.mes.wm.vo;
|
|||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ktg.common.annotation.Excel;
|
import com.ktg.common.annotation.Excel;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.springframework.data.annotation.Transient;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -17,6 +18,9 @@ import java.util.Date;
|
|||||||
public class WmProductSalseExportVO {
|
public class WmProductSalseExportVO {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Excel(name = "出库单编号")
|
||||||
|
private String salseCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 出库日期
|
* 出库日期
|
||||||
*/
|
*/
|
||||||
@@ -24,36 +28,24 @@ public class WmProductSalseExportVO {
|
|||||||
@Excel(name = "出库日期", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "出库日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
private Date salseDate;
|
private Date salseDate;
|
||||||
|
|
||||||
|
@Excel(name = "产品名称")
|
||||||
|
private String itemName;
|
||||||
|
|
||||||
|
@Excel(name = "规格型号")
|
||||||
|
private String specification;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 客户名称
|
* 客户名称
|
||||||
*/
|
*/
|
||||||
@Excel(name = "客户名称")
|
@Excel(name = "客户名称")
|
||||||
private String clientName;
|
private String clientName;
|
||||||
|
|
||||||
/**
|
|
||||||
* 产品名称
|
|
||||||
*/
|
|
||||||
@Excel(name = "产品名称")
|
|
||||||
private String itemName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 规格型号
|
|
||||||
*/
|
|
||||||
@Excel(name = "规格型号")
|
|
||||||
private String specification;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重量
|
* 重量
|
||||||
*/
|
*/
|
||||||
@Excel(name = "重量")
|
@Excel(name = "合计重量")
|
||||||
private BigDecimal quantitySalse;
|
private BigDecimal quantitySalse;
|
||||||
|
|
||||||
/**
|
|
||||||
* 单位
|
|
||||||
*/
|
|
||||||
@Excel(name = "单位")
|
|
||||||
private String unitOfMeasure;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
|
@@ -86,10 +86,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||||
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
|
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
|
||||||
<if test="feedbackChannel != null and feedbackChannel != ''"> and feedback_channel = #{feedbackChannel}</if>
|
<if test="feedbackChannel != null and feedbackChannel != ''"> and feedback_channel = #{feedbackChannel}</if>
|
||||||
<if test="feedbackTime != null "> and feedback_time = #{feedbackTime}</if>
|
|
||||||
<if test="recordUser != null "> and record_user = #{recordUser}</if>
|
<if test="recordUser != null "> and record_user = #{recordUser}</if>
|
||||||
<if test="recordNick != null "> and record_nick = #{recordNick}</if>
|
<if test="recordNick != null "> and record_nick = #{recordNick}</if>
|
||||||
<if test="status != null "> and status = #{status}</if>
|
<if test="status != null "> and status = #{status}</if>
|
||||||
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
|
AND date_format(feedback_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
|
AND date_format(feedback_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
@@ -45,6 +45,12 @@
|
|||||||
<if test="jobStatus != null and jobStatus != ''">
|
<if test="jobStatus != null and jobStatus != ''">
|
||||||
and t1.job_status = #{jobStatus}
|
and t1.job_status = #{jobStatus}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="startTime != null"><!-- 开始时间检索 -->
|
||||||
|
AND date_format(t3.request_date,'%y%m%d') >= date_format(#{startTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null"><!-- 结束时间检索 -->
|
||||||
|
AND date_format(t3.request_date,'%y%m%d') <= date_format(#{endTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
order by t1.update_time desc
|
order by t1.update_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@@ -35,14 +35,14 @@
|
|||||||
select
|
select
|
||||||
round(sum(t1.power + t1.machine_shop_power), 4) as power
|
round(sum(t1.power + t1.machine_shop_power), 4) as power
|
||||||
from pro_month_report t1
|
from pro_month_report t1
|
||||||
where t1.report_month >= #{beginDate}
|
where t1.report_month >= #{beginMonth}
|
||||||
and t1.report_month <= #{endDate}
|
and t1.report_month <= #{endMonth}
|
||||||
</select>
|
</select>
|
||||||
<select id="powerYearProduceSummaryStatistics" resultType="com.ktg.mes.pro.domain.ProMonthReport">
|
<select id="powerYearProduceSummaryStatistics" resultType="com.ktg.mes.pro.domain.ProMonthReport">
|
||||||
select
|
select
|
||||||
round(sum(t1.power_produce), 4) as powerProduce
|
round(sum(t1.power_produce), 4) as powerProduce
|
||||||
from pro_month_report t1
|
from pro_month_report t1
|
||||||
where t1.report_month >= #{beginDate}
|
where t1.report_month >= #{beginMonth}
|
||||||
and t1.report_month <= #{endDate}
|
and t1.report_month <= #{endMonth}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@@ -85,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="ancestors != null and ancestors != ''"> and ancestors = #{ancestors}</if>
|
<if test="ancestors != null and ancestors != ''"> and ancestors = #{ancestors}</if>
|
||||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
<if test="machineryId != null"> and machinery_id = #{machineryId}</if>
|
<if test="machineryId != null"> and machinery_id = #{machineryId}</if>
|
||||||
<if test="machineryName != null and machineryName != ''"> and machinery_name = #{machineryName}</if>
|
<if test="machineryName != null and machineryName != ''"> and machinery_name like concat('%',#{machineryName},'%')</if>
|
||||||
<if test="machineryCode != null and machineryCode != ''"> and machinery_code = #{machineryCode}</if>
|
<if test="machineryCode != null and machineryCode != ''"> and machinery_code = #{machineryCode}</if>
|
||||||
<if test="machineryNo != null and machineryNo != ''"> and machinery_no = #{machineryNo}</if>
|
<if test="machineryNo != null and machineryNo != ''"> and machinery_no = #{machineryNo}</if>
|
||||||
<if test="teamId != null"> and team_id = #{teamId}</if>
|
<if test="teamId != null"> and team_id = #{teamId}</if>
|
||||||
@@ -118,9 +118,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
workorder_code as workorderCode,
|
workorder_code as workorderCode,
|
||||||
product_name as productName,
|
product_name as productName,
|
||||||
client_name as clientName,
|
client_name as clientName,
|
||||||
|
product_code as productSpc,
|
||||||
|
machinery_no as machineryNo,
|
||||||
remark
|
remark
|
||||||
from pro_workorder
|
from pro_workorder
|
||||||
where machinery_id = #{machineryId} and status = 'CONFIRMED'
|
where machinery_id = #{machineryId} and status = 'CONFIRMED'
|
||||||
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
<select id="selectProWorkorderExportVOList" resultType="com.ktg.mes.pro.vo.ProWorkorderExportVO">
|
<select id="selectProWorkorderExportVOList" resultType="com.ktg.mes.pro.vo.ProWorkorderExportVO">
|
||||||
select
|
select
|
||||||
@@ -180,7 +183,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
t1.workorder_id as workorderId,
|
t1.workorder_id as workorderId,
|
||||||
t1.workorder_code as workorderCode,
|
t1.workorder_code as workorderCode,
|
||||||
t1.workorder_name as workorderName,
|
t1.workorder_name as workorderName,
|
||||||
t1.finish_date as produceDate,
|
t6.issue_date as produceDate,
|
||||||
t1.team_name as teamName,
|
t1.team_name as teamName,
|
||||||
t1.product_name as productName,
|
t1.product_name as productName,
|
||||||
t1.product_code as productCode,
|
t1.product_code as productCode,
|
||||||
@@ -192,6 +195,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
ifnull(t5.productQuantity,0) as productQuantity
|
ifnull(t5.productQuantity,0) as productQuantity
|
||||||
from pro_workorder t1
|
from pro_workorder t1
|
||||||
left join pro_machinery_job t2 on t1.workorder_id = t2.workorder_id
|
left join pro_machinery_job t2 on t1.workorder_id = t2.workorder_id
|
||||||
|
left join wm_issue_header t6 on t1.workorder_id = t6.workorder_id and t6.`status` = 'FINISHED'
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT
|
SELECT
|
||||||
wih.workorder_id,
|
wih.workorder_id,
|
||||||
@@ -246,7 +250,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
AND date_format(t1.finish_date,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
AND date_format(t1.finish_date,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by t1.finish_date desc
|
order by t1.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertProWorkorder" parameterType="ProWorkorder" useGeneratedKeys="true" keyProperty="workorderId">
|
<insert id="insertProWorkorder" parameterType="ProWorkorder" useGeneratedKeys="true" keyProperty="workorderId">
|
||||||
|
@@ -112,12 +112,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="areaId != null "> and area_id = #{areaId}</if>
|
<if test="areaId != null "> and area_id = #{areaId}</if>
|
||||||
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
|
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
|
||||||
<if test="areaName != null and areaName != ''"> and area_name like concat('%', #{areaName}, '%')</if>
|
<if test="areaName != null and areaName != ''"> and area_name like concat('%', #{areaName}, '%')</if>
|
||||||
<if test="issueDate != null "> and issue_date = #{issueDate}</if>
|
|
||||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
|
AND date_format(issue_date,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
|
AND date_format(issue_date,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectWmIssueHeaderListForExport" parameterType="WmIssueHeader" resultType="com.ktg.mes.wm.vo.WmIssueHeaderExportVo">
|
||||||
|
select wih.issue_date,wil.item_code, wil.item_name, wil.specification,wil.quantity_issued
|
||||||
|
from wm_issue_header wih left join wm_issue_line wil on wih.issue_id = wil.issue_id
|
||||||
|
<where>
|
||||||
|
<if test="issueCode != null and issueCode != ''"> and wih.issue_code = #{issueCode}</if>
|
||||||
|
<if test="issueName != null and issueName != ''"> and wih.issue_name like concat('%', #{issueName}, '%')</if>
|
||||||
|
<if test="warehouseName != null and warehouseName != ''"> and wih.warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||||
|
<if test="status != null and status != ''"> and wih.status = #{status}</if>
|
||||||
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
|
AND date_format(wih.issue_date,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
|
AND date_format(wih.issue_date,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by wih.create_time desc
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectWmIssueHeaderByIssueId" parameterType="Long" resultMap="WmIssueHeaderResult">
|
<select id="selectWmIssueHeaderByIssueId" parameterType="Long" resultMap="WmIssueHeaderResult">
|
||||||
<include refid="selectWmIssueHeaderVo"/>
|
<include refid="selectWmIssueHeaderVo"/>
|
||||||
where issue_id = #{issueId}
|
where issue_id = #{issueId}
|
||||||
|
@@ -35,7 +35,9 @@
|
|||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="itemName" column="item_name" />
|
||||||
|
<result property="specification" column="specification" />
|
||||||
|
<result property="quantityRecived" column="quantity_recived" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap type="ItemRecptTxBean" id="ItemRecptTxBeanResult">
|
<resultMap type="ItemRecptTxBean" id="ItemRecptTxBeanResult">
|
||||||
@@ -77,33 +79,45 @@
|
|||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectWmItemRecptList" parameterType="WmItemRecpt" resultMap="WmItemRecptResult">
|
<select id="selectWmItemRecptList" parameterType="WmItemRecpt" resultMap="WmItemRecptResult">
|
||||||
<include refid="selectWmItemRecptVo"/>
|
select wit.recpt_id, wit.recpt_code,
|
||||||
|
wit.recpt_name, wit.iqc_id, wit.iqc_code, wit.po_code,
|
||||||
|
wit.vendor_id, wit.vendor_code, wit.vendor_name,
|
||||||
|
wit.vendor_nick, wit.warehouse_id, wit.warehouse_code,
|
||||||
|
wit.warehouse_name, wit.location_id, wit.location_code,
|
||||||
|
wit.location_name, wit.area_id, wit.area_code, wit.area_name,
|
||||||
|
wit.recpt_date, wit.status, wit.remark, wit.cancel_remark,wit.attr1,
|
||||||
|
wit.attr2, wit.attr3, wit.attr4, wit.create_by, wit.create_time,
|
||||||
|
wit.update_by, wit.update_time,witl_r.item_name,witl_r.specification,ifnull(witl_r2.quantity_recived,0) as quantity_recived
|
||||||
|
from wm_item_recpt wit
|
||||||
|
left join (SELECT *, ROW_NUMBER() OVER (PARTITION BY recpt_id ORDER BY line_id) AS rn FROM wm_item_recpt_line) as witl_r on witl_r.recpt_id=wit.recpt_id and witl_r.rn = 1
|
||||||
|
left join (select sum(quantity_recived) as quantity_recived,recpt_id from wm_item_recpt_line group by recpt_id) as witl_r2 on witl_r2.recpt_id = wit.recpt_id
|
||||||
<where>
|
<where>
|
||||||
<if test="recptCode != null and recptCode != ''"> and recpt_code = #{recptCode}</if>
|
<if test="recptCode != null and recptCode != ''"> and wit.recpt_code = #{recptCode}</if>
|
||||||
<if test="recptName != null and recptName != ''"> and recpt_name like concat('%', #{recptName}, '%')</if>
|
<if test="recptName != null and recptName != ''"> and wit.recpt_name like concat('%', #{recptName}, '%')</if>
|
||||||
<if test="iqcId != null "> and iqc_id = #{iqcId}</if>
|
<if test="iqcId != null "> and wit.iqc_id = #{iqcId}</if>
|
||||||
<if test="iqcCode != null and iqcCode != ''"> and iqc_code = #{iqcCode}</if>
|
<if test="iqcCode != null and iqcCode != ''"> and wit.iqc_code = #{iqcCode}</if>
|
||||||
<if test="poCode != null and poCode != ''"> and po_code = #{poCode}</if>
|
<if test="poCode != null and poCode != ''"> and wit.po_code = #{poCode}</if>
|
||||||
<if test="vendorId != null "> and vendor_id = #{vendorId}</if>
|
<if test="vendorId != null "> and wit.vendor_id = #{vendorId}</if>
|
||||||
<if test="vendorCode != null and vendorCode != ''"> and vendor_code = #{vendorCode}</if>
|
<if test="vendorCode != null and vendorCode != ''"> and wit.vendor_code = #{vendorCode}</if>
|
||||||
<if test="vendorName != null and vendorName != ''"> and vendor_name like concat('%', #{vendorName}, '%')</if>
|
<if test="vendorName != null and vendorName != ''"> and wit.vendor_name like concat('%', #{vendorName}, '%')</if>
|
||||||
<if test="vendorNick != null and vendorNick != ''"> and vendor_nick = #{vendorNick}</if>
|
<if test="vendorNick != null and vendorNick != ''"> and wit.vendor_nick = #{vendorNick}</if>
|
||||||
<if test="warehouseId != null "> and warehouse_id = #{warehouseId}</if>
|
<if test="warehouseId != null "> and wit.warehouse_id = #{warehouseId}</if>
|
||||||
<if test="warehouseCode != null and warehouseCode != ''"> and warehouse_code = #{warehouseCode}</if>
|
<if test="warehouseCode != null and warehouseCode != ''"> and wit.warehouse_code = #{warehouseCode}</if>
|
||||||
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
<if test="warehouseName != null and warehouseName != ''"> and wit.warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||||
<if test="locationId != null "> and location_id = #{locationId}</if>
|
<if test="locationId != null "> and wit.location_id = #{locationId}</if>
|
||||||
<if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if>
|
<if test="locationCode != null and locationCode != ''"> and wit.location_code = #{locationCode}</if>
|
||||||
<if test="locationName != null and locationName != ''"> and location_name like concat('%', #{locationName}, '%')</if>
|
<if test="locationName != null and locationName != ''"> and wit.location_name like concat('%', #{locationName}, '%')</if>
|
||||||
<if test="areaId != null "> and area_id = #{areaId}</if>
|
<if test="areaId != null "> and wit.area_id = #{areaId}</if>
|
||||||
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
|
<if test="areaCode != null and areaCode != ''"> and wit.area_code = #{areaCode}</if>
|
||||||
<if test="areaName != null and areaName != ''"> and area_name like concat('%', #{areaName}, '%')</if>
|
<if test="areaName != null and areaName != ''"> and wit.area_name like concat('%', #{areaName}, '%')</if>
|
||||||
<if test="recptDate != null "> and recpt_date = #{recptDate}</if>
|
<if test="recptDate != null "> and wit.recpt_date = #{recptDate}</if>
|
||||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="status != null and status != ''"> and wit.status = #{status}</if>
|
||||||
|
<if test="itemCode != null and itemCode != ''"> and wit.recpt_id in (select recpt_id from wm_item_recpt_line where item_code = #{itemCode})</if>
|
||||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
AND date_format(recpt_date,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
AND date_format(wit.recpt_date,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||||
</if>
|
</if>
|
||||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
AND date_format(recpt_date,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
AND date_format(wit.recpt_date,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by create_time desc
|
||||||
|
@@ -88,6 +88,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="workorderId !=null">and workorder_id = #{workorderId}</if>
|
<if test="workorderId !=null">and workorder_id = #{workorderId}</if>
|
||||||
<if test="workorderCode !=null and workorderCode !=''">and workorder_code = #{workorderCode}</if>
|
<if test="workorderCode !=null and workorderCode !=''">and workorder_code = #{workorderCode}</if>
|
||||||
<if test="expireDate != null "> and expire_date = #{expireDate}</if>
|
<if test="expireDate != null "> and expire_date = #{expireDate}</if>
|
||||||
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
|
AND date_format(expire_date,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
|
AND date_format(expire_date,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
||||||
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
||||||
<if test="attr3 != null "> and attr3 = #{attr3}</if>
|
<if test="attr3 != null "> and attr3 = #{attr3}</if>
|
||||||
@@ -124,7 +130,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="recptDate !=null"> and recpt_date = #{recptDate}</if>
|
<if test="recptDate !=null"> and recpt_date = #{recptDate}</if>
|
||||||
<if test="workorderId !=null">and workorder_id = #{workorderId}</if>
|
<if test="workorderId !=null">and workorder_id = #{workorderId}</if>
|
||||||
<if test="workorderCode !=null and workorderCode !=''">and workorder_code like concat('%',#{workorderCode},'%') </if>
|
<if test="workorderCode !=null and workorderCode !=''">and workorder_code like concat('%',#{workorderCode},'%') </if>
|
||||||
<if test="expireDate != null "> and expire_date = #{expireDate}</if>
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
|
AND date_format(expire_date,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
|
AND date_format(expire_date,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
||||||
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
||||||
<if test="attr3 != null "> and attr3 = #{attr3}</if>
|
<if test="attr3 != null "> and attr3 = #{attr3}</if>
|
||||||
|
@@ -168,18 +168,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
wpr.team_name as teamName,
|
wpr.team_name as teamName,
|
||||||
wpr.machinery_name as machineryName,
|
wpr.machinery_name as machineryName,
|
||||||
wpr.machinery_no as machineryNo,
|
wpr.machinery_no as machineryNo,
|
||||||
wprl.item_name as itemName,
|
wprl_r.item_name as itemName,
|
||||||
wprl.specification,
|
wprl_r.specification,
|
||||||
wprl.quantity_recived as quantityRecived,
|
wprl.quantity_recived as quantityRecived,
|
||||||
wprl.unit_of_measure as unitOfMeasure,
|
wprl_r.unit_of_measure as unitOfMeasure,
|
||||||
wps.salse_date as salseDate,
|
wpr.remark as remark
|
||||||
wps.client_name as clientName,
|
|
||||||
wrs.rt_date as rtDate
|
|
||||||
from wm_product_recpt wpr
|
from wm_product_recpt wpr
|
||||||
LEFT JOIN wm_product_recpt_line wprl on wpr.recpt_id = wprl.recpt_id
|
left join (SELECT *, ROW_NUMBER() OVER (PARTITION BY recpt_id ORDER BY line_id) AS rn FROM wm_product_recpt_line)
|
||||||
LEFT JOIN wm_product_salse_line wpsl ON wpsl.batch_code = wprl.batch_code
|
as wprl_r on wprl_r.recpt_id = wpr.recpt_id and wprl_r.rn = 1
|
||||||
LEFT JOIN wm_product_salse wps ON wpsl.salse_id = wps.salse_id
|
LEFT JOIN (select sum(quantity_recived) as quantity_recived,recpt_id from wm_product_recpt_line group by recpt_id) wprl on wprl.recpt_id = wpr.recpt_id
|
||||||
LEFT JOIN wm_rt_salse wrs ON wrs.so_code = wps.so_code
|
|
||||||
<where>
|
<where>
|
||||||
<if test="recptCode != null and recptCode != ''"> and wpr.recpt_code = #{recptCode}</if>
|
<if test="recptCode != null and recptCode != ''"> and wpr.recpt_code = #{recptCode}</if>
|
||||||
<if test="recptName != null and recptName != ''"> and wpr.recpt_name like concat('%', #{recptName}, '%')</if>
|
<if test="recptName != null and recptName != ''"> and wpr.recpt_name like concat('%', #{recptName}, '%')</if>
|
||||||
|
@@ -37,6 +37,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="sumQuantity" column="sum_quantity" />
|
<result property="sumQuantity" column="sum_quantity" />
|
||||||
|
<result property="itemName" column="item_name"></result>
|
||||||
|
<result property="specification" column="specification"></result>
|
||||||
|
<result property="sendDate" column="send_date"></result>
|
||||||
|
<result property="sendCarCode" column="send_car_code"></result>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
@@ -78,7 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
select salse_id, salse_code, salse_name, oqc_id, oqc_code, so_code, client_id, client_code, client_name,
|
select salse_id, salse_code, salse_name, oqc_id, oqc_code, so_code, client_id, client_code, client_name,
|
||||||
client_nick, warehouse_id, warehouse_code, warehouse_name, location_id,
|
client_nick, warehouse_id, warehouse_code, warehouse_name, location_id,
|
||||||
location_code, location_name, area_id, area_code, area_name, salse_date,
|
location_code, location_name, area_id, area_code, area_name, salse_date,
|
||||||
status, remark,cancel_remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_product_salse
|
status, remark,cancel_remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time,send_date,send_car_code from wm_product_salse
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectWmProductSalseList" parameterType="WmProductSalse" resultMap="WmProductSalseResult">
|
<select id="selectWmProductSalseList" parameterType="WmProductSalse" resultMap="WmProductSalseResult">
|
||||||
@@ -86,8 +90,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
client_id, client_code, client_name, client_nick, warehouse_id,
|
client_id, client_code, client_name, client_nick, warehouse_id,
|
||||||
warehouse_code, warehouse_name, location_id, location_code,
|
warehouse_code, warehouse_name, location_id, location_code,
|
||||||
location_name, area_id, area_code, area_name, salse_date,
|
location_name, area_id, area_code, area_name, salse_date,
|
||||||
status, remark, cancel_remark,attr1, attr2, attr3, attr4, create_by,
|
status, remark, cancel_remark,attr1, attr2, attr3, attr4, create_by,send_date,send_car_code,
|
||||||
create_time, update_by, update_time,q.sum_quantity from wm_product_salse wps
|
create_time, update_by, update_time,q.sum_quantity,wpsl.item_name, wpsl.specification from wm_product_salse wps
|
||||||
|
left join (SELECT item_name,specification,salse_id, ROW_NUMBER() OVER (PARTITION BY salse_id ORDER BY line_id) AS rn FROM wm_product_salse_line) as wpsl on wpsl.salse_id=wps.salse_id and wpsl.rn = 1
|
||||||
left join (select salse_id,sum(quantity_salse) as sum_quantity from wm_product_salse_line group by salse_id) q on q.salse_id = wps.salse_id
|
left join (select salse_id,sum(quantity_salse) as sum_quantity from wm_product_salse_line group by salse_id) q on q.salse_id = wps.salse_id
|
||||||
<where>
|
<where>
|
||||||
<if test="salseCode != null and salseCode != ''"> and salse_code = #{salseCode}</if>
|
<if test="salseCode != null and salseCode != ''"> and salse_code = #{salseCode}</if>
|
||||||
@@ -110,7 +115,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="areaName != null and areaName != ''"> and area_name like concat('%', #{areaName}, '%')</if>
|
<if test="areaName != null and areaName != ''"> and area_name like concat('%', #{areaName}, '%')</if>
|
||||||
<if test="salseDate != null "> and salse_date = #{salseDate}</if>
|
<if test="salseDate != null "> and salse_date = #{salseDate}</if>
|
||||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
<if test="status != null and status != ''"> and status = #{}</if>
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
|
AND date_format(salse_date,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
|
AND date_format(salse_date,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
@@ -144,15 +154,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</select>
|
</select>
|
||||||
<select id="selectWmProductSalseExportVOList" resultType="com.ktg.mes.wm.vo.WmProductSalseExportVO">
|
<select id="selectWmProductSalseExportVOList" resultType="com.ktg.mes.wm.vo.WmProductSalseExportVO">
|
||||||
SELECT
|
SELECT
|
||||||
|
wps.salse_code as salseCode,
|
||||||
wps.salse_date as salseDate,
|
wps.salse_date as salseDate,
|
||||||
wps.client_name as clientName,
|
wps.client_name as clientName,
|
||||||
wpsl.item_name as itemName,
|
wps.remark as remark,
|
||||||
wpsl.specification,
|
|
||||||
wpsl.quantity_salse as quantitySalse,
|
wpsl.quantity_salse as quantitySalse,
|
||||||
wpsl.unit_of_measure as unitOfMeasure,
|
wpsl_r.item_name as itemName,
|
||||||
wpsl.remark
|
wpsl_r.specification as specification
|
||||||
from wm_product_salse wps
|
from wm_product_salse wps
|
||||||
left join wm_product_salse_line wpsl on wps.salse_id = wpsl.salse_id
|
left join (SELECT item_name,specification,salse_id, ROW_NUMBER() OVER (PARTITION BY salse_id ORDER BY line_id) AS rn FROM wm_product_salse_line) as wpsl_r on wpsl_r.salse_id=wps.salse_id and wpsl_r.rn = 1
|
||||||
|
left join (select sum(quantity_salse) as quantity_salse, salse_id from wm_product_salse_line group by salse_id) as wpsl on wps.salse_id = wpsl.salse_id
|
||||||
<where>
|
<where>
|
||||||
<if test="salseCode != null and salseCode != ''"> and wps.salse_code = #{salseCode}</if>
|
<if test="salseCode != null and salseCode != ''"> and wps.salse_code = #{salseCode}</if>
|
||||||
<if test="salseName != null and salseName != ''"> and wps.salse_name like concat('%', #{salseName}, '%')</if>
|
<if test="salseName != null and salseName != ''"> and wps.salse_name like concat('%', #{salseName}, '%')</if>
|
||||||
@@ -200,6 +211,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="areaCode != null">area_code,</if>
|
<if test="areaCode != null">area_code,</if>
|
||||||
<if test="areaName != null">area_name,</if>
|
<if test="areaName != null">area_name,</if>
|
||||||
<if test="salseDate != null">salse_date,</if>
|
<if test="salseDate != null">salse_date,</if>
|
||||||
|
<if test="sendDate != null">send_date,</if>
|
||||||
|
<if test="sendCarCode != null">send_car_code,</if>
|
||||||
<if test="status != null">status,</if>
|
<if test="status != null">status,</if>
|
||||||
<if test="remark != null">remark,</if>
|
<if test="remark != null">remark,</if>
|
||||||
<if test="attr1 != null">attr1,</if>
|
<if test="attr1 != null">attr1,</if>
|
||||||
@@ -231,6 +244,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="areaCode != null">#{areaCode},</if>
|
<if test="areaCode != null">#{areaCode},</if>
|
||||||
<if test="areaName != null">#{areaName},</if>
|
<if test="areaName != null">#{areaName},</if>
|
||||||
<if test="salseDate != null">#{salseDate},</if>
|
<if test="salseDate != null">#{salseDate},</if>
|
||||||
|
<if test="sendDate != null">#{sendDate},</if>
|
||||||
|
<if test="sendCarCode != null">#{sendCarCode},</if>
|
||||||
<if test="status != null">#{status},</if>
|
<if test="status != null">#{status},</if>
|
||||||
<if test="remark != null">#{remark},</if>
|
<if test="remark != null">#{remark},</if>
|
||||||
<if test="attr1 != null">#{attr1},</if>
|
<if test="attr1 != null">#{attr1},</if>
|
||||||
@@ -266,6 +281,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="areaCode != null">area_code = #{areaCode},</if>
|
<if test="areaCode != null">area_code = #{areaCode},</if>
|
||||||
<if test="areaName != null">area_name = #{areaName},</if>
|
<if test="areaName != null">area_name = #{areaName},</if>
|
||||||
<if test="salseDate != null">salse_date = #{salseDate},</if>
|
<if test="salseDate != null">salse_date = #{salseDate},</if>
|
||||||
|
<if test="sendDate != null">send_date = #{sendDate},</if>
|
||||||
|
<if test="sendCarCode != null">send_car_code = #{sendCarCode},</if>
|
||||||
<if test="status != null">status = #{status},</if>
|
<if test="status != null">status = #{status},</if>
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
<if test="cancelRemark != null">cancel_remark = #{cancelRemark},</if>
|
<if test="cancelRemark != null">cancel_remark = #{cancelRemark},</if>
|
||||||
|
@@ -85,8 +85,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="areaId != null "> and area_id = #{areaId}</if>
|
<if test="areaId != null "> and area_id = #{areaId}</if>
|
||||||
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
|
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
|
||||||
<if test="areaName != null and areaName != ''"> and area_name like concat('%', #{areaName}, '%')</if>
|
<if test="areaName != null and areaName != ''"> and area_name like concat('%', #{areaName}, '%')</if>
|
||||||
<if test="rtDate != null "> and rt_date = #{rtDate}</if>
|
|
||||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
|
AND date_format(rt_date,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
|
AND date_format(rt_date,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
@@ -107,13 +107,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="areaId != null "> and area_id = #{areaId}</if>
|
<if test="areaId != null "> and area_id = #{areaId}</if>
|
||||||
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
|
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
|
||||||
<if test="areaName != null and areaName != ''"> and area_name like concat('%', #{areaName}, '%')</if>
|
<if test="areaName != null and areaName != ''"> and area_name like concat('%', #{areaName}, '%')</if>
|
||||||
<if test="rtDate != null "> and rt_date = #{rtDate}</if>
|
|
||||||
<if test="rtReason != null and rtReason != ''"> and rt_reason = #{rtReason}</if>
|
<if test="rtReason != null and rtReason != ''"> and rt_reason = #{rtReason}</if>
|
||||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
||||||
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
||||||
<if test="attr3 != null "> and attr3 = #{attr3}</if>
|
<if test="attr3 != null "> and attr3 = #{attr3}</if>
|
||||||
<if test="attr4 != null "> and attr4 = #{attr4}</if>
|
<if test="attr4 != null "> and attr4 = #{attr4}</if>
|
||||||
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
|
AND date_format(rtDate,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
|
AND date_format(rtDate,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
@@ -75,8 +75,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="vendorName != null and vendorName != ''"> and vendor_name like concat('%', #{vendorName}, '%')</if>
|
<if test="vendorName != null and vendorName != ''"> and vendor_name like concat('%', #{vendorName}, '%')</if>
|
||||||
<if test="vendorNick != null and vendorNick != ''"> and vendor_nick = #{vendorNick}</if>
|
<if test="vendorNick != null and vendorNick != ''"> and vendor_nick = #{vendorNick}</if>
|
||||||
<if test="batchCode != null and batchCode != ''"> and batch_code = #{batchCode}</if>
|
<if test="batchCode != null and batchCode != ''"> and batch_code = #{batchCode}</if>
|
||||||
<if test="rtDate != null "> and rt_date = #{rtDate}</if>
|
|
||||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
|
AND date_format(rt_date,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
|
AND date_format(rt_date,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
@@ -86,7 +86,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="transactionQuantity != null "> and transaction_quantity = #{transactionQuantity}</if>
|
<if test="transactionQuantity != null "> and transaction_quantity = #{transactionQuantity}</if>
|
||||||
<if test="transactionDate != null "> and transaction_date = #{transactionDate}</if>
|
<if test="transactionDate != null "> and transaction_date = #{transactionDate}</if>
|
||||||
<if test="relatedTransactionId != null "> and related_transaction_id = #{relatedTransactionId}</if>
|
<if test="relatedTransactionId != null "> and related_transaction_id = #{relatedTransactionId}</if>
|
||||||
<if test="recptDate != null"> and recpt_date = #{recptDate}</if>
|
|
||||||
<if test="workorderId !=null">and workorder_id = #{workorderId}</if>
|
<if test="workorderId !=null">and workorder_id = #{workorderId}</if>
|
||||||
<if test="workorderCode !=null">and workorder_code = #{workorderCode}</if>
|
<if test="workorderCode !=null">and workorder_code = #{workorderCode}</if>
|
||||||
<if test="erpDate != null "> and erp_date = #{erpDate}</if>
|
<if test="erpDate != null "> and erp_date = #{erpDate}</if>
|
||||||
@@ -94,7 +93,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
||||||
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
||||||
<if test="attr3 != null "> and attr3 = #{attr3}</if>
|
<if test="attr3 != null "> and attr3 = #{attr3}</if>
|
||||||
<if test="attr4 != null "> and attr4 = #{attr4}</if>
|
<if test="attr4 != null "> and attr4 = #{attr4}</if><if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
|
AND date_format(recptDate,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
|
AND date_format(recptDate,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@@ -6,6 +6,7 @@ import com.ktg.common.core.domain.entity.SysUser;
|
|||||||
import com.ktg.common.utils.SecurityUtils;
|
import com.ktg.common.utils.SecurityUtils;
|
||||||
import com.ktg.mes.dv.service.IDvMachineryService;
|
import com.ktg.mes.dv.service.IDvMachineryService;
|
||||||
import com.ktg.mes.dv.vo.res.DvMachineryResponse;
|
import com.ktg.mes.dv.vo.res.DvMachineryResponse;
|
||||||
|
import com.ktg.mes.pro.domain.ProMachineryJob;
|
||||||
import com.ktg.mes.pro.service.IProMachineryJobService;
|
import com.ktg.mes.pro.service.IProMachineryJobService;
|
||||||
import com.ktg.mes.pro.service.IProWorkorderService;
|
import com.ktg.mes.pro.service.IProWorkorderService;
|
||||||
import com.ktg.mes.pro.vo.req.*;
|
import com.ktg.mes.pro.vo.req.*;
|
||||||
@@ -102,6 +103,25 @@ public class ApiProController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 撤销
|
||||||
|
* @param jobId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/cancel/{jobId}")
|
||||||
|
public AjaxResult cancelWorkorder(@PathVariable Long jobId) {
|
||||||
|
try {
|
||||||
|
SysUser currentUser = SecurityUtils.getLoginUser().getUser();
|
||||||
|
int result = proMachineryJobService.cancel(jobId, currentUser);
|
||||||
|
if (result > 0) {
|
||||||
|
return AjaxResult.success("撤销成功");
|
||||||
|
}
|
||||||
|
return AjaxResult.success("撤销失败");
|
||||||
|
} catch (Exception e) {
|
||||||
|
return AjaxResult.error(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 步骤1-加料
|
* 步骤1-加料
|
||||||
*/
|
*/
|
||||||
@@ -349,5 +369,4 @@ public class ApiProController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user