change - add采购申请流程v1、提资单BOM导入、发送邮件方法
parent
851832812b
commit
b8344eadde
@ -0,0 +1,98 @@
|
||||
package com.hw.mes.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.hw.common.log.annotation.Log;
|
||||
import com.hw.common.log.enums.BusinessType;
|
||||
import com.hw.common.security.annotation.RequiresPermissions;
|
||||
import com.hw.mes.domain.MesRaiseCapitalBom;
|
||||
import com.hw.mes.service.IMesRaiseCapitalBomService;
|
||||
import com.hw.common.core.web.controller.BaseController;
|
||||
import com.hw.common.core.web.domain.AjaxResult;
|
||||
import com.hw.common.core.utils.poi.ExcelUtil;
|
||||
|
||||
/**
|
||||
* 提资单BOM信息Controller
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-09-18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mesRaiseCapitalBom")
|
||||
public class MesRaiseCapitalBomController extends BaseController {
|
||||
@Autowired
|
||||
private IMesRaiseCapitalBomService mesRaiseCapitalBomService;
|
||||
|
||||
/**
|
||||
* 查询提资单BOM信息列表
|
||||
*/
|
||||
@RequiresPermissions("mes:mesRaiseCapitalBom:list")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(MesRaiseCapitalBom mesRaiseCapitalBom)
|
||||
{
|
||||
List<MesRaiseCapitalBom> list = mesRaiseCapitalBomService.selectMesRaiseCapitalBomList(mesRaiseCapitalBom);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出提资单BOM信息列表
|
||||
*/
|
||||
@RequiresPermissions("mes:mesRaiseCapitalBom:export")
|
||||
@Log(title = "提资单BOM信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MesRaiseCapitalBom mesRaiseCapitalBom) {
|
||||
List<MesRaiseCapitalBom> list = mesRaiseCapitalBomService.selectMesRaiseCapitalBomList(mesRaiseCapitalBom);
|
||||
ExcelUtil<MesRaiseCapitalBom> util = new ExcelUtil<MesRaiseCapitalBom>(MesRaiseCapitalBom.class);
|
||||
util.exportExcel(response, list, "提资单BOM信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取提资单BOM信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("mes:mesRaiseCapitalBom:query")
|
||||
@GetMapping(value = "/{raiseCapitalId}")
|
||||
public AjaxResult getInfo(@PathVariable("raiseCapitalId") Long raiseCapitalId) {
|
||||
return success(mesRaiseCapitalBomService.selectMesRaiseCapitalBomByRaiseCapitalId(raiseCapitalId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增提资单BOM信息
|
||||
*/
|
||||
@RequiresPermissions("mes:mesRaiseCapitalBom:add")
|
||||
@Log(title = "提资单BOM信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MesRaiseCapitalBom mesRaiseCapitalBom) {
|
||||
return toAjax(mesRaiseCapitalBomService.insertMesRaiseCapitalBom(mesRaiseCapitalBom));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改提资单BOM信息
|
||||
*/
|
||||
@RequiresPermissions("mes:mesRaiseCapitalBom:edit")
|
||||
@Log(title = "提资单BOM信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MesRaiseCapitalBom mesRaiseCapitalBom) {
|
||||
return toAjax(mesRaiseCapitalBomService.updateMesRaiseCapitalBom(mesRaiseCapitalBom));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除提资单BOM信息
|
||||
*/
|
||||
@RequiresPermissions("mes:mesRaiseCapitalBom:remove")
|
||||
@Log(title = "提资单BOM信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{raiseCapitalIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] raiseCapitalIds) {
|
||||
return toAjax(mesRaiseCapitalBomService.deleteMesRaiseCapitalBomByRaiseCapitalIds(raiseCapitalIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,155 @@
|
||||
package com.hw.mes.domain;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.hw.common.core.annotation.Excel;
|
||||
import com.hw.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 采购申请流程对象 mes_purchase_apply_process
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-09-19
|
||||
*/
|
||||
public class MesPurchaseApplyProcess extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键标识
|
||||
*/
|
||||
private Long purchaseApplyId;
|
||||
|
||||
/**
|
||||
* 任务编号
|
||||
*/
|
||||
@Excel(name = "任务编号")
|
||||
private String taskCode;
|
||||
|
||||
/**
|
||||
* 提资单成品名称
|
||||
*/
|
||||
@Excel(name = "提资单成品名称")
|
||||
private String materialName;
|
||||
|
||||
/**
|
||||
* 处理流程节点ID
|
||||
*/
|
||||
private Long wfProcessId;
|
||||
|
||||
/**
|
||||
* 当前流程节点ID
|
||||
*/
|
||||
private Long processActivityId;
|
||||
|
||||
/**
|
||||
* 当前流程节点描述
|
||||
*/
|
||||
private String processActivityName;
|
||||
|
||||
/**
|
||||
* 导入BOM标识(0否 1是)
|
||||
*/
|
||||
@Excel(name = "导入BOM标识(0否 1是)")
|
||||
private String importFlag;
|
||||
|
||||
/**
|
||||
* 采购申请流程明细信息
|
||||
*/
|
||||
private List<MesPurchaseApplyProcessDetail> mesPurchaseApplyProcessDetailList;
|
||||
|
||||
|
||||
/**
|
||||
* 异常标识(0否 1是)
|
||||
*/
|
||||
@Excel(name = "异常标识(0否 1是)")
|
||||
private String currentAnomalyFlag;
|
||||
|
||||
public String getCurrentAnomalyFlag() {
|
||||
return currentAnomalyFlag;
|
||||
}
|
||||
|
||||
public void setCurrentAnomalyFlag(String currentAnomalyFlag) {
|
||||
this.currentAnomalyFlag = currentAnomalyFlag;
|
||||
}
|
||||
|
||||
public String getProcessActivityName() {
|
||||
return processActivityName;
|
||||
}
|
||||
|
||||
public void setProcessActivityName(String processActivityName) {
|
||||
this.processActivityName = processActivityName;
|
||||
}
|
||||
|
||||
public Long getProcessActivityId() {
|
||||
return processActivityId;
|
||||
}
|
||||
|
||||
public void setProcessActivityId(Long processActivityId) {
|
||||
this.processActivityId = processActivityId;
|
||||
}
|
||||
|
||||
public void setPurchaseApplyId(Long purchaseApplyId) {
|
||||
this.purchaseApplyId = purchaseApplyId;
|
||||
}
|
||||
|
||||
public Long getPurchaseApplyId() {
|
||||
return purchaseApplyId;
|
||||
}
|
||||
|
||||
public void setTaskCode(String taskCode) {
|
||||
this.taskCode = taskCode;
|
||||
}
|
||||
|
||||
public String getTaskCode() {
|
||||
return taskCode;
|
||||
}
|
||||
|
||||
public void setMaterialName(String materialName) {
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public String getMaterialName() {
|
||||
return materialName;
|
||||
}
|
||||
|
||||
public void setWfProcessId(Long wfProcessId) {
|
||||
this.wfProcessId = wfProcessId;
|
||||
}
|
||||
|
||||
public Long getWfProcessId() {
|
||||
return wfProcessId;
|
||||
}
|
||||
|
||||
public void setImportFlag(String importFlag) {
|
||||
this.importFlag = importFlag;
|
||||
}
|
||||
|
||||
public String getImportFlag() {
|
||||
return importFlag;
|
||||
}
|
||||
|
||||
public List<MesPurchaseApplyProcessDetail> getMesPurchaseApplyProcessDetailList() {
|
||||
return mesPurchaseApplyProcessDetailList;
|
||||
}
|
||||
|
||||
public void setMesPurchaseApplyProcessDetailList(List<MesPurchaseApplyProcessDetail> mesPurchaseApplyProcessDetailList) {
|
||||
this.mesPurchaseApplyProcessDetailList = mesPurchaseApplyProcessDetailList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MesPurchaseApplyProcess{" +
|
||||
"purchaseApplyId=" + purchaseApplyId +
|
||||
", taskCode='" + taskCode + '\'' +
|
||||
", materialName='" + materialName + '\'' +
|
||||
", wfProcessId=" + wfProcessId +
|
||||
", processActivityId=" + processActivityId +
|
||||
", processActivityName='" + processActivityName + '\'' +
|
||||
", importFlag='" + importFlag + '\'' +
|
||||
", mesPurchaseApplyProcessDetailList=" + mesPurchaseApplyProcessDetailList +
|
||||
", currentAnomalyFlag='" + currentAnomalyFlag + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,158 @@
|
||||
package com.hw.mes.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.hw.common.core.annotation.Excel;
|
||||
import com.hw.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 采购申请流程明细对象 mes_purchase_apply_process_detail
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-09-19
|
||||
*/
|
||||
public class MesPurchaseApplyProcessDetail extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键标识
|
||||
*/
|
||||
private Long purchaseApplyDetailId;
|
||||
|
||||
/**
|
||||
* 任务编号
|
||||
*/
|
||||
@Excel(name = "任务编号")
|
||||
private String taskCode;
|
||||
|
||||
/**
|
||||
* 流程节点ID
|
||||
*/
|
||||
@Excel(name = "流程节点ID")
|
||||
private Long processActivityId;
|
||||
|
||||
/**
|
||||
* 异常标识(0否 1是)
|
||||
*/
|
||||
@Excel(name = "异常标识(0否 1是)")
|
||||
private String anomalyFlag;
|
||||
|
||||
/**
|
||||
* 更新标识(0否 1是)
|
||||
*/
|
||||
@Excel(name = "更新标识(0否 1是)")
|
||||
private String updateFlag;
|
||||
|
||||
/**
|
||||
* 通知标识(0否 1是)
|
||||
*/
|
||||
@Excel(name = "通知标识(0否 1是)")
|
||||
private String noticeFlag;
|
||||
|
||||
/**
|
||||
* 通知用户编号
|
||||
*/
|
||||
@Excel(name = "通知用户编号")
|
||||
private String noticeAuth;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Excel(name = "备注")
|
||||
private String purchaseRemark;
|
||||
|
||||
/**
|
||||
* 当前流程节点描述
|
||||
*/
|
||||
private String processActivityName;
|
||||
|
||||
public String getProcessActivityName() {
|
||||
return processActivityName;
|
||||
}
|
||||
|
||||
public void setProcessActivityName(String processActivityName) {
|
||||
this.processActivityName = processActivityName;
|
||||
}
|
||||
|
||||
public void setPurchaseApplyDetailId(Long purchaseApplyDetailId) {
|
||||
this.purchaseApplyDetailId = purchaseApplyDetailId;
|
||||
}
|
||||
|
||||
public Long getPurchaseApplyDetailId() {
|
||||
return purchaseApplyDetailId;
|
||||
}
|
||||
|
||||
public void setTaskCode(String taskCode) {
|
||||
this.taskCode = taskCode;
|
||||
}
|
||||
|
||||
public String getTaskCode() {
|
||||
return taskCode;
|
||||
}
|
||||
|
||||
public void setProcessActivityId(Long processActivityId) {
|
||||
this.processActivityId = processActivityId;
|
||||
}
|
||||
|
||||
public Long getProcessActivityId() {
|
||||
return processActivityId;
|
||||
}
|
||||
|
||||
public void setAnomalyFlag(String anomalyFlag) {
|
||||
this.anomalyFlag = anomalyFlag;
|
||||
}
|
||||
|
||||
public String getAnomalyFlag() {
|
||||
return anomalyFlag;
|
||||
}
|
||||
|
||||
public void setUpdateFlag(String updateFlag) {
|
||||
this.updateFlag = updateFlag;
|
||||
}
|
||||
|
||||
public String getUpdateFlag() {
|
||||
return updateFlag;
|
||||
}
|
||||
|
||||
public void setNoticeFlag(String noticeFlag) {
|
||||
this.noticeFlag = noticeFlag;
|
||||
}
|
||||
|
||||
public String getNoticeFlag() {
|
||||
return noticeFlag;
|
||||
}
|
||||
|
||||
public void setNoticeAuth(String noticeAuth) {
|
||||
this.noticeAuth = noticeAuth;
|
||||
}
|
||||
|
||||
public String getNoticeAuth() {
|
||||
return noticeAuth;
|
||||
}
|
||||
|
||||
public void setPurchaseRemark(String purchaseRemark) {
|
||||
this.purchaseRemark = purchaseRemark;
|
||||
}
|
||||
|
||||
public String getPurchaseRemark() {
|
||||
return purchaseRemark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("purchaseApplyDetailId", getPurchaseApplyDetailId())
|
||||
.append("taskCode", getTaskCode())
|
||||
.append("processActivityId", getProcessActivityId())
|
||||
.append("anomalyFlag", getAnomalyFlag())
|
||||
.append("updateFlag", getUpdateFlag())
|
||||
.append("noticeFlag", getNoticeFlag())
|
||||
.append("noticeAuth", getNoticeAuth())
|
||||
.append("purchaseRemark", getPurchaseRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.mes.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hw.mes.domain.MesPurchaseApplyProcessDetail;
|
||||
|
||||
/**
|
||||
* 采购申请流程明细Mapper接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2024-09-24
|
||||
*/
|
||||
public interface MesPurchaseApplyProcessDetailMapper {
|
||||
/**
|
||||
* 查询采购申请流程明细
|
||||
*
|
||||
* @param purchaseApplyDetailId 采购申请流程明细主键
|
||||
* @return 采购申请流程明细
|
||||
*/
|
||||
public MesPurchaseApplyProcessDetail selectMesPurchaseApplyProcessDetailByPurchaseApplyDetailId(Long purchaseApplyDetailId);
|
||||
|
||||
/**
|
||||
* 查询采购申请流程明细列表
|
||||
*
|
||||
* @param mesPurchaseApplyProcessDetail 采购申请流程明细
|
||||
* @return 采购申请流程明细集合
|
||||
*/
|
||||
public List<MesPurchaseApplyProcessDetail> selectMesPurchaseApplyProcessDetailList(MesPurchaseApplyProcessDetail mesPurchaseApplyProcessDetail);
|
||||
|
||||
/**
|
||||
* 新增采购申请流程明细
|
||||
*
|
||||
* @param mesPurchaseApplyProcessDetail 采购申请流程明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesPurchaseApplyProcessDetail(MesPurchaseApplyProcessDetail mesPurchaseApplyProcessDetail);
|
||||
|
||||
/**
|
||||
* 修改采购申请流程明细
|
||||
*
|
||||
* @param mesPurchaseApplyProcessDetail 采购申请流程明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesPurchaseApplyProcessDetail(MesPurchaseApplyProcessDetail mesPurchaseApplyProcessDetail);
|
||||
|
||||
/**
|
||||
* 删除采购申请流程明细
|
||||
*
|
||||
* @param purchaseApplyDetailId 采购申请流程明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesPurchaseApplyProcessDetailByPurchaseApplyDetailId(Long purchaseApplyDetailId);
|
||||
|
||||
/**
|
||||
* 批量删除采购申请流程明细
|
||||
*
|
||||
* @param purchaseApplyDetailIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesPurchaseApplyProcessDetailByPurchaseApplyDetailIds(Long[] purchaseApplyDetailIds);
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
package com.hw.mes.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hw.mes.domain.MesPurchaseApplyProcess;
|
||||
import com.hw.mes.domain.MesPurchaseApplyProcessDetail;
|
||||
|
||||
/**
|
||||
* 采购申请流程Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-09-19
|
||||
*/
|
||||
public interface MesPurchaseApplyProcessMapper {
|
||||
/**
|
||||
* 查询采购申请流程
|
||||
*
|
||||
* @param purchaseApplyId 采购申请流程主键
|
||||
* @return 采购申请流程
|
||||
*/
|
||||
public MesPurchaseApplyProcess selectMesPurchaseApplyProcessByPurchaseApplyId(Long purchaseApplyId);
|
||||
|
||||
/**
|
||||
* 查询采购申请流程列表
|
||||
*
|
||||
* @param mesPurchaseApplyProcess 采购申请流程
|
||||
* @return 采购申请流程集合
|
||||
*/
|
||||
public List<MesPurchaseApplyProcess> selectMesPurchaseApplyProcessList(MesPurchaseApplyProcess mesPurchaseApplyProcess);
|
||||
|
||||
/**
|
||||
* 新增采购申请流程
|
||||
*
|
||||
* @param mesPurchaseApplyProcess 采购申请流程
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesPurchaseApplyProcess(MesPurchaseApplyProcess mesPurchaseApplyProcess);
|
||||
|
||||
/**
|
||||
* 修改采购申请流程
|
||||
*
|
||||
* @param mesPurchaseApplyProcess 采购申请流程
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesPurchaseApplyProcess(MesPurchaseApplyProcess mesPurchaseApplyProcess);
|
||||
|
||||
/**
|
||||
* 删除采购申请流程
|
||||
*
|
||||
* @param purchaseApplyId 采购申请流程主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesPurchaseApplyProcessByPurchaseApplyId(Long purchaseApplyId);
|
||||
|
||||
/**
|
||||
* 批量删除采购申请流程
|
||||
*
|
||||
* @param purchaseApplyIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesPurchaseApplyProcessByPurchaseApplyIds(Long[] purchaseApplyIds);
|
||||
|
||||
/**
|
||||
* 批量删除采购申请流程明细
|
||||
*
|
||||
* @param purchaseApplyIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesPurchaseApplyProcessDetailByTaskCodes(Long[] purchaseApplyIds);
|
||||
|
||||
/**
|
||||
* 批量新增采购申请流程明细
|
||||
*
|
||||
* @param mesPurchaseApplyProcessDetailList 采购申请流程明细列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchMesPurchaseApplyProcessDetail(List<MesPurchaseApplyProcessDetail> mesPurchaseApplyProcessDetailList);
|
||||
|
||||
|
||||
/**
|
||||
* 通过采购申请流程主键删除采购申请流程明细信息
|
||||
*
|
||||
* @param purchaseApplyId 采购申请流程ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesPurchaseApplyProcessDetailByTaskCode(Long purchaseApplyId);
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.mes.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hw.mes.domain.MesRaiseCapitalBom;
|
||||
|
||||
/**
|
||||
* 提资单BOM信息Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-09-18
|
||||
*/
|
||||
public interface MesRaiseCapitalBomMapper {
|
||||
/**
|
||||
* 查询提资单BOM信息
|
||||
*
|
||||
* @param raiseCapitalId 提资单BOM信息主键
|
||||
* @return 提资单BOM信息
|
||||
*/
|
||||
public MesRaiseCapitalBom selectMesRaiseCapitalBomByRaiseCapitalId(Long raiseCapitalId);
|
||||
|
||||
/**
|
||||
* 查询提资单BOM信息列表
|
||||
*
|
||||
* @param mesRaiseCapitalBom 提资单BOM信息
|
||||
* @return 提资单BOM信息集合
|
||||
*/
|
||||
public List<MesRaiseCapitalBom> selectMesRaiseCapitalBomList(MesRaiseCapitalBom mesRaiseCapitalBom);
|
||||
|
||||
/**
|
||||
* 新增提资单BOM信息
|
||||
*
|
||||
* @param mesRaiseCapitalBom 提资单BOM信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesRaiseCapitalBom(MesRaiseCapitalBom mesRaiseCapitalBom);
|
||||
|
||||
/**
|
||||
* 修改提资单BOM信息
|
||||
*
|
||||
* @param mesRaiseCapitalBom 提资单BOM信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesRaiseCapitalBom(MesRaiseCapitalBom mesRaiseCapitalBom);
|
||||
|
||||
/**
|
||||
* 删除提资单BOM信息
|
||||
*
|
||||
* @param raiseCapitalId 提资单BOM信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesRaiseCapitalBomByRaiseCapitalId(Long raiseCapitalId);
|
||||
|
||||
/**
|
||||
* 批量删除提资单BOM信息
|
||||
*
|
||||
* @param raiseCapitalIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesRaiseCapitalBomByRaiseCapitalIds(Long[] raiseCapitalIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.mes.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.MesPurchaseApplyProcessDetail;
|
||||
|
||||
/**
|
||||
* 采购申请流程明细Service接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2024-09-24
|
||||
*/
|
||||
public interface IMesPurchaseApplyProcessDetailService
|
||||
{
|
||||
/**
|
||||
* 查询采购申请流程明细
|
||||
*
|
||||
* @param purchaseApplyDetailId 采购申请流程明细主键
|
||||
* @return 采购申请流程明细
|
||||
*/
|
||||
public MesPurchaseApplyProcessDetail selectMesPurchaseApplyProcessDetailByPurchaseApplyDetailId(Long purchaseApplyDetailId);
|
||||
|
||||
/**
|
||||
* 查询采购申请流程明细列表
|
||||
*
|
||||
* @param mesPurchaseApplyProcessDetail 采购申请流程明细
|
||||
* @return 采购申请流程明细集合
|
||||
*/
|
||||
public List<MesPurchaseApplyProcessDetail> selectMesPurchaseApplyProcessDetailList(MesPurchaseApplyProcessDetail mesPurchaseApplyProcessDetail);
|
||||
|
||||
/**
|
||||
* 新增采购申请流程明细
|
||||
*
|
||||
* @param mesPurchaseApplyProcessDetail 采购申请流程明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesPurchaseApplyProcessDetail(MesPurchaseApplyProcessDetail mesPurchaseApplyProcessDetail);
|
||||
|
||||
/**
|
||||
* 修改采购申请流程明细
|
||||
*
|
||||
* @param mesPurchaseApplyProcessDetail 采购申请流程明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesPurchaseApplyProcessDetail(MesPurchaseApplyProcessDetail mesPurchaseApplyProcessDetail);
|
||||
|
||||
/**
|
||||
* 批量删除采购申请流程明细
|
||||
*
|
||||
* @param purchaseApplyDetailIds 需要删除的采购申请流程明细主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesPurchaseApplyProcessDetailByPurchaseApplyDetailIds(Long[] purchaseApplyDetailIds);
|
||||
|
||||
/**
|
||||
* 删除采购申请流程明细信息
|
||||
*
|
||||
* @param purchaseApplyDetailId 采购申请流程明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesPurchaseApplyProcessDetailByPurchaseApplyDetailId(Long purchaseApplyDetailId);
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package com.hw.mes.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hw.mes.domain.MesRaiseCapitalBom;
|
||||
|
||||
/**
|
||||
* 提资单BOM信息Service接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-09-18
|
||||
*/
|
||||
public interface IMesRaiseCapitalBomService {
|
||||
/**
|
||||
* 查询提资单BOM信息
|
||||
*
|
||||
* @param raiseCapitalId 提资单BOM信息主键
|
||||
* @return 提资单BOM信息
|
||||
*/
|
||||
public MesRaiseCapitalBom selectMesRaiseCapitalBomByRaiseCapitalId(Long raiseCapitalId);
|
||||
|
||||
/**
|
||||
* 查询提资单BOM信息列表
|
||||
*
|
||||
* @param mesRaiseCapitalBom 提资单BOM信息
|
||||
* @return 提资单BOM信息集合
|
||||
*/
|
||||
public List<MesRaiseCapitalBom> selectMesRaiseCapitalBomList(MesRaiseCapitalBom mesRaiseCapitalBom);
|
||||
|
||||
/**
|
||||
* 新增提资单BOM信息
|
||||
*
|
||||
* @param mesRaiseCapitalBom 提资单BOM信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesRaiseCapitalBom(MesRaiseCapitalBom mesRaiseCapitalBom);
|
||||
|
||||
/**
|
||||
* 修改提资单BOM信息
|
||||
*
|
||||
* @param mesRaiseCapitalBom 提资单BOM信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesRaiseCapitalBom(MesRaiseCapitalBom mesRaiseCapitalBom);
|
||||
|
||||
/**
|
||||
* 批量删除提资单BOM信息
|
||||
*
|
||||
* @param raiseCapitalIds 需要删除的提资单BOM信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesRaiseCapitalBomByRaiseCapitalIds(Long[] raiseCapitalIds);
|
||||
|
||||
/**
|
||||
* 删除提资单BOM信息信息
|
||||
*
|
||||
* @param raiseCapitalId 提资单BOM信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesRaiseCapitalBomByRaiseCapitalId(Long raiseCapitalId);
|
||||
|
||||
/**
|
||||
* BOM导入
|
||||
* @param taskCode
|
||||
*/
|
||||
public void importRaiseCapitalBom(String taskCode);
|
||||
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.hw.mes.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hw.common.core.utils.DateUtils;
|
||||
import com.hw.common.security.utils.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.hw.mes.mapper.MesPurchaseApplyProcessDetailMapper;
|
||||
import com.hw.mes.domain.MesPurchaseApplyProcessDetail;
|
||||
import com.hw.mes.service.IMesPurchaseApplyProcessDetailService;
|
||||
|
||||
/**
|
||||
* 采购申请流程明细Service业务层处理
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2024-09-24
|
||||
*/
|
||||
@Service
|
||||
public class MesPurchaseApplyProcessDetailServiceImpl implements IMesPurchaseApplyProcessDetailService {
|
||||
@Autowired
|
||||
private MesPurchaseApplyProcessDetailMapper mesPurchaseApplyProcessDetailMapper;
|
||||
|
||||
/**
|
||||
* 查询采购申请流程明细
|
||||
*
|
||||
* @param purchaseApplyDetailId 采购申请流程明细主键
|
||||
* @return 采购申请流程明细
|
||||
*/
|
||||
@Override
|
||||
public MesPurchaseApplyProcessDetail selectMesPurchaseApplyProcessDetailByPurchaseApplyDetailId(Long purchaseApplyDetailId) {
|
||||
return mesPurchaseApplyProcessDetailMapper.selectMesPurchaseApplyProcessDetailByPurchaseApplyDetailId(purchaseApplyDetailId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询采购申请流程明细列表
|
||||
*
|
||||
* @param mesPurchaseApplyProcessDetail 采购申请流程明细
|
||||
* @return 采购申请流程明细
|
||||
*/
|
||||
@Override
|
||||
public List<MesPurchaseApplyProcessDetail> selectMesPurchaseApplyProcessDetailList(MesPurchaseApplyProcessDetail mesPurchaseApplyProcessDetail) {
|
||||
return mesPurchaseApplyProcessDetailMapper.selectMesPurchaseApplyProcessDetailList(mesPurchaseApplyProcessDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购申请流程明细
|
||||
*
|
||||
* @param mesPurchaseApplyProcessDetail 采购申请流程明细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMesPurchaseApplyProcessDetail(MesPurchaseApplyProcessDetail mesPurchaseApplyProcessDetail) {
|
||||
mesPurchaseApplyProcessDetail.setCreateBy(SecurityUtils.getUsername());
|
||||
mesPurchaseApplyProcessDetail.setCreateTime(DateUtils.getNowDate());
|
||||
return mesPurchaseApplyProcessDetailMapper.insertMesPurchaseApplyProcessDetail(mesPurchaseApplyProcessDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购申请流程明细
|
||||
*
|
||||
* @param mesPurchaseApplyProcessDetail 采购申请流程明细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMesPurchaseApplyProcessDetail(MesPurchaseApplyProcessDetail mesPurchaseApplyProcessDetail) {
|
||||
mesPurchaseApplyProcessDetail.setUpdateBy(SecurityUtils.getUsername());
|
||||
mesPurchaseApplyProcessDetail.setUpdateTime(DateUtils.getNowDate());
|
||||
return mesPurchaseApplyProcessDetailMapper.updateMesPurchaseApplyProcessDetail(mesPurchaseApplyProcessDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除采购申请流程明细
|
||||
*
|
||||
* @param purchaseApplyDetailIds 需要删除的采购申请流程明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMesPurchaseApplyProcessDetailByPurchaseApplyDetailIds(Long[] purchaseApplyDetailIds) {
|
||||
return mesPurchaseApplyProcessDetailMapper.deleteMesPurchaseApplyProcessDetailByPurchaseApplyDetailIds(purchaseApplyDetailIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采购申请流程明细信息
|
||||
*
|
||||
* @param purchaseApplyDetailId 采购申请流程明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMesPurchaseApplyProcessDetailByPurchaseApplyDetailId(Long purchaseApplyDetailId) {
|
||||
return mesPurchaseApplyProcessDetailMapper.deleteMesPurchaseApplyProcessDetailByPurchaseApplyDetailId(purchaseApplyDetailId);
|
||||
}
|
||||
}
|
@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hw.mes.mapper.MesPurchaseApplyProcessDetailMapper">
|
||||
|
||||
<resultMap type="MesPurchaseApplyProcessDetail" id="MesPurchaseApplyProcessDetailResult">
|
||||
<result property="purchaseApplyDetailId" column="purchase_apply_detail_id"/>
|
||||
<result property="taskCode" column="task_code"/>
|
||||
<result property="processActivityId" column="process_activity_id"/>
|
||||
<result property="anomalyFlag" column="anomaly_flag"/>
|
||||
<result property="updateFlag" column="update_flag"/>
|
||||
<result property="noticeFlag" column="notice_flag"/>
|
||||
<result property="noticeAuth" column="notice_auth"/>
|
||||
<result property="purchaseRemark" column="purchase_remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMesPurchaseApplyProcessDetailVo">
|
||||
select purchase_apply_detail_id,
|
||||
task_code,
|
||||
process_activity_id,
|
||||
anomaly_flag,
|
||||
update_flag,
|
||||
notice_flag,
|
||||
notice_auth,
|
||||
purchase_remark,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time
|
||||
from mes_purchase_apply_process_detail
|
||||
</sql>
|
||||
|
||||
<select id="selectMesPurchaseApplyProcessDetailList" parameterType="MesPurchaseApplyProcessDetail"
|
||||
resultMap="MesPurchaseApplyProcessDetailResult">
|
||||
<include refid="selectMesPurchaseApplyProcessDetailVo"/>
|
||||
<where>
|
||||
<if test="taskCode != null and taskCode != ''">and task_code = #{taskCode}</if>
|
||||
<if test="processActivityId != null ">and process_activity_id = #{processActivityId}</if>
|
||||
<if test="anomalyFlag != null and anomalyFlag != ''">and anomaly_flag = #{anomalyFlag}</if>
|
||||
<if test="updateFlag != null and updateFlag != ''">and update_flag = #{updateFlag}</if>
|
||||
<if test="noticeFlag != null and noticeFlag != ''">and notice_flag = #{noticeFlag}</if>
|
||||
<if test="noticeAuth != null and noticeAuth != ''">and notice_auth = #{noticeAuth}</if>
|
||||
<if test="purchaseRemark != null and purchaseRemark != ''">and purchase_remark = #{purchaseRemark}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMesPurchaseApplyProcessDetailByPurchaseApplyDetailId" parameterType="Long"
|
||||
resultMap="MesPurchaseApplyProcessDetailResult">
|
||||
<include refid="selectMesPurchaseApplyProcessDetailVo"/>
|
||||
where purchase_apply_detail_id = #{purchaseApplyDetailId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMesPurchaseApplyProcessDetail" parameterType="MesPurchaseApplyProcessDetail"
|
||||
useGeneratedKeys="true" keyProperty="purchaseApplyDetailId">
|
||||
insert into mes_purchase_apply_process_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="taskCode != null and taskCode != ''">task_code,</if>
|
||||
<if test="processActivityId != null">process_activity_id,</if>
|
||||
<if test="anomalyFlag != null">anomaly_flag,</if>
|
||||
<if test="updateFlag != null">update_flag,</if>
|
||||
<if test="noticeFlag != null">notice_flag,</if>
|
||||
<if test="noticeAuth != null">notice_auth,</if>
|
||||
<if test="purchaseRemark != null">purchase_remark,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="taskCode != null and taskCode != ''">#{taskCode},</if>
|
||||
<if test="processActivityId != null">#{processActivityId},</if>
|
||||
<if test="anomalyFlag != null">#{anomalyFlag},</if>
|
||||
<if test="updateFlag != null">#{updateFlag},</if>
|
||||
<if test="noticeFlag != null">#{noticeFlag},</if>
|
||||
<if test="noticeAuth != null">#{noticeAuth},</if>
|
||||
<if test="purchaseRemark != null">#{purchaseRemark},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMesPurchaseApplyProcessDetail" parameterType="MesPurchaseApplyProcessDetail">
|
||||
update mes_purchase_apply_process_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="taskCode != null and taskCode != ''">task_code = #{taskCode},</if>
|
||||
<if test="processActivityId != null">process_activity_id = #{processActivityId},</if>
|
||||
<if test="anomalyFlag != null">anomaly_flag = #{anomalyFlag},</if>
|
||||
<if test="updateFlag != null">update_flag = #{updateFlag},</if>
|
||||
<if test="noticeFlag != null">notice_flag = #{noticeFlag},</if>
|
||||
<if test="noticeAuth != null">notice_auth = #{noticeAuth},</if>
|
||||
<if test="purchaseRemark != null">purchase_remark = #{purchaseRemark},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where purchase_apply_detail_id = #{purchaseApplyDetailId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMesPurchaseApplyProcessDetailByPurchaseApplyDetailId" parameterType="Long">
|
||||
delete
|
||||
from mes_purchase_apply_process_detail
|
||||
where purchase_apply_detail_id = #{purchaseApplyDetailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesPurchaseApplyProcessDetailByPurchaseApplyDetailIds" parameterType="String">
|
||||
delete from mes_purchase_apply_process_detail where purchase_apply_detail_id in
|
||||
<foreach item="purchaseApplyDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{purchaseApplyDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,186 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hw.mes.mapper.MesPurchaseApplyProcessMapper">
|
||||
|
||||
<resultMap type="MesPurchaseApplyProcess" id="MesPurchaseApplyProcessResult">
|
||||
<result property="purchaseApplyId" column="purchase_apply_id"/>
|
||||
<result property="taskCode" column="task_code"/>
|
||||
<result property="materialName" column="material_name"/>
|
||||
<result property="wfProcessId" column="wf_process_id"/>
|
||||
<result property="processActivityId" column="process_activity_id"/>
|
||||
<result property="importFlag" column="import_flag"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="processActivityName" column="process_activity_name"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="MesPurchaseApplyProcessMesPurchaseApplyProcessDetailResult" type="MesPurchaseApplyProcess"
|
||||
extends="MesPurchaseApplyProcessResult">
|
||||
<collection property="mesPurchaseApplyProcessDetailList" notNullColumn="sub_purchase_apply_detail_id"
|
||||
javaType="java.util.List" resultMap="MesPurchaseApplyProcessDetailResult"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="MesPurchaseApplyProcessDetail" id="MesPurchaseApplyProcessDetailResult">
|
||||
<result property="purchaseApplyDetailId" column="sub_purchase_apply_detail_id"/>
|
||||
<result property="taskCode" column="sub_task_code"/>
|
||||
<result property="processActivityId" column="sub_process_activity_id"/>
|
||||
<result property="anomalyFlag" column="sub_anomaly_flag"/>
|
||||
<result property="updateFlag" column="sub_update_flag"/>
|
||||
<result property="noticeFlag" column="sub_notice_flag"/>
|
||||
<result property="noticeAuth" column="sub_notice_auth"/>
|
||||
<result property="purchaseRemark" column="sub_purchase_remark"/>
|
||||
<result property="createBy" column="sub_create_by"/>
|
||||
<result property="createTime" column="sub_create_time"/>
|
||||
<result property="updateBy" column="sub_update_by"/>
|
||||
<result property="updateTime" column="sub_update_time"/>
|
||||
<result property="processActivityName" column="sub_process_activity_name"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMesPurchaseApplyProcessVo">
|
||||
select mpap.purchase_apply_id,
|
||||
mpap.task_code,
|
||||
mpap.material_name,
|
||||
mpap.wf_process_id,
|
||||
mpap.process_activity_id,
|
||||
mpap.import_flag,
|
||||
mpap.create_by,
|
||||
mpap.create_time,
|
||||
mpap.update_by,
|
||||
mpap.update_time,
|
||||
wpa.process_activity_name
|
||||
from mes_purchase_apply_process mpap
|
||||
left join wf_process_activity wpa on mpap.process_activity_id + 1 = wpa.process_activity_id
|
||||
</sql>
|
||||
|
||||
<select id="selectMesPurchaseApplyProcessList" parameterType="MesPurchaseApplyProcess"
|
||||
resultMap="MesPurchaseApplyProcessResult">
|
||||
<include refid="selectMesPurchaseApplyProcessVo"/>
|
||||
<where>
|
||||
<if test="taskCode != null and taskCode != ''">and mpap.task_code = #{taskCode}</if>
|
||||
<if test="materialName != null and materialName != ''">and mpap.material_name like concat('%', #{materialName},
|
||||
'%')
|
||||
</if>
|
||||
<if test="wfProcessId != null ">and mpap.wf_process_id = #{wfProcessId}</if>
|
||||
<if test="processActivityId != null ">and mpap.process_activity_id = #{processActivityId}</if>
|
||||
<if test="importFlag != null and importFlag != ''">and mpap.import_flag = #{importFlag}</if>
|
||||
</where>
|
||||
order by mpap.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectMesPurchaseApplyProcessByPurchaseApplyId" parameterType="Long"
|
||||
resultMap="MesPurchaseApplyProcessMesPurchaseApplyProcessDetailResult">
|
||||
select a.purchase_apply_id,
|
||||
a.task_code,
|
||||
a.material_name,
|
||||
a.wf_process_id,
|
||||
a.process_activity_id,
|
||||
a.import_flag,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
b.purchase_apply_detail_id as sub_purchase_apply_detail_id,
|
||||
b.task_code as sub_task_code,
|
||||
b.process_activity_id as sub_process_activity_id,
|
||||
b.anomaly_flag as sub_anomaly_flag,
|
||||
b.update_flag as sub_update_flag,
|
||||
b.notice_flag as sub_notice_flag,
|
||||
b.notice_auth as sub_notice_auth,
|
||||
b.purchase_remark as sub_purchase_remark,
|
||||
b.create_by as sub_create_by,
|
||||
b.create_time as sub_create_time,
|
||||
b.update_by as sub_update_by,
|
||||
b.update_time as sub_update_time,
|
||||
wpa.process_activity_name as sub_process_activity_name,
|
||||
wp2.process_activity_name
|
||||
from mes_purchase_apply_process a
|
||||
left join mes_purchase_apply_process_detail b on b.task_code = a.task_code
|
||||
left join wf_process_activity wpa on wpa.process_activity_id = b.process_activity_id
|
||||
left join wf_process_activity wp2 on a.process_activity_id + 1 = wp2.process_activity_id
|
||||
where a.purchase_apply_id = #{purchaseApplyId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMesPurchaseApplyProcess" parameterType="MesPurchaseApplyProcess" useGeneratedKeys="true"
|
||||
keyProperty="purchaseApplyId">
|
||||
insert into mes_purchase_apply_process
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="taskCode != null and taskCode != ''">task_code,</if>
|
||||
<if test="materialName != null">material_name,</if>
|
||||
<if test="wfProcessId != null">wf_process_id,</if>
|
||||
<if test="processActivityId != null">process_activity_id,</if>
|
||||
<if test="importFlag != null">import_flag,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="taskCode != null and taskCode != ''">#{taskCode},</if>
|
||||
<if test="materialName != null">#{materialName},</if>
|
||||
<if test="wfProcessId != null">#{wfProcessId},</if>
|
||||
<if test="processActivityId != null">#{processActivityId},</if>
|
||||
<if test="importFlag != null">#{importFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMesPurchaseApplyProcess" parameterType="MesPurchaseApplyProcess">
|
||||
update mes_purchase_apply_process
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="taskCode != null and taskCode != ''">task_code = #{taskCode},</if>
|
||||
<if test="materialName != null">material_name = #{materialName},</if>
|
||||
<if test="wfProcessId != null">wf_process_id = #{wfProcessId},</if>
|
||||
<if test="processActivityId != null">process_activity_id = #{processActivityId},</if>
|
||||
<if test="importFlag != null">import_flag = #{importFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where purchase_apply_id = #{purchaseApplyId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMesPurchaseApplyProcessByPurchaseApplyId" parameterType="Long">
|
||||
delete
|
||||
from mes_purchase_apply_process
|
||||
where purchase_apply_id = #{purchaseApplyId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesPurchaseApplyProcessByPurchaseApplyIds" parameterType="String">
|
||||
delete from mes_purchase_apply_process where purchase_apply_id in
|
||||
<foreach item="purchaseApplyId" collection="array" open="(" separator="," close=")">
|
||||
#{purchaseApplyId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesPurchaseApplyProcessDetailByTaskCodes" parameterType="String">
|
||||
delete from mes_purchase_apply_process_detail where task_code in
|
||||
<foreach item="taskCode" collection="array" open="(" separator="," close=")">
|
||||
#{taskCode}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesPurchaseApplyProcessDetailByTaskCode" parameterType="Long">
|
||||
delete
|
||||
from mes_purchase_apply_process_detail
|
||||
where task_code = #{taskCode}
|
||||
</delete>
|
||||
|
||||
<insert id="batchMesPurchaseApplyProcessDetail">
|
||||
insert into mes_purchase_apply_process_detail( purchase_apply_detail_id, task_code, process_activity_id,
|
||||
anomaly_flag, update_flag, notice_flag, notice_auth, purchase_remark, create_by, create_time, update_by,
|
||||
update_time) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.purchaseApplyDetailId}, #{item.taskCode}, #{item.processActivityId}, #{item.anomalyFlag},
|
||||
#{item.updateFlag}, #{item.noticeFlag}, #{item.noticeAuth}, #{item.purchaseRemark}, #{item.createBy},
|
||||
#{item.createTime}, #{item.updateBy}, #{item.updateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -0,0 +1,181 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hw.mes.mapper.MesRaiseCapitalBomMapper">
|
||||
|
||||
<resultMap type="MesRaiseCapitalBom" id="MesRaiseCapitalBomResult">
|
||||
<result property="raiseCapitalId" column="raise_capital_id"/>
|
||||
<result property="taskCode" column="task_code"/>
|
||||
<result property="materialBomDesc" column="material_bom_desc"/>
|
||||
<result property="parentId" column="parent_id"/>
|
||||
<result property="ancestors" column="ancestors"/>
|
||||
<result property="materialId" column="material_id"/>
|
||||
<result property="materialName" column="material_name"/>
|
||||
<result property="standardAmount" column="standard_amount"/>
|
||||
<result property="topFlag" column="top_flag"/>
|
||||
<result property="checkType" column="check_type"/>
|
||||
<result property="projectId" column="project_id"/>
|
||||
<result property="assembleTime" column="assemble_time"/>
|
||||
<result property="activeFlag" column="active_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="brand" column="brand"/>
|
||||
<result property="materialClassfication" column="material_classfication"/>
|
||||
<result property="erpMaterialId" column="erp_material_id"/>
|
||||
<result property="materialCode" column="material_code"/>
|
||||
<result property="materialName" column="material_name"/>
|
||||
<result property="materialSpec" column="material_spec"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMesRaiseCapitalBomVo">
|
||||
select mrcb.raise_capital_id,
|
||||
mrcb.task_code,
|
||||
mrcb.material_bom_desc,
|
||||
mrcb.parent_id,
|
||||
mrcb.ancestors,
|
||||
mrcb.material_id,
|
||||
mrcb.standard_amount,
|
||||
mrcb.top_flag,
|
||||
mrcb.check_type,
|
||||
mrcb.project_id,
|
||||
mrcb.assemble_time,
|
||||
mrcb.active_flag,
|
||||
mrcb.remark,
|
||||
mrcb.create_by,
|
||||
mrcb.create_time,
|
||||
mrcb.update_by,
|
||||
mrcb.update_time,
|
||||
mrcb.brand,
|
||||
mrcb.material_classfication,
|
||||
mrcb.erp_material_id,
|
||||
mbmi.material_code,
|
||||
mbmi.material_name,
|
||||
mbmi.material_spec
|
||||
from mes_raise_capital_bom mrcb
|
||||
left join mes_base_material_info mbmi on mrcb.material_id = mbmi.material_id
|
||||
</sql>
|
||||
|
||||
<select id="selectMesRaiseCapitalBomList" parameterType="MesRaiseCapitalBom" resultMap="MesRaiseCapitalBomResult">
|
||||
<include refid="selectMesRaiseCapitalBomVo"/>
|
||||
<where>
|
||||
<if test="taskCode != null and taskCode != ''">and mrcb.task_code = #{taskCode}</if>
|
||||
<if test="materialBomDesc != null and materialBomDesc != ''">and mrcb.material_bom_desc = #{materialBomDesc}
|
||||
</if>
|
||||
<if test="parentId != null ">and mrcb.parent_id = #{parentId}</if>
|
||||
<if test="ancestors != null and ancestors != ''">and mrcb.ancestors = #{ancestors}</if>
|
||||
<if test="materialId != null ">and mrcb.material_id = #{materialId}</if>
|
||||
<if test="materialName != null and materialName != ''">and mrcb.material_name like concat('%', #{materialName},
|
||||
'%')
|
||||
</if>
|
||||
<if test="standardAmount != null ">and mrcb.standard_amount = #{standardAmount}</if>
|
||||
<if test="topFlag != null ">and mrcb.top_flag = #{topFlag}</if>
|
||||
<if test="checkType != null and checkType != ''">and mrcb.check_type = #{checkType}</if>
|
||||
<if test="projectId != null ">and mrcb.project_id = #{projectId}</if>
|
||||
<if test="assembleTime != null ">and mrcb.assemble_time = #{assembleTime}</if>
|
||||
<if test="activeFlag != null and activeFlag != ''">and mrcb.active_flag = #{activeFlag}</if>
|
||||
<if test="brand != null and brand != ''">and mrcb.brand = #{brand}</if>
|
||||
<if test="materialClassfication != null and materialClassfication != ''">and mrcb.material_classfication =
|
||||
#{materialClassfication}
|
||||
</if>
|
||||
<if test="erpMaterialId != null ">and mrcb.erp_material_id = #{erpMaterialId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMesRaiseCapitalBomByRaiseCapitalId" parameterType="Long" resultMap="MesRaiseCapitalBomResult">
|
||||
<include refid="selectMesRaiseCapitalBomVo"/>
|
||||
where mrcb.raise_capital_id = #{raiseCapitalId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMesRaiseCapitalBom" parameterType="MesRaiseCapitalBom" useGeneratedKeys="true"
|
||||
keyProperty="raiseCapitalId">
|
||||
insert into mes_raise_capital_bom
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="taskCode != null and taskCode != ''">task_code,</if>
|
||||
<if test="materialBomDesc != null">material_bom_desc,</if>
|
||||
<if test="parentId != null">parent_id,</if>
|
||||
<if test="ancestors != null">ancestors,</if>
|
||||
<if test="materialId != null">material_id,</if>
|
||||
<if test="materialName != null">material_name,</if>
|
||||
<if test="standardAmount != null">standard_amount,</if>
|
||||
<if test="topFlag != null">top_flag,</if>
|
||||
<if test="checkType != null">check_type,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="assembleTime != null">assemble_time,</if>
|
||||
<if test="activeFlag != null and activeFlag != ''">active_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="brand != null">brand,</if>
|
||||
<if test="materialClassfication != null">material_classfication,</if>
|
||||
<if test="erpMaterialId != null">erp_material_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="taskCode != null and taskCode != ''">#{taskCode},</if>
|
||||
<if test="materialBomDesc != null">#{materialBomDesc},</if>
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
<if test="ancestors != null">#{ancestors},</if>
|
||||
<if test="materialId != null">#{materialId},</if>
|
||||
<if test="materialName != null">#{materialName},</if>
|
||||
<if test="standardAmount != null">#{standardAmount},</if>
|
||||
<if test="topFlag != null">#{topFlag},</if>
|
||||
<if test="checkType != null">#{checkType},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="assembleTime != null">#{assembleTime},</if>
|
||||
<if test="activeFlag != null and activeFlag != ''">#{activeFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="brand != null">#{brand},</if>
|
||||
<if test="materialClassfication != null">#{materialClassfication},</if>
|
||||
<if test="erpMaterialId != null">#{erpMaterialId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMesRaiseCapitalBom" parameterType="MesRaiseCapitalBom">
|
||||
update mes_raise_capital_bom
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="taskCode != null and taskCode != ''">task_code = #{taskCode},</if>
|
||||
<if test="materialBomDesc != null">material_bom_desc = #{materialBomDesc},</if>
|
||||
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||
<if test="ancestors != null">ancestors = #{ancestors},</if>
|
||||
<if test="materialId != null">material_id = #{materialId},</if>
|
||||
<if test="materialName != null">material_name = #{materialName},</if>
|
||||
<if test="standardAmount != null">standard_amount = #{standardAmount},</if>
|
||||
<if test="topFlag != null">top_flag = #{topFlag},</if>
|
||||
<if test="checkType != null">check_type = #{checkType},</if>
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="assembleTime != null">assemble_time = #{assembleTime},</if>
|
||||
<if test="activeFlag != null and activeFlag != ''">active_flag = #{activeFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="brand != null">brand = #{brand},</if>
|
||||
<if test="materialClassfication != null">material_classfication = #{materialClassfication},</if>
|
||||
<if test="erpMaterialId != null">erp_material_id = #{erpMaterialId},</if>
|
||||
</trim>
|
||||
where raise_capital_id = #{raiseCapitalId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMesRaiseCapitalBomByRaiseCapitalId" parameterType="Long">
|
||||
delete
|
||||
from mes_raise_capital_bom
|
||||
where raise_capital_id = #{raiseCapitalId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesRaiseCapitalBomByRaiseCapitalIds" parameterType="String">
|
||||
delete from mes_raise_capital_bom where raise_capital_id in
|
||||
<foreach item="raiseCapitalId" collection="array" open="(" separator="," close=")">
|
||||
#{raiseCapitalId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询提资单BOM信息列表
|
||||
export function listMesRaiseCapitalBom(query) {
|
||||
return request({
|
||||
url: '/mes/mesRaiseCapitalBom/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询提资单BOM信息详细
|
||||
export function getMesRaiseCapitalBom(raiseCapitalId) {
|
||||
return request({
|
||||
url: '/mes/mesRaiseCapitalBom/' + raiseCapitalId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增提资单BOM信息
|
||||
export function addMesRaiseCapitalBom(data) {
|
||||
return request({
|
||||
url: '/mes/mesRaiseCapitalBom',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改提资单BOM信息
|
||||
export function updateMesRaiseCapitalBom(data) {
|
||||
return request({
|
||||
url: '/mes/mesRaiseCapitalBom',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除提资单BOM信息
|
||||
export function delMesRaiseCapitalBom(raiseCapitalId) {
|
||||
return request({
|
||||
url: '/mes/mesRaiseCapitalBom/' + raiseCapitalId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询采购申请流程列表
|
||||
export function listPurchaseApplyProcess(query) {
|
||||
return request({
|
||||
url: '/mes/purchaseApplyProcess/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询采购申请流程详细
|
||||
export function getPurchaseApplyProcess(purchaseApplyId) {
|
||||
return request({
|
||||
url: '/mes/purchaseApplyProcess/' + purchaseApplyId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增采购申请流程
|
||||
export function addPurchaseApplyProcess(data) {
|
||||
return request({
|
||||
url: '/mes/purchaseApplyProcess',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改采购申请流程
|
||||
export function updatePurchaseApplyProcess(data) {
|
||||
return request({
|
||||
url: '/mes/purchaseApplyProcess',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除采购申请流程
|
||||
export function delPurchaseApplyProcess(purchaseApplyId) {
|
||||
return request({
|
||||
url: '/mes/purchaseApplyProcess/' + purchaseApplyId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 采购异常流转
|
||||
export function purchaseAbnormalFlowApi(data) {
|
||||
return request({
|
||||
url: '/mes/purchaseApplyProcess/purchaseAbnormalFlow',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 技术处理
|
||||
export function technicalProcessingFlowApi(data) {
|
||||
return request({
|
||||
url: '/mes/purchaseApplyProcess/technicalProcessing',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
Loading…
Reference in New Issue