|
@@ -2077,38 +2077,40 @@ public class StaBudgetapprovalController extends BaseController {
|
2077
|
2077
|
@RequestMapping(value = "bgbm",method = RequestMethod.POST)
|
2078
|
2078
|
public BaseResult bgbm(@RequestBody String formData){
|
2079
|
2079
|
|
|
2080
|
+ // 解析JSON 为对象
|
2080
|
2081
|
StaBudgetapproval sta = JsonTool.parseObject(formData,StaBudgetapproval.class);
|
2081
|
2082
|
StaBudgetapproval staBudgetapproval = staBudgetapprovalService.queryById(sta.getId());
|
2082
|
2083
|
// 增加审批列表留痕选项
|
2083
|
2084
|
// 获取当前系统时间
|
2084
|
|
- Date data = new Date();
|
2085
|
2085
|
// 转换时间格式
|
|
2086
|
+ Date data = new Date();
|
2086
|
2087
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
2087
|
2088
|
// 审批列表记录
|
2088
|
|
- PrjApproverecord prjApproverecord = new PrjApproverecord();
|
2089
|
|
- prjApproverecord.setTablename("sta_BudgetApproval");
|
2090
|
|
- prjApproverecord.setXmid(staBudgetapproval.getXmid());
|
2091
|
|
- prjApproverecord.setYj( "项目名称:"+staBudgetapproval.getXmmc()+",ERP编号:"+staBudgetapproval.getErpbh()+","+"'部门'从'"+
|
2092
|
|
- staBudgetapproval.getSsbmmc()+"'转移至'"+sta.getSsbmmc()+","+
|
2093
|
|
- ",操作员:"+
|
2094
|
|
- sysUserInfoService.queryById(getSysUserId()).getName());
|
2095
|
|
- prjApproverecord.setSfsjsh(true);
|
2096
|
|
- prjApproverecord.setSjshr(getSysUserId());
|
2097
|
|
- prjApproverecord.setShsj(format.format(data));
|
2098
|
|
- prjApproverecord.setTjsj(format.format(data));
|
2099
|
|
- prjApproverecord.setTjr(getSysUserId());
|
2100
|
|
- prjApproverecord.setShr(getSysUserId());
|
2101
|
|
- prjApproverecord.setSpcz("项目转移");
|
2102
|
|
- prjApproverecord.setXm(staBudgetapproval.getXmmc());
|
2103
|
|
- prjApproverecord.setZt("已完成");
|
2104
|
|
- prjApproverecord.setWc(true);
|
2105
|
2089
|
if (staBudgetapproval != null){
|
2106
|
|
- staBudgetapproval.setSsbm(staBudgetapproval.getSsbm());
|
2107
|
|
- int num = staBudgetapprovalService.update(staBudgetapproval);
|
|
2090
|
+ staBudgetapproval.setSsbm(Integer.parseInt(sta.getSsbmmc()));
|
|
2091
|
+ int num = staBudgetapprovalService.updatebmbg(staBudgetapproval);
|
2108
|
2092
|
if (num > 0){
|
|
2093
|
+ PrjApproverecord prjApproverecord = new PrjApproverecord();
|
|
2094
|
+ prjApproverecord.setTablename("sta_BudgetApproval");
|
|
2095
|
+ prjApproverecord.setXmid(staBudgetapproval.getXmid());
|
|
2096
|
+ prjApproverecord.setYj( "项目名称:"+staBudgetapproval.getXmmc()+",ERP编号:"+staBudgetapproval.getErpbh()+","+"'部门'从'"+
|
|
2097
|
+ staBudgetapproval.getSsbmmc()+"'转移至'"+sta.getSsbmmc()+","+
|
|
2098
|
+ ",操作员:"+
|
|
2099
|
+ sysUserInfoService.queryById(getSysUserId()).getName());
|
|
2100
|
+ prjApproverecord.setSfsjsh(true);
|
|
2101
|
+ prjApproverecord.setSjshr(getSysUserId());
|
|
2102
|
+ prjApproverecord.setShsj(format.format(data));
|
|
2103
|
+ prjApproverecord.setTjsj(format.format(data));
|
|
2104
|
+ prjApproverecord.setTjr(getSysUserId());
|
|
2105
|
+ prjApproverecord.setShr(getSysUserId());
|
|
2106
|
+ prjApproverecord.setSpcz("项目转移");
|
|
2107
|
+ prjApproverecord.setXm(staBudgetapproval.getXmmc());
|
|
2108
|
+ prjApproverecord.setZt("已完成");
|
|
2109
|
+ prjApproverecord.setWc(true);
|
2109
|
2110
|
int muns = prjApproverecordService.insert(prjApproverecord);
|
2110
|
|
- return BaseResult.success("'"+staBudgetapproval.getErpbh()+"'部门转移成功!");
|
2111
|
|
-
|
|
2111
|
+ if (muns > 0){
|
|
2112
|
+ return BaseResult.success("'"+staBudgetapproval.getErpbh()+"'部门转移成功!");
|
|
2113
|
+ }
|
2112
|
2114
|
}
|
2113
|
2115
|
}
|
2114
|
2116
|
return BaseResult.failure(-1, "数据转移失败!");
|