修改审批结束时,处理审批节点时间

master
jiangwl 2 years ago
parent cf62dc4086
commit 5b51e28fd2

@ -24,10 +24,10 @@ import com.ruoyi.system.mapper.SysUserMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@ -268,8 +268,15 @@ public class ProjectDocProcessController extends BaseController {
// 属于三张结构化表单
if (flag) {
// 处理审批时间
Calendar calendar = Calendar.getInstance();
calendar.setTime(projectDocProcessSubmit.getProcessDate() == null ? new Date() : projectDocProcessSubmit.getProcessDate());
Date processDate = projectDocProcessSubmit.getProcessDate();
if(processDate == null){
processDate = new Date();
}
String year = new SimpleDateFormat("yyyy").format(processDate);
String month = new SimpleDateFormat("MM").format(processDate);
String day = new SimpleDateFormat("dd").format(processDate);
// 处理并赋值最后一个节点的章+签名
GenerateDocument generateDocument = generateFileMapper.selectOne(processNo);
JSONObject body = JSONObject.parseObject(generateDocument.getExamValue());
@ -278,26 +285,26 @@ public class ProjectDocProcessController extends BaseController {
body.put("fill_12" , UserSign);
body.put("fill_18" , UserSignCompany);
// 补充年/月/日时间
body.put("fill_13" , calendar.get(Calendar.YEAR));
body.put("fill_14" , calendar.get(Calendar.MONTH) + 1);
body.put("fill_15" , calendar.get(Calendar.DATE));
body.put("fill_13" , year);
body.put("fill_14" , month);
body.put("fill_15" , day);
} else if (TypeEnum.SCHEME_APPROVAL.getCode().equals(treeId)) {
// 审批表
body.put("fill_25" , UserSign);
body.put("fill_26" , UserSignCompany);
body.put("fill_24" , projectDocProcessSubmit.getProcessContent());
// 补充年/月/日时间
body.put("fill_27" , calendar.get(Calendar.YEAR));
body.put("fill_28" , calendar.get(Calendar.MONTH) + 1);
body.put("fill_29" , calendar.get(Calendar.DATE));
body.put("fill_27" , year);
body.put("fill_28" , month);
body.put("fill_29" , day);
} else if (TypeEnum.START_NOTICE.getCode().equals(treeId)) {
// 开工通知
body.put("signed_sign" , UserSign);
body.put("contractor_seal" , UserSignCompany);
// 补充年/月/日时间
body.put("contractor_sign_year" , calendar.get(Calendar.YEAR));
body.put("contractor_sign_month" , calendar.get(Calendar.MONTH) + 1);
body.put("contractor_sign_day" , calendar.get(Calendar.DATE));
body.put("contractor_sign_year" , year);
body.put("contractor_sign_month" , month);
body.put("contractor_sign_day" , day);
} else if (TypeEnum.SIDE_STATION_SUPERVISOR.getCode().equals(treeId)) {
// 监理旁站记录
// 施工技术员:(签名)
@ -307,9 +314,9 @@ public class ProjectDocProcessController extends BaseController {
// 巡视记录
body.put("fill_9" , UserSign);
body.put("fill_10" , UserSignCompany);
body.put("fill_11" , calendar.get(Calendar.YEAR));
body.put("fill_12" , calendar.get(Calendar.MONTH) + 1);
body.put("fill_13" , calendar.get(Calendar.DATE));
body.put("fill_11" , year);
body.put("fill_12" , month);
body.put("fill_13" , day);
}
generateDocument.setExamValue(body.toString());
// 赋值最后一个节点签名和印章

Loading…
Cancel
Save