Browse Source

[feat] 物料编辑的流程添加为submitApply() insert启动新数据改变判断为不存在有getId自增主键的才添加。供应商修改时缺少supplierId属性导致新增一条相同的供应商信息。

dev
zhangsiqi 4 months ago
parent
commit
5d9950079a
  1. 6
      ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpMaterialController.java
  2. 4
      ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpMaterialServiceImpl.java
  3. 1
      ruoyi-admin/src/main/resources/templates/system/supplier/edit.html

6
ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpMaterialController.java

@ -263,7 +263,11 @@ public class ErpMaterialController extends BaseController
@ResponseBody
public AjaxResult editSave(ErpMaterial erpMaterial)
{
erpMaterialService.updateErpMaterial(erpMaterial);
// 使用状态-否
erpMaterial.setUseStatus("0");
// 审核状态-待审核
erpMaterial.setAuditStatus("0");
erpMaterialService.submitApply(erpMaterial);
return AjaxResult.success();
}

4
ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpMaterialServiceImpl.java

@ -325,7 +325,9 @@ public class ErpMaterialServiceImpl implements IErpMaterialService
SysUser user = ShiroUtils.getSysUser();
erpMaterial.setApplyUser(user.getLoginName());
erpMaterial.setApplyTime(DateUtils.getNowDate());
insertErpMaterial(erpMaterial);
if(erpMaterial.getId() == null){
insertErpMaterial(erpMaterial);
}
// 启动流程
String applyTitle = user.getUserName()+"发起了物料信息提交审批-"+DateUtils.dateTimeNow();
String instanceType = "submit";

1
ruoyi-admin/src/main/resources/templates/system/supplier/edit.html

@ -8,6 +8,7 @@
<body class="white-bg">
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-supplier-edit" th:object="${sysSupplier}">
<input name="supplierId" th:field="*{supplierId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">供应商编号:</label>
<div class="col-sm-8">

Loading…
Cancel
Save