From 41918a86452d8c711c7ec6b8a15bdcf7a1880c96 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Mon, 22 Jul 2024 10:37:08 +0800 Subject: [PATCH 1/3] =?UTF-8?q?[fix]=20=E9=94=80=E5=94=AE=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E6=96=B0=E5=A2=9E=E5=94=AE=E5=90=8E=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E8=AF=A6=E6=83=85=E5=AE=9E=E4=BD=93=E7=B1=BB=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=94=AE=E5=90=8E=E9=80=9A=E7=9F=A5=E8=AF=A6?= =?UTF-8?q?=E6=83=85Mapper=20=E6=96=B0=E5=A2=9E=E5=94=AE=E5=90=8E=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E8=AF=A6=E6=83=85Mapper.XML=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=94=AE=E5=90=8E=E9=80=9A=E7=9F=A5=E8=AF=A6=E6=83=85Service?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20=E6=96=B0=E5=A2=9E=E5=94=AE=E5=90=8E?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E8=AF=A6=E6=83=85ServiceImpl=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/SalesAftersalesNoticeDetail.java | 317 ++++++++++++++++++ .../SalesAftersalesNoticeDetailMapper.java | 77 +++++ .../ISalesAftersalesNoticeDetailService.java | 75 +++++ ...alesAftersalesNoticeDetailServiceImpl.java | 126 +++++++ .../SalesAftersalesNoticeDetailMapper.xml | 160 +++++++++ 5 files changed, 755 insertions(+) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SalesAftersalesNoticeDetail.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/sales/mapper/SalesAftersalesNoticeDetailMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesAftersalesNoticeDetailService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesAftersalesNoticeDetailServiceImpl.java create mode 100644 ruoyi-admin/src/main/resources/mapper/sales/SalesAftersalesNoticeDetailMapper.xml diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SalesAftersalesNoticeDetail.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SalesAftersalesNoticeDetail.java new file mode 100644 index 00000000..3814f08a --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SalesAftersalesNoticeDetail.java @@ -0,0 +1,317 @@ +package com.ruoyi.sales.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 售后通知单详情对象 sales_aftersales_notice_detail + * + * @author 刘晓旭 + * @date 2024-07-22 + */ +public class SalesAftersalesNoticeDetail extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 售后通知单详情ID */ + private Long aftersalesNoticeDetailId; + + /** 售后通知单号 */ + @Excel(name = "售后通知单号") + private String aftersalesNoticeCode; + + /** 关联生产订单号 */ + private String makeNo; + + /** 关联销售订单编号 */ + private String salesOrderCode; + + /** 用户ID */ + private Long userId; + + /** 紧急程度(0一般、1紧急) */ + @Excel(name = "紧急程度", readConverterExp = "0=一般、1紧急") + private String emergencyDegree; + + /** 售后问题 */ + @Excel(name = "售后问题") + private String aftersalesProblem; + + /** 报告问题 */ + @Excel(name = "报告问题") + private String aftersalesReportUrl; + + /** 客户ID */ + private String customerId; + + /** 客户名称 */ + private String customerName; + + /** SN号(产品序列号) */ + @Excel(name = "SN号", readConverterExp = "产=品序列号") + private String snCode; + + /** 设备流水号 */ + @Excel(name = "设备流水号") + private String deviceRunningNumber; + + /** 物料名称 */ + @Excel(name = "物料名称") + private String materialName; + + /** 物料类型 */ + @Excel(name = "物料类型") + private String materialType; + + /** 物料图片地址 */ + @Excel(name = "物料图片地址") + private String materialPhotourl; + + /** 料号 */ + @Excel(name = "料号") + private String materialNo; + + /** 物料品牌 */ + @Excel(name = "物料品牌") + private String materialBrand; + + /** 物料单位 */ + @Excel(name = "物料单位") + private String materialUnit; + + /** 物料描述 */ + @Excel(name = "物料描述") + private String materialDescribe; + + /** 物料加工方式 */ + @Excel(name = "物料加工方式") + private String materialProcessMethod; + + /** 已出库数量 */ + @Excel(name = "已出库数量") + private Integer shippedGoodsSum; + + public void setAftersalesNoticeDetailId(Long aftersalesNoticeDetailId) + { + this.aftersalesNoticeDetailId = aftersalesNoticeDetailId; + } + + public Long getAftersalesNoticeDetailId() + { + return aftersalesNoticeDetailId; + } + public void setAftersalesNoticeCode(String aftersalesNoticeCode) + { + this.aftersalesNoticeCode = aftersalesNoticeCode; + } + + public String getAftersalesNoticeCode() + { + return aftersalesNoticeCode; + } + public void setMakeNo(String makeNo) + { + this.makeNo = makeNo; + } + + public String getMakeNo() + { + return makeNo; + } + public void setSalesOrderCode(String salesOrderCode) + { + this.salesOrderCode = salesOrderCode; + } + + public String getSalesOrderCode() + { + return salesOrderCode; + } + public void setUserId(Long userId) + { + this.userId = userId; + } + + public Long getUserId() + { + return userId; + } + public void setEmergencyDegree(String emergencyDegree) + { + this.emergencyDegree = emergencyDegree; + } + + public String getEmergencyDegree() + { + return emergencyDegree; + } + public void setAftersalesProblem(String aftersalesProblem) + { + this.aftersalesProblem = aftersalesProblem; + } + + public String getAftersalesProblem() + { + return aftersalesProblem; + } + public void setAftersalesReportUrl(String aftersalesReportUrl) + { + this.aftersalesReportUrl = aftersalesReportUrl; + } + + public String getAftersalesReportUrl() + { + return aftersalesReportUrl; + } + public void setCustomerId(String customerId) + { + this.customerId = customerId; + } + + public String getCustomerId() + { + return customerId; + } + public void setCustomerName(String customerName) + { + this.customerName = customerName; + } + + public String getCustomerName() + { + return customerName; + } + public void setSnCode(String snCode) + { + this.snCode = snCode; + } + + public String getSnCode() + { + return snCode; + } + public void setDeviceRunningNumber(String deviceRunningNumber) + { + this.deviceRunningNumber = deviceRunningNumber; + } + + public String getDeviceRunningNumber() + { + return deviceRunningNumber; + } + public void setMaterialName(String materialName) + { + this.materialName = materialName; + } + + public String getMaterialName() + { + return materialName; + } + public void setMaterialType(String materialType) + { + this.materialType = materialType; + } + + public String getMaterialType() + { + return materialType; + } + public void setMaterialPhotourl(String materialPhotourl) + { + this.materialPhotourl = materialPhotourl; + } + + public String getMaterialPhotourl() + { + return materialPhotourl; + } + public void setMaterialNo(String materialNo) + { + this.materialNo = materialNo; + } + + public String getMaterialNo() + { + return materialNo; + } + public void setMaterialBrand(String materialBrand) + { + this.materialBrand = materialBrand; + } + + public String getMaterialBrand() + { + return materialBrand; + } + public void setMaterialUnit(String materialUnit) + { + this.materialUnit = materialUnit; + } + + public String getMaterialUnit() + { + return materialUnit; + } + public void setMaterialDescribe(String materialDescribe) + { + this.materialDescribe = materialDescribe; + } + + public String getMaterialDescribe() + { + return materialDescribe; + } + public void setMaterialProcessMethod(String materialProcessMethod) + { + this.materialProcessMethod = materialProcessMethod; + } + + public String getMaterialProcessMethod() + { + return materialProcessMethod; + } + public void setShippedGoodsSum(Integer shippedGoodsSum) + { + this.shippedGoodsSum = shippedGoodsSum; + } + + public Integer getShippedGoodsSum() + { + return shippedGoodsSum; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("aftersalesNoticeDetailId", getAftersalesNoticeDetailId()) + .append("aftersalesNoticeCode", getAftersalesNoticeCode()) + .append("makeNo", getMakeNo()) + .append("salesOrderCode", getSalesOrderCode()) + .append("userId", getUserId()) + .append("emergencyDegree", getEmergencyDegree()) + .append("aftersalesProblem", getAftersalesProblem()) + .append("aftersalesReportUrl", getAftersalesReportUrl()) + .append("customerId", getCustomerId()) + .append("customerName", getCustomerName()) + .append("snCode", getSnCode()) + .append("deviceRunningNumber", getDeviceRunningNumber()) + .append("materialName", getMaterialName()) + .append("materialType", getMaterialType()) + .append("materialPhotourl", getMaterialPhotourl()) + .append("materialNo", getMaterialNo()) + .append("materialBrand", getMaterialBrand()) + .append("materialUnit", getMaterialUnit()) + .append("materialDescribe", getMaterialDescribe()) + .append("materialProcessMethod", getMaterialProcessMethod()) + .append("shippedGoodsSum", getShippedGoodsSum()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/mapper/SalesAftersalesNoticeDetailMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/mapper/SalesAftersalesNoticeDetailMapper.java new file mode 100644 index 00000000..70666ae7 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/mapper/SalesAftersalesNoticeDetailMapper.java @@ -0,0 +1,77 @@ +package com.ruoyi.sales.mapper; + +import java.util.List; +import com.ruoyi.sales.domain.SalesAftersalesNoticeDetail; + +/** + * 售后通知单详情Mapper接口 + * + * @author 刘晓旭 + * @date 2024-07-22 + */ +public interface SalesAftersalesNoticeDetailMapper +{ + /** + * 查询售后通知单详情 + * + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return 售后通知单详情 + */ + public SalesAftersalesNoticeDetail selectSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId); + + /** + * 查询售后通知单详情列表 + * + * @param salesAftersalesNoticeDetail 售后通知单详情 + * @return 售后通知单详情集合 + */ + public List selectSalesAftersalesNoticeDetailList(SalesAftersalesNoticeDetail salesAftersalesNoticeDetail); + + /** + * 新增售后通知单详情 + * + * @param salesAftersalesNoticeDetail 售后通知单详情 + * @return 结果 + */ + public int insertSalesAftersalesNoticeDetail(SalesAftersalesNoticeDetail salesAftersalesNoticeDetail); + + /** + * 修改售后通知单详情 + * + * @param salesAftersalesNoticeDetail 售后通知单详情 + * @return 结果 + */ + public int updateSalesAftersalesNoticeDetail(SalesAftersalesNoticeDetail salesAftersalesNoticeDetail); + + /** + * 删除售后通知单详情 + * + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return 结果 + */ + public int deleteSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId); + + /** + * 批量删除售后通知单详情 + * + * @param aftersalesNoticeDetailIds 需要删除的数据ID + * @return 结果 + */ + public int deleteSalesAftersalesNoticeDetailByIds(String[] aftersalesNoticeDetailIds); + + /** + * 作废售后通知单详情 + * + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return 结果 + */ + public int cancelSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId); + + /** + * 恢复售后通知单详情 + * + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return 结果 + */ + public int restoreSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesAftersalesNoticeDetailService.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesAftersalesNoticeDetailService.java new file mode 100644 index 00000000..1461517f --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesAftersalesNoticeDetailService.java @@ -0,0 +1,75 @@ +package com.ruoyi.sales.service; + +import java.util.List; +import com.ruoyi.sales.domain.SalesAftersalesNoticeDetail; + +/** + * 售后通知单详情Service接口 + * + * @author 刘晓旭 + * @date 2024-07-22 + */ +public interface ISalesAftersalesNoticeDetailService +{ + /** + * 查询售后通知单详情 + * + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return 售后通知单详情 + */ + public SalesAftersalesNoticeDetail selectSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId); + + /** + * 查询售后通知单详情列表 + * + * @param salesAftersalesNoticeDetail 售后通知单详情 + * @return 售后通知单详情集合 + */ + public List selectSalesAftersalesNoticeDetailList(SalesAftersalesNoticeDetail salesAftersalesNoticeDetail); + + /** + * 新增售后通知单详情 + * + * @param salesAftersalesNoticeDetail 售后通知单详情 + * @return 结果 + */ + public int insertSalesAftersalesNoticeDetail(SalesAftersalesNoticeDetail salesAftersalesNoticeDetail); + + /** + * 修改售后通知单详情 + * + * @param salesAftersalesNoticeDetail 售后通知单详情 + * @return 结果 + */ + public int updateSalesAftersalesNoticeDetail(SalesAftersalesNoticeDetail salesAftersalesNoticeDetail); + + /** + * 批量删除售后通知单详情 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteSalesAftersalesNoticeDetailByIds(String ids); + + /** + * 删除售后通知单详情信息 + * + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return 结果 + */ + public int deleteSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId); + + /** + * 作废售后通知单详情 + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return + */ + int cancelSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId); + + /** + * 恢复售后通知单详情 + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return + */ + int restoreSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesAftersalesNoticeDetailServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesAftersalesNoticeDetailServiceImpl.java new file mode 100644 index 00000000..99d987bd --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesAftersalesNoticeDetailServiceImpl.java @@ -0,0 +1,126 @@ +package com.ruoyi.sales.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.ShiroUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.sales.mapper.SalesAftersalesNoticeDetailMapper; +import com.ruoyi.sales.domain.SalesAftersalesNoticeDetail; +import com.ruoyi.sales.service.ISalesAftersalesNoticeDetailService; +import com.ruoyi.common.core.text.Convert; + +/** + * 售后通知单详情Service业务层处理 + * + * @author 刘晓旭 + * @date 2024-07-22 + */ +@Service +public class SalesAftersalesNoticeDetailServiceImpl implements ISalesAftersalesNoticeDetailService +{ + @Autowired + private SalesAftersalesNoticeDetailMapper salesAftersalesNoticeDetailMapper; + + /** + * 查询售后通知单详情 + * + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return 售后通知单详情 + */ + @Override + public SalesAftersalesNoticeDetail selectSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId) + { + return salesAftersalesNoticeDetailMapper.selectSalesAftersalesNoticeDetailById(aftersalesNoticeDetailId); + } + + /** + * 查询售后通知单详情列表 + * + * @param salesAftersalesNoticeDetail 售后通知单详情 + * @return 售后通知单详情 + */ + @Override + public List selectSalesAftersalesNoticeDetailList(SalesAftersalesNoticeDetail salesAftersalesNoticeDetail) + { + return salesAftersalesNoticeDetailMapper.selectSalesAftersalesNoticeDetailList(salesAftersalesNoticeDetail); + } + + /** + * 新增售后通知单详情 + * + * @param salesAftersalesNoticeDetail 售后通知单详情 + * @return 结果 + */ + @Override + public int insertSalesAftersalesNoticeDetail(SalesAftersalesNoticeDetail salesAftersalesNoticeDetail) + { + String loginName = ShiroUtils.getLoginName(); + salesAftersalesNoticeDetail.setCreateBy(loginName); + salesAftersalesNoticeDetail.setCreateTime(DateUtils.getNowDate()); + return salesAftersalesNoticeDetailMapper.insertSalesAftersalesNoticeDetail(salesAftersalesNoticeDetail); + } + + /** + * 修改售后通知单详情 + * + * @param salesAftersalesNoticeDetail 售后通知单详情 + * @return 结果 + */ + @Override + public int updateSalesAftersalesNoticeDetail(SalesAftersalesNoticeDetail salesAftersalesNoticeDetail) + { + String loginName = ShiroUtils.getLoginName(); + salesAftersalesNoticeDetail.setUpdateBy(loginName); + salesAftersalesNoticeDetail.setUpdateTime(DateUtils.getNowDate()); + return salesAftersalesNoticeDetailMapper.updateSalesAftersalesNoticeDetail(salesAftersalesNoticeDetail); + } + + /** + * 删除售后通知单详情对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteSalesAftersalesNoticeDetailByIds(String ids) + { + return salesAftersalesNoticeDetailMapper.deleteSalesAftersalesNoticeDetailByIds(Convert.toStrArray(ids)); + } + + /** + * 删除售后通知单详情信息 + * + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return 结果 + */ + @Override + public int deleteSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId) + { + return salesAftersalesNoticeDetailMapper.deleteSalesAftersalesNoticeDetailById(aftersalesNoticeDetailId); + } + + /** + * 作废售后通知单详情 + * + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return 结果 + */ + @Override + public int cancelSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId) + { + return salesAftersalesNoticeDetailMapper.cancelSalesAftersalesNoticeDetailById(aftersalesNoticeDetailId); + } + + /** + * 恢复售后通知单详情信息 + * + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return 结果 + */ + @Override + public int restoreSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId) + { + return salesAftersalesNoticeDetailMapper.restoreSalesAftersalesNoticeDetailById(aftersalesNoticeDetailId); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/sales/SalesAftersalesNoticeDetailMapper.xml b/ruoyi-admin/src/main/resources/mapper/sales/SalesAftersalesNoticeDetailMapper.xml new file mode 100644 index 00000000..0411113c --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/sales/SalesAftersalesNoticeDetailMapper.xml @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select aftersales_notice_detail_id, aftersales_notice_code, make_no, sales_order_code, user_id, emergency_degree, aftersales_problem, aftersales_report_url, customer_id, customer_name, sn_code, device_running_number, material_name, material_type, material_photoUrl, material_no, material_brand, material_unit, material_describe, material_process_method, shipped_goods_sum, create_by, create_time, update_by, update_time, remark from sales_aftersales_notice_detail + + + + + + + + insert into sales_aftersales_notice_detail + + aftersales_notice_code, + make_no, + sales_order_code, + user_id, + emergency_degree, + aftersales_problem, + aftersales_report_url, + customer_id, + customer_name, + sn_code, + device_running_number, + material_name, + material_type, + material_photoUrl, + material_no, + material_brand, + material_unit, + material_describe, + material_process_method, + shipped_goods_sum, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{aftersalesNoticeCode}, + #{makeNo}, + #{salesOrderCode}, + #{userId}, + #{emergencyDegree}, + #{aftersalesProblem}, + #{aftersalesReportUrl}, + #{customerId}, + #{customerName}, + #{snCode}, + #{deviceRunningNumber}, + #{materialName}, + #{materialType}, + #{materialPhotourl}, + #{materialNo}, + #{materialBrand}, + #{materialUnit}, + #{materialDescribe}, + #{materialProcessMethod}, + #{shippedGoodsSum}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update sales_aftersales_notice_detail + + aftersales_notice_code = #{aftersalesNoticeCode}, + make_no = #{makeNo}, + sales_order_code = #{salesOrderCode}, + user_id = #{userId}, + emergency_degree = #{emergencyDegree}, + aftersales_problem = #{aftersalesProblem}, + aftersales_report_url = #{aftersalesReportUrl}, + customer_id = #{customerId}, + customer_name = #{customerName}, + sn_code = #{snCode}, + device_running_number = #{deviceRunningNumber}, + material_name = #{materialName}, + material_type = #{materialType}, + material_photoUrl = #{materialPhotourl}, + material_no = #{materialNo}, + material_brand = #{materialBrand}, + material_unit = #{materialUnit}, + material_describe = #{materialDescribe}, + material_process_method = #{materialProcessMethod}, + shipped_goods_sum = #{shippedGoodsSum}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where aftersales_notice_detail_id = #{aftersalesNoticeDetailId} + + + + delete from sales_aftersales_notice_detail where aftersales_notice_detail_id = #{aftersalesNoticeDetailId} + + + + delete from sales_aftersales_notice_detail where aftersales_notice_detail_id in + + #{aftersalesNoticeDetailId} + + + + + update sales_aftersales_notice_detail set del_flag = '1' where aftersales_notice_detail_id = #{aftersalesNoticeDetailId} + + + + update sales_aftersales_notice_detail set del_flag = '0' where aftersales_notice_detail_id = #{aftersalesNoticeDetailId} + + + \ No newline at end of file From 4ea543a6ae44e9748cc7556f2a17cf9a9afcbd0c Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Mon, 22 Jul 2024 15:08:52 +0800 Subject: [PATCH 2/3] =?UTF-8?q?[feat]=20=E9=94=80=E5=94=AE=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E6=96=B0=E5=A2=9E=E9=94=80=E5=94=AE=E5=8F=91?= =?UTF-8?q?=E8=B5=B7=E5=94=AE=E5=90=8E=E9=80=89=E6=8B=A9=E8=AE=BE=E5=A4=87?= =?UTF-8?q?Vo=E7=B1=BB=20=E6=96=B0=E5=A2=9E=E9=94=80=E5=94=AE=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E5=8F=91=E8=B5=B7=E5=94=AE=E5=90=8E=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=20=E6=96=B0=E5=A2=9E=E9=94=80=E5=94=AE?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=8F=91=E8=B5=B7=E5=94=AE=E5=90=8E=E7=89=A9?= =?UTF-8?q?=E6=96=99=E9=80=89=E6=8B=A9=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=20=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=94=AE=E5=90=8E=E9=80=89=E6=8B=A9=E8=AE=BE=E5=A4=87Vo?= =?UTF-8?q?=E7=B1=BB=E9=9B=86=E5=90=88=E6=88=90=E5=91=98=E5=8F=98=E9=87=8F?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E6=A0=B9=E6=8D=AE=E9=94=80=E5=94=AE?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=9F=A5=E8=AF=A2=E9=94=80=E5=94=AE=E5=AD=90?= =?UTF-8?q?=E8=A1=A8=E6=95=B0=E6=8D=AE=E9=9B=86=E5=90=88=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8F=91=E8=B5=B7=E5=94=AE=E5=90=8E=E5=90=8E?= =?UTF-8?q?=E7=AB=AF=E6=8E=A5=E5=8F=A3=20=E9=94=80=E5=94=AE=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E6=96=B0=E5=A2=9E=E5=8F=91=E8=B5=B7=E5=94=AE=E5=90=8E?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E9=94=80=E5=94=AE=E5=8D=95=E5=8F=B7=E6=9C=89?= =?UTF-8?q?=E5=85=B3=E7=9A=84=E7=89=A9=E6=96=99=E4=BF=A1=E6=81=AF=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3=20=E9=94=80?= =?UTF-8?q?=E5=94=AE=E5=8F=91=E8=B5=B7=E5=94=AE=E5=90=8E=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BF=AE=E6=94=B9=E4=BF=9D=E5=AD=98=E5=8F=91?= =?UTF-8?q?=E8=B5=B7=E5=94=AE=E5=90=8E=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=20=E9=94=80=E5=94=AE=E5=8F=91=E8=B5=B7=E5=94=AE=E5=90=8E?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=96=B0=E5=A2=9E=E6=9F=A5=E6=89=BE=E4=B8=8E?= =?UTF-8?q?=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E5=8F=B7=E6=9C=89=E5=85=B3?= =?UTF-8?q?=E7=9A=84=E7=89=A9=E6=96=99=E4=BF=A1=E6=81=AF=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?=E5=87=BA=E8=B4=A7=E5=92=8C=E5=94=AE=E5=90=8E=E6=9D=83=E9=99=90?= =?UTF-8?q?=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SalesAftersalesNoticeController.java | 35 +++ .../ISalesAftersalesNoticeService.java | 6 + .../SalesAftersalesNoticeServiceImpl.java | 40 ++- .../controller/SysSalesOrderController.java | 23 ++ .../ruoyi/system/domain/SysSalesOrder.java | 12 + .../domain/Vo/SelectAftersalesNoticeVO.java | 88 ++++++ .../system/SysSalesOrderChildMapper.xml | 2 +- .../system/salesOrder/salesOrder.html | 18 +- .../system/salesOrder/startAftersales.html | 283 ++++++++++++++++++ .../startAftersalesMaterialSelect.html | 86 ++++++ 10 files changed, 585 insertions(+), 8 deletions(-) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/SelectAftersalesNoticeVO.java create mode 100644 ruoyi-admin/src/main/resources/templates/system/salesOrder/startAftersales.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/salesOrder/startAftersalesMaterialSelect.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesAftersalesNoticeController.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesAftersalesNoticeController.java index 9beb6b1b..c7ca877a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesAftersalesNoticeController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesAftersalesNoticeController.java @@ -5,7 +5,11 @@ import java.util.List; import com.ruoyi.aftersales.service.IAftersalesOrderService; import com.ruoyi.process.general.service.IProcessService; +import com.ruoyi.quality.domain.VO.CheckoutMaterialVO; import com.ruoyi.sales.domain.VO.SalesAftersalesNoticeVO; +import com.ruoyi.system.domain.SysSalesOrder; +import com.ruoyi.system.domain.Vo.SelectAftersalesNoticeVO; +import com.ruoyi.system.service.ISysSalesOrderService; import org.activiti.engine.RuntimeService; import org.activiti.engine.TaskService; import org.activiti.engine.runtime.ProcessInstance; @@ -55,6 +59,9 @@ public class SalesAftersalesNoticeController extends BaseController @Autowired private IAftersalesOrderService aftersalesOrderService; + @Autowired + private ISysSalesOrderService sysSalesOrderService; + @RequiresPermissions("sales:afterSalesNotice:view") @GetMapping() @@ -115,6 +122,34 @@ public class SalesAftersalesNoticeController extends BaseController } + /** + * 修改保存发起售后 + */ + @RequiresPermissions("sales:afterSalesNotice:startAftersales") + @Log(title = "销售售后通知", businessType = BusinessType.UPDATE) + @PostMapping("/startAftersales") + @ResponseBody + public AjaxResult startAftersalesSave(@RequestBody SysSalesOrder sysSalesOrder) + { + + return AjaxResult.success(); + } + + + + + /** + * 查找与销售订单号有关的物料信息 + * */ + @ResponseBody + @PostMapping("/getMaterialInfoBySalesOrderCode") + public TableDataInfo getMaterialInfoBySalesOrderCode(@RequestParam String salesOrderCode){ + startPage(); + List list = salesAftersalesNoticeService.selectMaterialInfoBySalesOrderCode(salesOrderCode); + return getDataTable(list); + } + + /** * 加载审批弹窗 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesAftersalesNoticeService.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesAftersalesNoticeService.java index 92208f86..3c0e5ceb 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesAftersalesNoticeService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesAftersalesNoticeService.java @@ -5,6 +5,7 @@ import java.util.List; import com.ruoyi.aftersales.domain.AftersalesOrder; import com.ruoyi.sales.domain.SalesAftersalesNotice; import com.ruoyi.sales.domain.VO.SalesAftersalesNoticeVO; +import com.ruoyi.system.domain.Vo.SelectAftersalesNoticeVO; import org.activiti.engine.runtime.ProcessInstance; /** @@ -88,4 +89,9 @@ public interface ISalesAftersalesNoticeService * 根据售后单号查询销售售后通知单 * */ SalesAftersalesNoticeVO selectSalesAftersalesNoticeByCode(String aftersalesNoticeCode); + + /** + * 根据销售单号查询售后通知单Vo类 + * */ + List selectMaterialInfoBySalesOrderCode(String salesOrderCode); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesAftersalesNoticeServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesAftersalesNoticeServiceImpl.java index 5270a0b6..2b7322f6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesAftersalesNoticeServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesAftersalesNoticeServiceImpl.java @@ -1,9 +1,6 @@ package com.ruoyi.sales.service.impl; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; import com.github.pagehelper.Page; import com.ruoyi.common.core.domain.entity.SysUser; @@ -16,8 +13,12 @@ import com.ruoyi.common.utils.StringUtils; import com.ruoyi.process.general.service.IProcessService; import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper; import com.ruoyi.sales.domain.VO.SalesAftersalesNoticeVO; +import com.ruoyi.system.domain.SysSalesOrderChild; +import com.ruoyi.system.domain.Vo.SelectAftersalesNoticeVO; +import com.ruoyi.system.mapper.SysSalesOrderChildMapper; import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.service.ISysRoleService; +import lombok.extern.slf4j.Slf4j; import org.activiti.engine.TaskService; import org.activiti.engine.impl.persistence.entity.TaskEntityImpl; import org.activiti.engine.runtime.ProcessInstance; @@ -29,6 +30,7 @@ import com.ruoyi.sales.domain.SalesAftersalesNotice; import com.ruoyi.sales.service.ISalesAftersalesNoticeService; import com.ruoyi.common.core.text.Convert; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; /** * 售后通知单Service业务层处理 @@ -36,6 +38,8 @@ import org.springframework.transaction.annotation.Transactional; * @author 刘晓旭 * @date 2024-04-15 */ + +@Slf4j @Service public class SalesAftersalesNoticeServiceImpl implements ISalesAftersalesNoticeService { @@ -60,6 +64,8 @@ public class SalesAftersalesNoticeServiceImpl implements ISalesAftersalesNoticeS @Autowired private BizTodoItemMapper todoItemMapper; + @Autowired + private SysSalesOrderChildMapper sysSalesOrderChildMapper; /** * 查询售后通知单 @@ -251,6 +257,32 @@ public class SalesAftersalesNoticeServiceImpl implements ISalesAftersalesNoticeS return salesAftersalesNoticeMapper.selectSalesAftersalesNoticeByCode(aftersalesNoticeCode); } + /** + * 根据销售单号查询售后通知单Vo类 + * */ + @Override + public List selectMaterialInfoBySalesOrderCode(String salesOrderCode) { + + ArrayList selectAftersalesNoticeVOS = new ArrayList<>(); + List sysSalesOrderChildList = sysSalesOrderChildMapper.selectOrderChildListBySalesOrderCode(salesOrderCode); + if (CollectionUtils.isEmpty(sysSalesOrderChildList)){ + log.warn("与销售订单子表关联的销售单号为空:{}",salesOrderCode); + } + for (SysSalesOrderChild sysSalesOrderChild : sysSalesOrderChildList) { + SelectAftersalesNoticeVO selectAftersalesNoticeVO = new SelectAftersalesNoticeVO(); + selectAftersalesNoticeVO.setMaterialNo(sysSalesOrderChild.getMaterialCode()); + selectAftersalesNoticeVO.setMaterialName(sysSalesOrderChild.getMaterialName()); + selectAftersalesNoticeVO.setMaterialBrand(sysSalesOrderChild.getBrand()); + selectAftersalesNoticeVO.setMaterialType(sysSalesOrderChild.getMaterialType()); + selectAftersalesNoticeVO.setMaterialUnit(sysSalesOrderChild.getUnit()); + selectAftersalesNoticeVO.setMaterialProcessMethod(sysSalesOrderChild.getProcessMethod()); + selectAftersalesNoticeVO.setMaterialDescribe(sysSalesOrderChild.getDescribe()); + selectAftersalesNoticeVO.setShippedGoodsSum(sysSalesOrderChild.getOutBoundQuantity()); + selectAftersalesNoticeVOS.add(selectAftersalesNoticeVO); + } + return selectAftersalesNoticeVOS; + } + /** * 创建售后单审核流程 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java index 45a0289d..15c48c7a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java @@ -559,4 +559,27 @@ public class SysSalesOrderController extends BaseController List list = sysSalesOrderChildService.selectOrderChildListBySalesOrderCode(salesOrderCode); return getDataTable(list) ; } + + /** + * 发起售后 + */ + @GetMapping("/startAftersales/{salesOrderId}") + public String startAftersales(@PathVariable("salesOrderId") Long salesOrderId, ModelMap mmap) + { + SysSalesOrder sysSalesOrder = sysSalesOrderService.selectSysSalesOrderById(salesOrderId); + mmap.put("sysSalesOrder", sysSalesOrder); + return prefix + "/startAftersales"; + } + + + /** + * 发起售后加载销售单号有关的物料信息弹窗 + */ + @GetMapping("/startAftersalesMaterialSelect") + public String materialSelect(@RequestParam String salesOrderCode, ModelMap modelMap) + { + modelMap.put("salesOrderCode",salesOrderCode); + return prefix + "/startAftersalesMaterialSelect"; + } + } \ No newline at end of file diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java index bfc77b27..65b06c5e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java @@ -1,6 +1,7 @@ package com.ruoyi.system.domain; import com.google.common.base.Objects; +import com.ruoyi.system.domain.Vo.SelectAftersalesNoticeVO; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; @@ -161,6 +162,9 @@ public class SysSalesOrder extends BaseEntity { private List sysSalesOrderChildList; + + private List selectAftersalesNoticeVOList; + public Long getSalesOrderId() { return salesOrderId; } @@ -657,6 +661,14 @@ public class SysSalesOrder extends BaseEntity { this.sysSalesOrderChildList = sysSalesOrderChildList; } + public List getSelectAftersalesNoticeVOList() { + return selectAftersalesNoticeVOList; + } + + public void setSelectAftersalesNoticeVOList(List selectAftersalesNoticeVOList) { + this.selectAftersalesNoticeVOList = selectAftersalesNoticeVOList; + } + @Override public String toString() { return Objects.toStringHelper(this) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/SelectAftersalesNoticeVO.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/SelectAftersalesNoticeVO.java new file mode 100644 index 00000000..68382592 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/SelectAftersalesNoticeVO.java @@ -0,0 +1,88 @@ +package com.ruoyi.system.domain.Vo; + +import com.ruoyi.common.annotation.Excel; +import lombok.Data; + +@Data +/*销售发起售后选择设备*/ +public class SelectAftersalesNoticeVO { + private static final long serialVersionUID = 1L; + + /** 售后通知单详情ID */ + private Long aftersalesNoticeDetailId; + + /** 售后通知单号 */ + @Excel(name = "售后通知单号") + private String aftersalesNoticeCode; + + /** 关联生产订单号 */ + private String makeNo; + + /** 关联销售订单编号 */ + private String salesOrderCode; + + /** 用户ID */ + private Long userId; + + /** 紧急程度(0一般、1紧急) */ + @Excel(name = "紧急程度", readConverterExp = "0=一般、1紧急") + private String emergencyDegree; + + /** 售后问题 */ + @Excel(name = "售后问题") + private String aftersalesProblem; + + /** 报告问题 */ + @Excel(name = "报告问题") + private String aftersalesReportUrl; + + /** 客户ID */ + private String customerId; + + /** 客户名称 */ + private String customerName; + + /** SN号(产品序列号) */ + @Excel(name = "SN号", readConverterExp = "产=品序列号") + private String snCode; + + /** 设备流水号 */ + @Excel(name = "设备流水号") + private String deviceRunningNumber; + + /** 物料名称 */ + @Excel(name = "物料名称") + private String materialName; + + /** 物料类型 */ + @Excel(name = "物料类型") + private String materialType; + + /** 物料图片地址 */ + @Excel(name = "物料图片地址") + private String materialPhotourl; + + /** 料号 */ + @Excel(name = "料号") + private String materialNo; + + /** 物料品牌 */ + @Excel(name = "物料品牌") + private String materialBrand; + + /** 物料单位 */ + @Excel(name = "物料单位") + private String materialUnit; + + /** 物料描述 */ + @Excel(name = "物料描述") + private String materialDescribe; + + /** 物料加工方式 */ + @Excel(name = "物料加工方式") + private String materialProcessMethod; + + /** 已出库数量 */ + @Excel(name = "已出库数量") + private Integer shippedGoodsSum; +} diff --git a/ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml index 718ef843..899044ef 100644 --- a/ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml @@ -90,7 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html b/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html index 264c8800..9baf81f5 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html @@ -196,6 +196,10 @@ diff --git a/ruoyi-admin/src/main/resources/templates/system/salesOrder/startAftersales.html b/ruoyi-admin/src/main/resources/templates/system/salesOrder/startAftersales.html new file mode 100644 index 00000000..bf3b8505 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/startAftersales.html @@ -0,0 +1,283 @@ + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+ 选择物料 + + 选择物料 + +
+
+
+
+
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/salesOrder/startAftersalesMaterialSelect.html b/ruoyi-admin/src/main/resources/templates/system/salesOrder/startAftersalesMaterialSelect.html new file mode 100644 index 00000000..d1f04c36 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/startAftersalesMaterialSelect.html @@ -0,0 +1,86 @@ + + + + + + +
+
+
+
+
+
+
+ + + + \ No newline at end of file From ac16acdee51c9d6c1aa3dd39a21166de19566e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=99=93=E8=BF=AA?= <2596750866@qq.com> Date: Mon, 22 Jul 2024 15:44:40 +0800 Subject: [PATCH 3/3] =?UTF-8?q?[fix]=20=E5=9F=BA=E7=A1=80=E8=B5=84?= =?UTF-8?q?=E6=96=99=20=E5=91=98=E5=B7=A5=E9=A2=86=E6=96=99=E5=8D=95=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9mapper=E6=96=87=E4=BB=B6=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=AE=9E=E4=BD=93=E7=B1=BB=E5=AD=97=E6=AE=B5=EF=BC=8C=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E3=80=81=E6=8F=92=E5=85=A5=E8=AE=B0=E5=BD=95=E7=9A=84?= =?UTF-8?q?=E6=96=B9=E6=B3=95=20=E4=BF=AE=E6=94=B9=E5=91=98=E5=B7=A5?= =?UTF-8?q?=E9=A2=86=E6=96=99=E6=96=B0=E5=A2=9E=E3=80=81=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=96=B9=E6=B3=95=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E9=A2=86=E6=96=99=E4=BF=A1=E6=81=AF=E6=96=B9=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=90=8C=E6=97=B6=E6=9F=A5=E8=AF=A2=E9=A2=86?= =?UTF-8?q?=E6=96=99=E8=AF=A6=E6=83=85=E5=88=97=E8=A1=A8=E7=9A=84=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=9B=20=E4=BF=AE=E6=94=B9=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=91=98=E5=B7=A5=E9=A2=86=E6=96=99=E5=8D=95=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=AE=A1=E6=A0=B8=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E5=86=85=E5=AE=B9=EF=BC=9B=20=E4=BF=AE=E6=94=B9=E5=91=98?= =?UTF-8?q?=E5=B7=A5=E9=A2=86=E6=96=99=E5=8D=95=E8=AF=A6=E6=83=85=E7=B1=BB?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=AE=A1=E6=A0=B8=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=9B=20=E4=BF=AE=E6=94=B9=E5=91=98?= =?UTF-8?q?=E5=B7=A5=E9=A2=86=E6=96=99=E5=8D=95=E8=AF=A6=E6=83=85mapper?= =?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=A2=9E=E6=8C=89=E9=A2=86=E6=96=99=E5=8D=95?= =?UTF-8?q?=E5=8F=B7=E6=89=B9=E9=87=8F=E6=9F=A5=E8=AF=A2=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=9A=84=E6=96=B9=E6=B3=95=EF=BC=9B=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=91=98=E5=B7=A5=E9=A2=86=E6=96=99=E5=90=8E?= =?UTF-8?q?=E7=AB=AF=E6=8E=A5=E5=8F=A3=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E5=AE=A1=E6=A0=B8=E5=BC=B9=E7=AA=97=E3=80=81=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E4=BB=BB=E5=8A=A1=E7=9A=84=E5=A4=84=E7=90=86=E6=96=B9?= =?UTF-8?q?=E6=B3=95=EF=BC=9B=20=E4=BF=AE=E6=94=B9=E5=91=98=E5=B7=A5?= =?UTF-8?q?=E9=A2=86=E6=96=99=E8=AF=A6=E6=83=85=E9=A1=B5=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=98=BE=E7=A4=BA=E9=A2=86=E6=96=99=E5=8D=95=E5=85=B3?= =?UTF-8?q?=E8=81=94=E5=AD=90=E8=A1=A8=E4=BF=A1=E6=81=AF=E7=9A=84=E6=96=B9?= =?UTF-8?q?=E6=B3=95=EF=BC=9B=20[feat]=20=E5=9F=BA=E7=A1=80=E8=B5=84?= =?UTF-8?q?=E6=96=99=20=E5=91=98=E5=B7=A5=E9=A2=86=E6=96=99=E5=8D=95=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=91=98=E5=B7=A5=E9=A2=86=E6=96=99VO?= =?UTF-8?q?=E5=AE=9E=E4=BD=93=E7=B1=BB=20=E6=96=B0=E5=A2=9E=E5=A7=94?= =?UTF-8?q?=E5=A4=96=E9=A2=86=E6=96=99=E5=A7=94=E5=A4=96=E7=BB=8F=E7=90=86?= =?UTF-8?q?=E3=80=81=E5=A7=94=E5=A4=96=E4=B8=BB=E7=AE=A1=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BaseEmpRequisiteOrderController.java | 124 +++++++-- .../domain/BaseEmpRequisiteOrderChild.java | 2 +- .../domain/Vo/BaseEmpRequisiteOrderVO.java | 33 +++ .../BaseEmpRequisiteOrderChildMapper.java | 8 +- .../mapper/BaseEmpRequisiteOrderMapper.java | 15 +- .../IBaseEmpRequisiteOrderService.java | 22 +- .../BaseEmpRequisiteOrderServiceImpl.java | 236 +++++++++++++++--- .../BaseEmpRequisiteOrderChildMapper.xml | 13 +- .../system/BaseEmpRequisiteOrderMapper.xml | 44 +++- .../mapper/system/OutsourceQuoteMapper.xml | 1 - .../system/empRequisiteOrder/add.html | 63 ++++- .../system/empRequisiteOrder/detail.html | 1 + .../empRequisiteOrder/empRequisiteOrder.html | 18 ++ .../empRequisiteOrder/taskScjlVerify.html | 153 ++++++++++++ .../empRequisiteOrder/taskSczgVerify.html | 151 +++++++++++ 15 files changed, 793 insertions(+), 91 deletions(-) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/BaseEmpRequisiteOrderVO.java create mode 100644 ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/taskScjlVerify.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/taskSczgVerify.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseEmpRequisiteOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseEmpRequisiteOrderController.java index 313b3e7d..0782c271 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseEmpRequisiteOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseEmpRequisiteOrderController.java @@ -1,15 +1,21 @@ package com.ruoyi.system.controller; +import java.util.HashMap; import java.util.List; + +import com.ruoyi.process.general.service.IProcessService; +import com.ruoyi.system.domain.Vo.BaseEmpRequisiteOrderVO; +import com.ruoyi.system.domain.Vo.OutsourceQuoteVO; +import org.activiti.engine.RuntimeService; +import org.activiti.engine.TaskService; +import org.activiti.engine.runtime.ProcessInstance; +import org.activiti.engine.task.Task; +import org.apache.commons.lang3.BooleanUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.*; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.system.domain.BaseEmpRequisiteOrder; @@ -19,6 +25,9 @@ import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + /** * 员工领料单Controller * @@ -34,6 +43,15 @@ public class BaseEmpRequisiteOrderController extends BaseController @Autowired private IBaseEmpRequisiteOrderService baseEmpRequisiteOrderService; + @Autowired + private TaskService taskService; + + @Autowired + private RuntimeService runtimeService; + + @Autowired + private IProcessService processService; + @RequiresPermissions("system:empRequisiteOrder:view") @GetMapping() public String empRequisiteOrder() @@ -47,10 +65,10 @@ public class BaseEmpRequisiteOrderController extends BaseController @RequiresPermissions("system:empRequisiteOrder:list") @PostMapping("/list") @ResponseBody - public TableDataInfo list(BaseEmpRequisiteOrder baseEmpRequisiteOrder) + public TableDataInfo list(BaseEmpRequisiteOrderVO baseEmpRequisiteOrderVO) { startPage(); - List list = baseEmpRequisiteOrderService.selectBaseEmpRequisiteOrderList(baseEmpRequisiteOrder); + List list = baseEmpRequisiteOrderService.selectBaseEmpRequisiteOrderList(baseEmpRequisiteOrderVO); return getDataTable(list); } @@ -61,10 +79,10 @@ public class BaseEmpRequisiteOrderController extends BaseController @Log(title = "员工领料单", businessType = BusinessType.EXPORT) @PostMapping("/export") @ResponseBody - public AjaxResult export(BaseEmpRequisiteOrder baseEmpRequisiteOrder) + public AjaxResult export(BaseEmpRequisiteOrderVO baseEmpRequisiteOrderVO) { - List list = baseEmpRequisiteOrderService.selectBaseEmpRequisiteOrderList(baseEmpRequisiteOrder); - ExcelUtil util = new ExcelUtil(BaseEmpRequisiteOrder.class); + List list = baseEmpRequisiteOrderService.selectBaseEmpRequisiteOrderList(baseEmpRequisiteOrderVO); + ExcelUtil util = new ExcelUtil(BaseEmpRequisiteOrderVO.class); return util.exportExcel(list, "员工领料单数据"); } @@ -84,9 +102,87 @@ public class BaseEmpRequisiteOrderController extends BaseController @Log(title = "员工领料单", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody - public AjaxResult addSave(BaseEmpRequisiteOrder baseEmpRequisiteOrder) + public AjaxResult addSave(@RequestBody BaseEmpRequisiteOrderVO baseEmpRequisiteOrderVO) { - return toAjax(baseEmpRequisiteOrderService.insertBaseEmpRequisiteOrder(baseEmpRequisiteOrder)); + // 审核状态-待审核 + baseEmpRequisiteOrderVO.setAuditStatus("0"); + baseEmpRequisiteOrderService.submitApply(baseEmpRequisiteOrderVO); + return AjaxResult.success(); + } + /** + * 加载审批弹窗 + * @param taskId + * @param mmap + * @return + */ + @GetMapping("/showVerifyDialog/{taskId}") + public String showVerifyDialog(@PathVariable("taskId") String taskId, ModelMap mmap) { + Task task = taskService.createTaskQuery().taskId(taskId).singleResult(); + String processInstanceId = task.getProcessInstanceId(); + ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult(); + BaseEmpRequisiteOrderVO baseEmpRequisiteOrderVO = baseEmpRequisiteOrderService.selectBaseEmpRequisiteOrderById(new Long(processInstance.getBusinessKey())); + mmap.put("formData", baseEmpRequisiteOrderVO); + mmap.put("taskId", taskId); + String verifyName = task.getTaskDefinitionKey().substring(0, 1).toUpperCase() + task.getTaskDefinitionKey().substring(1); + return prefix + "/task" + verifyName; + } + /** + * 自动绑定页面字段 + */ + @ModelAttribute("preloadObj") + public BaseEmpRequisiteOrderVO getObj(@RequestParam(value = "requisiteId", required = false) Long baseEmpRequisiteOrderId, HttpSession session) { + if (baseEmpRequisiteOrderId != null) { + + return baseEmpRequisiteOrderService.selectBaseEmpRequisiteOrderById(baseEmpRequisiteOrderId); + } + return new BaseEmpRequisiteOrderVO(); + } + /** + * 完成任务 + * + * @return + */ + @RequestMapping(value = "/complete/{taskId}", method = {RequestMethod.POST, RequestMethod.GET}) + @ResponseBody + public AjaxResult complete(@PathVariable("taskId") String taskId, @RequestParam(value = "saveEntity", required = false) String saveEntity, + @ModelAttribute("preloadObj") BaseEmpRequisiteOrderVO baseEmpRequisiteOrderVO, HttpServletRequest request) { + boolean saveEntityBoolean = BooleanUtils.toBoolean(saveEntity); + //获取实例id + String instanceId = baseEmpRequisiteOrderVO.getInstanceId(); + //获取实例类型 + String instanceType = baseEmpRequisiteOrderVO.getInstanceType(); + boolean approvedFlag = processService.complete(taskId, instanceId, baseEmpRequisiteOrderVO.getApplyTitle(), baseEmpRequisiteOrderVO.getRequisitieCode(), "requisition", new HashMap(), request); + if(!approvedFlag){ + // 审核状态-审核拒绝 + baseEmpRequisiteOrderVO.setAuditStatus("2"); + } + // 如果任务已结束更新业务表状态 + boolean processIsFinish = processService.judgeProcessIsFinish(instanceId); + if (processIsFinish) { + // 审核通过 + baseEmpRequisiteOrderVO.setAuditStatus("1"); + // 提交 + if("submit".equals(instanceType)){ + // 使用状态-是 +// erpBomVo.setUseStatus("1"); + } + // 作废 + else if("cancel".equals(instanceType)){ + // 使用状态-已作废 +// erpBomVo.setUseStatus("2"); + } + // 恢复 + else if("restore".equals(instanceType)){ + // 使用状态-是 +// erpBomVo.setUseStatus("1"); + } + } + baseEmpRequisiteOrderService.updateBaseEmpRequisiteOrder(baseEmpRequisiteOrderVO); + // 驳回申请后继续申请,可能修改表单 + if (saveEntityBoolean) { + baseEmpRequisiteOrderService.updateBaseEmpRequisiteOrder(baseEmpRequisiteOrderVO); + } + return success("任务已完成"); } /** @@ -114,9 +210,9 @@ public class BaseEmpRequisiteOrderController extends BaseController @Log(title = "员工领料单", businessType = BusinessType.UPDATE) @PostMapping("/edit") @ResponseBody - public AjaxResult editSave(BaseEmpRequisiteOrder baseEmpRequisiteOrder) + public AjaxResult editSave(BaseEmpRequisiteOrderVO baseEmpRequisiteOrderVO) { - return toAjax(baseEmpRequisiteOrderService.updateBaseEmpRequisiteOrder(baseEmpRequisiteOrder)); + return toAjax(baseEmpRequisiteOrderService.updateBaseEmpRequisiteOrder(baseEmpRequisiteOrderVO)); } /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseEmpRequisiteOrderChild.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseEmpRequisiteOrderChild.java index c2d7eaad..3baa939e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseEmpRequisiteOrderChild.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseEmpRequisiteOrderChild.java @@ -87,7 +87,7 @@ public class BaseEmpRequisiteOrderChild extends BaseEntity @Excel(name = "审核状态") private String auditStatus; - public void setRequisitioningChildId(Long requisitioningChildId) + public void setRequisitioningChildId(Long requisitioningChildId) { this.requisitioningChildId = requisitioningChildId; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/BaseEmpRequisiteOrderVO.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/BaseEmpRequisiteOrderVO.java new file mode 100644 index 00000000..8479802f --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/BaseEmpRequisiteOrderVO.java @@ -0,0 +1,33 @@ +package com.ruoyi.system.domain.Vo; + +import com.ruoyi.system.domain.BaseEmpRequisiteOrder; +import lombok.Data; + +import java.util.Date; + +@Data +public class BaseEmpRequisiteOrderVO extends BaseEmpRequisiteOrder { + + private static final long serialVersionUID = 1L; + /** 申请人姓名 */ + private String applyUserName; + /** 任务ID */ + private String taskId; + /** 任务名称 */ + private String taskName; + /** 办理时间 */ + private Date doneTime; + /** 创建人 */ + private String createUserName; + /** 流程实例状态 1 激活 2 挂起 */ + private String suspendState; + /** 待办用户id */ + private String todoUserId; + /** 流程实例类型名称 */ + private String instanceTypeName; + + /** + * 关键词 + */ + private String keyword; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseEmpRequisiteOrderChildMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseEmpRequisiteOrderChildMapper.java index c5fb7d76..487f532a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseEmpRequisiteOrderChildMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseEmpRequisiteOrderChildMapper.java @@ -18,7 +18,13 @@ public interface BaseEmpRequisiteOrderChildMapper * @return 员工单领料单物料信息 */ public BaseEmpRequisiteOrderChild selectBaseEmpRequisiteOrderChildById(Long requisitioningChildId); - + /** + * 查询员工单领料单物料信息 + * + * @param requisitioningCode 员工单领料单号 + * @return 员工单领料单物料信息 + */ + public List selectBaseEmpRequisiteOrderChildByCode(String requisitioningCode); /** * 查询员工单领料单物料信息列表 * diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseEmpRequisiteOrderMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseEmpRequisiteOrderMapper.java index 49b1551d..4cb0d559 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseEmpRequisiteOrderMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/BaseEmpRequisiteOrderMapper.java @@ -2,6 +2,7 @@ package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.system.domain.BaseEmpRequisiteOrder; +import com.ruoyi.system.domain.Vo.BaseEmpRequisiteOrderVO; /** * 员工领料单Mapper接口 @@ -17,31 +18,31 @@ public interface BaseEmpRequisiteOrderMapper * @param requisiteId 员工领料单ID * @return 员工领料单 */ - public BaseEmpRequisiteOrder selectBaseEmpRequisiteOrderById(Long requisiteId); + public BaseEmpRequisiteOrderVO selectBaseEmpRequisiteOrderById(Long requisiteId); /** * 查询员工领料单列表 * - * @param baseEmpRequisiteOrder 员工领料单 + * @param baseEmpRequisiteOrderVO 员工领料单 * @return 员工领料单集合 */ - public List selectBaseEmpRequisiteOrderList(BaseEmpRequisiteOrder baseEmpRequisiteOrder); + public List selectBaseEmpRequisiteOrderList(BaseEmpRequisiteOrderVO baseEmpRequisiteOrderVO); /** * 新增员工领料单 * - * @param baseEmpRequisiteOrder 员工领料单 + * @param baseEmpRequisiteOrderVO 员工领料单 * @return 结果 */ - public int insertBaseEmpRequisiteOrder(BaseEmpRequisiteOrder baseEmpRequisiteOrder); + public int insertBaseEmpRequisiteOrder(BaseEmpRequisiteOrderVO baseEmpRequisiteOrderVO); /** * 修改员工领料单 * - * @param baseEmpRequisiteOrder 员工领料单 + * @param baseEmpRequisiteOrderVO 员工领料单 * @return 结果 */ - public int updateBaseEmpRequisiteOrder(BaseEmpRequisiteOrder baseEmpRequisiteOrder); + public int updateBaseEmpRequisiteOrder(BaseEmpRequisiteOrderVO baseEmpRequisiteOrderVO); /** * 删除员工领料单 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseEmpRequisiteOrderService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseEmpRequisiteOrderService.java index 3197ff7c..7508dd7d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseEmpRequisiteOrderService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseEmpRequisiteOrderService.java @@ -2,6 +2,9 @@ package com.ruoyi.system.service; import java.util.List; import com.ruoyi.system.domain.BaseEmpRequisiteOrder; +import com.ruoyi.system.domain.Vo.BaseEmpRequisiteOrderVO; +import com.ruoyi.system.domain.Vo.OutsourceQuoteVO; +import org.activiti.engine.runtime.ProcessInstance; /** * 员工领料单Service接口 @@ -17,31 +20,31 @@ public interface IBaseEmpRequisiteOrderService * @param requisiteId 员工领料单ID * @return 员工领料单 */ - public BaseEmpRequisiteOrder selectBaseEmpRequisiteOrderById(Long requisiteId); + public BaseEmpRequisiteOrderVO selectBaseEmpRequisiteOrderById(Long requisiteId); /** * 查询员工领料单列表 * - * @param baseEmpRequisiteOrder 员工领料单 + * @param baseEmpRequisiteOrderVO 员工领料单 * @return 员工领料单集合 */ - public List selectBaseEmpRequisiteOrderList(BaseEmpRequisiteOrder baseEmpRequisiteOrder); + public List selectBaseEmpRequisiteOrderList(BaseEmpRequisiteOrderVO baseEmpRequisiteOrderVO); /** * 新增员工领料单 * - * @param baseEmpRequisiteOrder 员工领料单 + * @param baseEmpRequisiteOrderVO 员工领料单 * @return 结果 */ - public int insertBaseEmpRequisiteOrder(BaseEmpRequisiteOrder baseEmpRequisiteOrder); + public int insertBaseEmpRequisiteOrder(BaseEmpRequisiteOrderVO baseEmpRequisiteOrderVO); /** * 修改员工领料单 * - * @param baseEmpRequisiteOrder 员工领料单 + * @param baseEmpRequisiteOrderVO 员工领料单 * @return 结果 */ - public int updateBaseEmpRequisiteOrder(BaseEmpRequisiteOrder baseEmpRequisiteOrder); + public int updateBaseEmpRequisiteOrder(BaseEmpRequisiteOrderVO baseEmpRequisiteOrderVO); /** * 批量删除员工领料单 @@ -74,4 +77,9 @@ public interface IBaseEmpRequisiteOrderService int restoreBaseEmpRequisiteOrderById(Long requisiteId); Object getId(); + + /** + * 审批流程启动 + * */ + ProcessInstance submitApply(BaseEmpRequisiteOrderVO baseEmpRequisiteOrderVO); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseEmpRequisiteOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseEmpRequisiteOrderServiceImpl.java index 0438a4d9..02fd2a5c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseEmpRequisiteOrderServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseEmpRequisiteOrderServiceImpl.java @@ -2,15 +2,33 @@ package com.ruoyi.system.service.impl; import java.math.BigDecimal; import java.math.RoundingMode; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import java.util.Set; +import com.github.pagehelper.Page; +import com.ruoyi.common.core.domain.entity.SysUser; +import com.ruoyi.common.core.page.PageDomain; +import com.ruoyi.common.core.page.TableSupport; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; +import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.process.general.service.IProcessService; +import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper; import com.ruoyi.system.domain.BaseEmpRequisiteOrderChild; import com.ruoyi.system.domain.BaseRequisitioningOrderChild; +import com.ruoyi.system.domain.Vo.BaseEmpRequisiteOrderVO; +import com.ruoyi.system.domain.Vo.OutsourceQuoteVO; import com.ruoyi.system.mapper.BaseEmpRequisiteOrderChildMapper; +import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.service.ISysUserService; +import org.activiti.engine.RuntimeService; +import org.activiti.engine.TaskService; +import org.activiti.engine.impl.persistence.entity.TaskEntityImpl; +import org.activiti.engine.runtime.ProcessInstance; +import org.activiti.engine.task.Task; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.system.mapper.BaseEmpRequisiteOrderMapper; @@ -39,6 +57,24 @@ public class BaseEmpRequisiteOrderServiceImpl implements IBaseEmpRequisiteOrderS @Autowired private ISysUserService userService; + @Autowired + private SysRoleServiceImpl roleService; + + @Autowired + private TaskService taskService; + + @Autowired + private RuntimeService runtimeService; + + @Autowired + private BizTodoItemMapper todoItemMapper; + + @Autowired + private SysUserMapper userMapper; + + @Autowired + private IProcessService processService; + /** * 查询员工领料单 * @@ -46,46 +82,102 @@ public class BaseEmpRequisiteOrderServiceImpl implements IBaseEmpRequisiteOrderS * @return 员工领料单 */ @Override - public BaseEmpRequisiteOrder selectBaseEmpRequisiteOrderById(Long requisiteId) + public BaseEmpRequisiteOrderVO selectBaseEmpRequisiteOrderById(Long requisiteId) { - return baseEmpRequisiteOrderMapper.selectBaseEmpRequisiteOrderById(requisiteId); + BaseEmpRequisiteOrderVO baseEmpRequisiteOrderVO = baseEmpRequisiteOrderMapper.selectBaseEmpRequisiteOrderById(requisiteId); + if(baseEmpRequisiteOrderChildMapper.selectBaseEmpRequisiteOrderChildByCode(baseEmpRequisiteOrderVO.getRequisitieCode())!=null){ + List child = baseEmpRequisiteOrderChildMapper.selectBaseEmpRequisiteOrderChildByCode(baseEmpRequisiteOrderVO.getRequisitieCode()); + baseEmpRequisiteOrderVO.setBaseEmpRequisiteOrderChildList(child); + } + return baseEmpRequisiteOrderVO; } /** * 查询员工领料单列表 * - * @param baseEmpRequisiteOrder 员工领料单 + * @param baseEmpRequisiteOrderVO 员工领料单 * @return 员工领料单 */ @Override - public List selectBaseEmpRequisiteOrderList(BaseEmpRequisiteOrder baseEmpRequisiteOrder) + public List selectBaseEmpRequisiteOrderList(BaseEmpRequisiteOrderVO baseEmpRequisiteOrderVO) { - return baseEmpRequisiteOrderMapper.selectBaseEmpRequisiteOrderList(baseEmpRequisiteOrder); + PageDomain pageDomain = TableSupport.buildPageRequest(); + Integer pageNum = pageDomain.getPageNum(); + Integer pageSize = pageDomain.getPageSize(); + + // PageHelper 仅对第一个 List 分页 + Page list = (Page) baseEmpRequisiteOrderMapper.selectBaseEmpRequisiteOrderList(baseEmpRequisiteOrderVO); + Page returnList = new Page<>(); + for (BaseEmpRequisiteOrderVO tempRequisiteVO: list) { + SysUser sysUser = userMapper.selectUserByLoginName(tempRequisiteVO.getCreateBy()); + if (sysUser != null) { + tempRequisiteVO.setCreateUserName(sysUser.getUserName()); + } + SysUser sysUser2 = userMapper.selectUserByLoginName(tempRequisiteVO.getApplyUser()); + if (sysUser2 != null) { + tempRequisiteVO.setApplyUserName(sysUser2.getUserName()); + } + String instanceId = tempRequisiteVO.getInstanceId(); + // 当前环节 + if (StringUtils.isNotBlank(instanceId)) { + List taskList = taskService.createTaskQuery() + .processInstanceId(instanceId) +// .singleResult(); + .list(); // 例如请假会签,会同时拥有多个任务 + if (!org.springframework.util.CollectionUtils.isEmpty(taskList)) { + TaskEntityImpl task = (TaskEntityImpl) taskList.get(0); + String taskId = task.getId(); + tempRequisiteVO.setTaskId(taskId); + // 设置待办用户 + List todoUserList = todoItemMapper.selectUndealTodoUserList(taskId); + if(!org.springframework.util.CollectionUtils.isEmpty(taskList)){ + tempRequisiteVO.setTodoUserId(String.join(",",todoUserList)); + } + if (task.getSuspensionState() == 2) { + tempRequisiteVO.setTaskName("已挂起"); + tempRequisiteVO.setSuspendState("2"); + } else { + tempRequisiteVO.setTaskName(task.getName()); + tempRequisiteVO.setSuspendState("1"); + } + } else { + // 已办结或者已撤销 + tempRequisiteVO.setTaskName("已结束"); + } + } else { + tempRequisiteVO.setTaskName("未启动"); + } + returnList.add(tempRequisiteVO); + } + returnList.setTotal(org.springframework.util.CollectionUtils.isEmpty(list) ? 0 : list.getTotal()); + returnList.setPageNum(pageNum); + returnList.setPageSize(pageSize); + return returnList; } /** * 新增员工领料单 * - * @param baseEmpRequisiteOrder 员工领料单 + * @param baseEmpRequisiteOrderVO 员工领料单 * @return 结果 */ @Override @Transactional(rollbackFor = NullPointerException.class) - public int insertBaseEmpRequisiteOrder(BaseEmpRequisiteOrder baseEmpRequisiteOrder) + public int insertBaseEmpRequisiteOrder(BaseEmpRequisiteOrderVO baseEmpRequisiteOrderVO) { String loginName = ShiroUtils.getLoginName(); - baseEmpRequisiteOrder.setCreateBy(loginName); - baseEmpRequisiteOrder.setCreateTime(DateUtils.getNowDate()); - if (baseEmpRequisiteOrder.getRequisitieCode() == null) { - baseEmpRequisiteOrder.setRequisitieCode(redisCache.generateBillNo("QG")); + baseEmpRequisiteOrderVO.setCreateBy(loginName); + baseEmpRequisiteOrderVO.setCreateTime(DateUtils.getNowDate()); + if (baseEmpRequisiteOrderVO.getRequisitieCode() == null) { + baseEmpRequisiteOrderVO.setRequisitieCode(redisCache.generateBillNo("QG")); } - List childList = baseEmpRequisiteOrder.getBaseEmpRequisiteOrderChildList(); + List childList = baseEmpRequisiteOrderVO.getBaseEmpRequisiteOrderChildList(); Long materialSum = 0L; BigDecimal materialRmbSum = new BigDecimal(0); BigDecimal materialNoRmbSum = new BigDecimal(0); //物料合计 - Integer childSize = childList.size(); - if (childSize > 0) { +// Integer childSize = childList.size(); + if (childList!=null) { for (BaseEmpRequisiteOrderChild child : childList) { //物料数量 materialSum += child.getMaterialNum(); @@ -93,45 +185,45 @@ public class BaseEmpRequisiteOrderServiceImpl implements IBaseEmpRequisiteOrderS materialRmbSum = child.getMaterialRmbSum().setScale(2, RoundingMode.HALF_UP).add(materialNoRmbSum); //物料含税总价(RMB) materialNoRmbSum = child.getMaterialNoRmbSum().setScale(2, RoundingMode.HALF_UP).add(materialNoRmbSum); - child.setQuoteId(baseEmpRequisiteOrder.getRequisitieCode()); + child.setQuoteId(baseEmpRequisiteOrderVO.getRequisitieCode()); child.setCreateBy(loginName); child.setCreateTime(DateUtils.getNowDate()); baseEmpRequisiteOrderChildMapper.insertBaseEmpRequisiteOrderChild(child); } + baseEmpRequisiteOrderVO.setMaterialAmount(Long.valueOf(childList.size())); } - baseEmpRequisiteOrder.setAuditStatus("1"); - baseEmpRequisiteOrder.setUseStatus("1"); - baseEmpRequisiteOrder.setMaterialAmount(Long.valueOf(childSize)); - baseEmpRequisiteOrder.setMaterialSum(materialSum); - baseEmpRequisiteOrder.setRmbSum(materialRmbSum); - baseEmpRequisiteOrder.setNoRmbSum(materialNoRmbSum); - return baseEmpRequisiteOrderMapper.insertBaseEmpRequisiteOrder(baseEmpRequisiteOrder); +// baseEmpRequisiteOrderVO.setUseStatus("1"); + baseEmpRequisiteOrderVO.setMaterialSum(materialSum); + baseEmpRequisiteOrderVO.setRmbSum(materialRmbSum); + baseEmpRequisiteOrderVO.setNoRmbSum(materialNoRmbSum); + System.out.println(baseEmpRequisiteOrderVO); + return baseEmpRequisiteOrderMapper.insertBaseEmpRequisiteOrder(baseEmpRequisiteOrderVO); } /** * 修改员工领料单 * - * @param baseEmpRequisiteOrder 员工领料单 + * @param baseEmpRequisiteOrderVO 员工领料单 * @return 结果 */ @Override @Transactional(rollbackFor = NullPointerException.class) - public int updateBaseEmpRequisiteOrder(BaseEmpRequisiteOrder baseEmpRequisiteOrder) + public int updateBaseEmpRequisiteOrder(BaseEmpRequisiteOrderVO baseEmpRequisiteOrderVO) { String loginName = ShiroUtils.getLoginName(); - baseEmpRequisiteOrder.setUpdateBy(loginName); - baseEmpRequisiteOrder.setUpdateTime(DateUtils.getNowDate()); - baseEmpRequisiteOrderChildMapper.deleteBaseEmpRequisiteOrderChildByCode(baseEmpRequisiteOrder.getRequisitieCode()); - if (baseEmpRequisiteOrder.getRequisitieCode() == null) { - baseEmpRequisiteOrder.setRequisitieCode(redisCache.generateBillNo("QG")); + baseEmpRequisiteOrderVO.setUpdateBy(loginName); + baseEmpRequisiteOrderVO.setUpdateTime(DateUtils.getNowDate()); + baseEmpRequisiteOrderChildMapper.deleteBaseEmpRequisiteOrderChildByCode(baseEmpRequisiteOrderVO.getRequisitieCode()); + if (baseEmpRequisiteOrderVO.getRequisitieCode() == null) { + baseEmpRequisiteOrderVO.setRequisitieCode(redisCache.generateBillNo("QG")); } - List childList = baseEmpRequisiteOrder.getBaseEmpRequisiteOrderChildList(); + List childList = baseEmpRequisiteOrderVO.getBaseEmpRequisiteOrderChildList(); Long materialSum = 0L; BigDecimal materialRmbSum = new BigDecimal(0); BigDecimal materialNoRmbSum = new BigDecimal(0); //物料合计 - Integer childSize = childList.size(); - if (childSize > 0) { +// Integer childSize = childList.size(); + if (childList!=null) { for (BaseEmpRequisiteOrderChild child : childList) { //物料数量 materialSum += child.getMaterialNum(); @@ -139,19 +231,19 @@ public class BaseEmpRequisiteOrderServiceImpl implements IBaseEmpRequisiteOrderS materialRmbSum = child.getMaterialRmbSum().setScale(2, RoundingMode.HALF_UP).add(materialNoRmbSum); //物料含税总价(RMB) materialNoRmbSum = child.getMaterialNoRmbSum().setScale(2, RoundingMode.HALF_UP).add(materialNoRmbSum); - child.setQuoteId(baseEmpRequisiteOrder.getRequisitieCode()); + child.setQuoteId(baseEmpRequisiteOrderVO.getRequisitieCode()); child.setCreateBy(loginName); child.setCreateTime(DateUtils.getNowDate()); baseEmpRequisiteOrderChildMapper.insertBaseEmpRequisiteOrderChild(child); } + baseEmpRequisiteOrderVO.setMaterialAmount(Long.valueOf(childList.size())); } - baseEmpRequisiteOrder.setAuditStatus("1"); - baseEmpRequisiteOrder.setUseStatus("1"); - baseEmpRequisiteOrder.setMaterialAmount(Long.valueOf(childSize)); - baseEmpRequisiteOrder.setMaterialSum(materialSum); - baseEmpRequisiteOrder.setRmbSum(materialRmbSum); - baseEmpRequisiteOrder.setNoRmbSum(materialNoRmbSum); - return baseEmpRequisiteOrderMapper.updateBaseEmpRequisiteOrder(baseEmpRequisiteOrder); +// baseEmpRequisiteOrderVO.setAuditStatus("1"); +// baseEmpRequisiteOrderVO.setUseStatus("1"); + baseEmpRequisiteOrderVO.setMaterialSum(materialSum); + baseEmpRequisiteOrderVO.setRmbSum(materialRmbSum); + baseEmpRequisiteOrderVO.setNoRmbSum(materialNoRmbSum); + return baseEmpRequisiteOrderMapper.updateBaseEmpRequisiteOrder(baseEmpRequisiteOrderVO); } /** @@ -207,4 +299,68 @@ public class BaseEmpRequisiteOrderServiceImpl implements IBaseEmpRequisiteOrderS public Object getId() { return redisCache.generateBillNo("YGLL"); } + + /** + * 审批流程启动 + * */ + @Transactional(rollbackFor = Exception.class) + @Override + public ProcessInstance submitApply(BaseEmpRequisiteOrderVO baseEmpRequisiteOrderVO) { + + SysUser user = ShiroUtils.getSysUser(); + baseEmpRequisiteOrderVO.setApplyUser(user.getLoginName()); + baseEmpRequisiteOrderVO.setApplyTime(DateUtils.getNowDate()); + // 保存 + insertBaseEmpRequisiteOrder(baseEmpRequisiteOrderVO); + // 启动流程 + String applyTitle = user.getUserName()+"发起了委外报价提交审批-"+DateUtils.dateTimeNow(); + String instanceType = "submit"; + ProcessInstance processInstance = startProcessInstance(applyTitle,instanceType,baseEmpRequisiteOrderVO, user); + String processInstanceId = processInstance.getProcessInstanceId(); + // 提交实例id + baseEmpRequisiteOrderVO.setSubmitInstanceId(processInstanceId); + // 存在提交完就流程结束的情况 + boolean processIsFinish = processService.judgeProcessIsFinish(processInstanceId); + if(processIsFinish){ + // 审核状态-审核通过 + baseEmpRequisiteOrderVO.setAuditStatus("1"); + } + baseEmpRequisiteOrderMapper.updateBaseEmpRequisiteOrder(baseEmpRequisiteOrderVO); + return processInstance; + } + + + /** + * 创建委外报价审核流程 + * @param applyTitle + * @param instanceType + * @param user + * @return + */ + private ProcessInstance startProcessInstance(String applyTitle, String instanceType, BaseEmpRequisiteOrderVO baseEmpRequisiteOrderVO, SysUser user) { + Long requisiteId = baseEmpRequisiteOrderVO.getRequisiteId(); + String businessKey = requisiteId.toString(); // 实体类 ID,作为流程的业务 key + String key = "requisition"; + Map variables = new HashMap<>(); + // 构造authority传参 + buildAuthority(user, variables); + baseEmpRequisiteOrderVO.setApplyTitle(applyTitle); + // 启动流程 + ProcessInstance processInstance = processService.submitApply(user.getLoginName(), businessKey, applyTitle, baseEmpRequisiteOrderVO.getRequisitieCode(), key, variables); + String processInstanceId = processInstance.getId(); + baseEmpRequisiteOrderVO.setInstanceId(processInstanceId); // 建立双向关系 + baseEmpRequisiteOrderVO.setInstanceType(instanceType); + return processInstance; + } + + /** + * 发起人节点判断 + * */ + private void buildAuthority(SysUser user, Map variables) { + Set roleKeys = roleService.selectRoleKeys(user.getUserId()); + // 角色不同审核人不同 + if(roleKeys.contains("scyRole")){ + variables.put("authority",1); + } + } } diff --git a/ruoyi-admin/src/main/resources/mapper/system/BaseEmpRequisiteOrderChildMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/BaseEmpRequisiteOrderChildMapper.xml index 7c538aff..8d13b8c2 100644 --- a/ruoyi-admin/src/main/resources/mapper/system/BaseEmpRequisiteOrderChildMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/system/BaseEmpRequisiteOrderChildMapper.xml @@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select requisitioning_child_id, quote_id, material_id, material_code, photoUrl, material_name, material_type, material_model, specifications, brand, describe, materialNum, materialRmb, materialNoRmb, materialNoRmbSum, materialRmbSum, remark, create_by, create_time, update_by, update_time, use_status, audit_status from base_emp_requisite_order_child + select requisitioning_child_id, quote_id, material_id, material_code, photoUrl, material_name, material_type, material_model, specifications, brand, `describe`, materialNum, materialRmb, materialNoRmb, materialNoRmbSum, materialRmbSum, remark, create_by, create_time, update_by, update_time, use_status, audit_status from base_emp_requisite_order_child - + + + insert into base_emp_requisite_order_child @@ -74,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" material_model, specifications, brand, - describe, + `describe`, materialNum, materialRmb, materialNoRmb, @@ -146,7 +151,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" delete from base_emp_requisite_order_child where requisitioning_child_id = #{requisitioningChildId} - + delete from base_emp_requisite_order_child where quote_id = #{code} diff --git a/ruoyi-admin/src/main/resources/mapper/system/BaseEmpRequisiteOrderMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/BaseEmpRequisiteOrderMapper.xml index 703c418b..88b44d4b 100644 --- a/ruoyi-admin/src/main/resources/mapper/system/BaseEmpRequisiteOrderMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/system/BaseEmpRequisiteOrderMapper.xml @@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -21,13 +21,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + + + - select requisite_id, audit_status, requisitie_status, requisitie_code, correlation_code, material_amount, material_sum, noRmbSum, rmbSum, apply_user, create_by, create_time, update_by, update_time, remark, use_status from base_emp_requisite_order + select requisite_id, audit_status, requisitie_status, requisitie_code, correlation_code, material_amount, material_sum, noRmbSum, rmbSum, create_by, create_time, update_by, update_time, remark, use_status,instance_id, instance_type, submit_instance_id, apply_title, apply_time, apply_user, cancel_instance_id, restore_instance_id from base_emp_requisite_order - and audit_status = #{auditStatus} @@ -44,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where requisite_id = #{requisiteId} - + insert into base_emp_requisite_order audit_status, @@ -55,13 +62,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" material_sum, noRmbSum, rmbSum, - apply_user, create_by, create_time, update_by, update_time, remark, use_status, + instance_id, + instance_type, + submit_instance_id, + apply_title, + apply_time, + apply_user, + cancel_instance_id, + restore_instance_id, #{auditStatus}, @@ -72,17 +86,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{materialSum}, #{noRmbSum}, #{rmbSum}, - #{applyUser}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{remark}, #{useStatus}, + #{instanceId}, + #{instanceType}, + #{submitInstanceId}, + #{applyTitle}, + #{applyTime}, + #{applyUser}, + #{cancelInstanceId}, + #{restoreInstanceId}, - + update base_emp_requisite_order audit_status = #{auditStatus}, @@ -93,13 +114,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" material_sum = #{materialSum}, noRmbSum = #{noRmbSum}, rmbSum = #{rmbSum}, - apply_user = #{applyUser}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, remark = #{remark}, use_status = #{useStatus}, + instance_id = #{instanceId}, + instance_type = #{instanceType}, + submit_instance_id = #{submitInstanceId}, + apply_title = #{applyTitle}, + apply_time = #{applyTime}, + apply_user = #{applyUser}, + cancel_instance_id = #{cancelInstanceId}, + restore_instance_id = #{restoreInstanceId}, where requisite_id = #{requisiteId} diff --git a/ruoyi-admin/src/main/resources/mapper/system/OutsourceQuoteMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/OutsourceQuoteMapper.xml index 7a4ae074..ad65d77e 100644 --- a/ruoyi-admin/src/main/resources/mapper/system/OutsourceQuoteMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/system/OutsourceQuoteMapper.xml @@ -20,7 +20,6 @@ - diff --git a/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/add.html b/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/add.html index bf5eeed0..b843023f 100644 --- a/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/add.html @@ -130,7 +130,7 @@ $("#bootstrap-sub-table-empRequisitionChild").bootstrapTable('insertRow', { index:1, row: { - materialId:rowData.id, + materialId:rowData.materialId, materialCode: rowData.materialNo, materialName: rowData.materialName, materialType: rowData.materialType, @@ -139,11 +139,11 @@ unit: rowData.unit, processMethod: rowData.processMethod, photoUrl: rowData.photoUrl, - materialNum: "", - materialRmb: "", - materialNoRmb: "", - materialNoRmbSum: "", - materialRmbSum: "", + materialNum: 0, + materialRmb: 0, + materialNoRmb: 0, + materialNoRmbSum: 0, + materialRmbSum: 0, remark: "" } }) @@ -165,12 +165,59 @@ values: id }) } + function submitHandler() { if ($.validate.form()) { - $.operate.save(prefix + "/add", $('#form-empRequisiteOrder-add').serialize()); + var baseEmpRequisiteOrderVO = {}; + if ($.validate.form()) { + var baseEmpRequisiteOrderChildList = []; + // 获取表单数据 + const Data = $("#form-empRequisiteOrder-add").serializeArray().reduce((obj, item) => { + obj[item.name] = item.value; + return obj; + }, {}); + baseEmpRequisiteOrderVO = { + requisitieCode: Data.requisitieCode, + correlationCode: Data.correlationCode, + remark: Data.remark, + materialAmount: 0, + baseEmpRequisiteOrderChildList: [] + } + // 获取bootstrap-table的数据,这里假设你使用bootstrap-table的API获取所有数据 + var rows = $('#bootstrap-sub-table-empRequisitionChild').bootstrapTable('getData'); + // 检查表格数据是否为空 + if (rows.length === 0) { + $.modal.alertWarning("请至少添加一条物料信息再保存!"); + return; + } else { + baseEmpRequisiteOrderVO.materialAmount = rows.length; + for (var i = 0; i < rows.length; i++) { + var requisiteChild = { + materialId: rows[i].id, + materialCode: rows[i].materialNo, + materialName: rows[i].materialName, + materialType: rows[i].materialType, + describe: rows[i].describe, + brand: rows[i].brand, + unit: rows[i].unit, + processMethod: rows[i].processMethod, + photoUrl: rows[i].photoUrl, + materialNum: rows[i].materialNum, + materialRmb: rows[i].materialRmb, + materialNoRmb: rows[i].materialNoRmb, + materialNoRmbSum: rows[i].materialNoRmbSum, + materialRmbSum: rows[i].materialRmbSum, + remark: rows[i].remark + }; + baseEmpRequisiteOrderVO.baseEmpRequisiteOrderChildList.push(requisiteChild); + } + } + console.log(JSON.stringify(baseEmpRequisiteOrderVO)); + $.operate.saveJson(prefix + "/add", JSON.stringify(baseEmpRequisiteOrderVO)); + // $.operate.save(prefix + "/add", $('#form-empRequisiteOrder-add').serialize()); + } } } - function getSelections(){ $.ajax({ url: ctx + "system/requisitioning/getEmpUserName", diff --git a/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/detail.html b/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/detail.html index e484cd0f..5c1dadd1 100644 --- a/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/detail.html +++ b/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/detail.html @@ -59,6 +59,7 @@ pagination: false, sidePagination: "client", model: "物料报价信息", + data: [[${baseEmpRequisiteOrder.baseEmpRequisiteOrderChildList}]], columns: [ {checkbox: true}, {field: 'index',align: 'center', title: "序号", diff --git a/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/empRequisiteOrder.html b/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/empRequisiteOrder.html index 0df89ae3..3b2a15db 100644 --- a/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/empRequisiteOrder.html +++ b/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/empRequisiteOrder.html @@ -51,6 +51,7 @@ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/taskSczgVerify.html b/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/taskSczgVerify.html new file mode 100644 index 00000000..f9b88463 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/taskSczgVerify.html @@ -0,0 +1,151 @@ + + + + + + + + +
+
+ + + + + + +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+ 报价信息 +
+
+
+
+
+
+
+
+
+ + + + + + + + + \ No newline at end of file