|
@@ -25,6 +25,7 @@ import com.jeeplus.modules.sg.managementcenter.project.entity.Project;
|
|
import com.jeeplus.modules.sg.managementcenter.project.entity.Project1;
|
|
import com.jeeplus.modules.sg.managementcenter.project.entity.Project1;
|
|
import com.jeeplus.modules.sg.materialmodule.activiti.entity.MaterialModule;
|
|
import com.jeeplus.modules.sg.materialmodule.activiti.entity.MaterialModule;
|
|
import com.jeeplus.modules.sg.materialmodule.activiti.service.MaterialModuleService;
|
|
import com.jeeplus.modules.sg.materialmodule.activiti.service.MaterialModuleService;
|
|
|
|
+import com.jeeplus.modules.sg.picking.activiti.entity.MaterialReport;
|
|
import com.jeeplus.modules.sg.picking.activiti.entity.PickApplication;
|
|
import com.jeeplus.modules.sg.picking.activiti.entity.PickApplication;
|
|
import com.jeeplus.modules.sg.picking.activiti.entity.ShowList;
|
|
import com.jeeplus.modules.sg.picking.activiti.entity.ShowList;
|
|
import com.jeeplus.modules.sg.picking.activiti.service.PickIngService;
|
|
import com.jeeplus.modules.sg.picking.activiti.service.PickIngService;
|
|
@@ -2574,15 +2575,16 @@ public class ActTaskService extends BaseService {
|
|
String taskDefKey = act.getTaskDefKey();
|
|
String taskDefKey = act.getTaskDefKey();
|
|
// 提交流程任务
|
|
// 提交流程任务
|
|
Map<String, Object> vars = Maps.newHashMap();
|
|
Map<String, Object> vars = Maps.newHashMap();
|
|
- vars.put("person", "shenc2");
|
|
|
|
- PickApplication pickApplication = new PickApplication();
|
|
|
|
- pickApplication.preInsert();
|
|
|
|
- pickApplication.setProjectId(reserveName);
|
|
|
|
|
|
+ String loginName = UserUtils.getByUserName("沈忱").getLoginName();
|
|
|
|
+ vars.put("person", loginName);
|
|
|
|
+ //保存物料上报流程信息
|
|
|
|
+ MaterialReport materialReport = new MaterialReport();
|
|
|
|
+ materialReport.setProjectName(reserveName);
|
|
//保存流程定义
|
|
//保存流程定义
|
|
- showListService.newSave(pickApplication);
|
|
|
|
|
|
+ showListService.materialReportSave(materialReport);
|
|
ProcessDefinition p = actProcessService.getProcessDefinition(act.getProcDefId());
|
|
ProcessDefinition p = actProcessService.getProcessDefinition(act.getProcDefId());
|
|
String title = UserUtils.getUser().getName() + "在" + DateUtils.getDateTime() + "发起" + p.getName();
|
|
String title = UserUtils.getUser().getName() + "在" + DateUtils.getDateTime() + "发起" + p.getName();
|
|
- String procInsId = actTaskService.startProcessNew(p.getKey(), "md_picking_application", pickApplication.getId(), title, vars);
|
|
|
|
|
|
+ String procInsId = actTaskService.startProcessNew(p.getKey(), "md_material_report_application", materialReport.getId(), title, vars);
|
|
List<ShowList> showLists = MyActiviUtils.finaList(selectNumber);
|
|
List<ShowList> showLists = MyActiviUtils.finaList(selectNumber);
|
|
for (ShowList a : showLists) {
|
|
for (ShowList a : showLists) {
|
|
a.preInsert();
|
|
a.preInsert();
|
|
@@ -2599,7 +2601,7 @@ public class ActTaskService extends BaseService {
|
|
* @param act
|
|
* @param act
|
|
*/
|
|
*/
|
|
@Transactional(readOnly = false)
|
|
@Transactional(readOnly = false)
|
|
- public void materialReportBillOff(Act act) {
|
|
|
|
|
|
+ public Boolean materialReportBillOff(Act act) {
|
|
// 设置意见
|
|
// 设置意见
|
|
act.setComment(("yes".equals(act.getFlag()) ? "[同意] " : "[驳回] ") + act.getComment());
|
|
act.setComment(("yes".equals(act.getFlag()) ? "[同意] " : "[驳回] ") + act.getComment());
|
|
act.preUpdate();
|
|
act.preUpdate();
|
|
@@ -2634,16 +2636,27 @@ public class ActTaskService extends BaseService {
|
|
materialInfo.preInsert();
|
|
materialInfo.preInsert();
|
|
materialInfos.add(materialInfo);
|
|
materialInfos.add(materialInfo);
|
|
}
|
|
}
|
|
|
|
+
|
|
materialProject = new MaterialProject();
|
|
materialProject = new MaterialProject();
|
|
materialProject.setReserveProjectName(reserveProjectName);
|
|
materialProject.setReserveProjectName(reserveProjectName);
|
|
|
|
+ if (reserveProjectName!=""){
|
|
|
|
+ List<MaterialProject> list = materialProjectMapper.findJugdeReserve(materialProject);
|
|
|
|
+ if (list.size() > 0){
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
materialProject.preInsert();
|
|
materialProject.preInsert();
|
|
materialProjects.add(materialProject);
|
|
materialProjects.add(materialProject);
|
|
////添加年度物料上报统计
|
|
////添加年度物料上报统计
|
|
materialProjectMapper.insertList(materialProjects);
|
|
materialProjectMapper.insertList(materialProjects);
|
|
//添加月度物资上报明细
|
|
//添加月度物资上报明细
|
|
materialInfoMapper.insertList(materialInfos);
|
|
materialInfoMapper.insertList(materialInfos);
|
|
|
|
+ //原始数据
|
|
|
|
+ materialInfoMapper.insertOldList(materialInfos);
|
|
//根据流程删除临时表
|
|
//根据流程删除临时表
|
|
pickIngService.deleteProcInsIdMaterialReport(act.getProcInsId());
|
|
pickIngService.deleteProcInsIdMaterialReport(act.getProcInsId());
|
|
|
|
+
|
|
|
|
+ return false;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|