|
@@ -4,8 +4,10 @@ import com.liang.common.JsonTool;
|
4
|
4
|
import com.liang.common.base.BaseController;
|
5
|
5
|
import com.liang.common.base.BaseResult;
|
6
|
6
|
import com.liang.entity.PrjAnnualBudgetRecord;
|
|
7
|
+import com.liang.entity.PrjApproverecord;
|
7
|
8
|
import com.liang.entity.PrjContract;
|
8
|
9
|
import com.liang.entity.PrjContractXg;
|
|
10
|
+import com.liang.service.PrjApproverecordService;
|
9
|
11
|
import com.liang.service.PrjContractXgService;
|
10
|
12
|
import org.springframework.stereotype.Controller;
|
11
|
13
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -13,6 +15,8 @@ import org.springframework.ui.Model;
|
13
|
15
|
import org.springframework.web.bind.annotation.*;
|
14
|
16
|
|
15
|
17
|
import javax.annotation.Resource;
|
|
18
|
+import java.text.SimpleDateFormat;
|
|
19
|
+import java.util.Date;
|
16
|
20
|
import java.util.List;
|
17
|
21
|
|
18
|
22
|
/**
|
|
@@ -97,4 +101,37 @@ public class PrjContractXgController extends BaseController {
|
97
|
101
|
|
98
|
102
|
|
99
|
103
|
}
|
|
104
|
+
|
|
105
|
+ @Resource
|
|
106
|
+ private PrjApproverecordService prjApproverecordService;
|
|
107
|
+ @ResponseBody
|
|
108
|
+ @RequestMapping(value = "/updateHtht",method = RequestMethod.POST)
|
|
109
|
+ public BaseResult updateSpzt(@RequestBody PrjContractXg prjContractXg){
|
|
110
|
+ // 获取回退的数据
|
|
111
|
+ // 获取当前系统时间
|
|
112
|
+ Date data = new Date();
|
|
113
|
+ // 转换时间格式
|
|
114
|
+ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
115
|
+ prjContractXg.setSpzt("未锁定");
|
|
116
|
+ int mun = prjContractXgService.updateHtht(prjContractXg);
|
|
117
|
+ if (mun == 0){
|
|
118
|
+ return BaseResult.failure(1,"合同数据回退失败!");
|
|
119
|
+ }
|
|
120
|
+ PrjApproverecord prjApproverecord = new PrjApproverecord();
|
|
121
|
+ prjApproverecord.setTablename("prj_Contract");
|
|
122
|
+ prjApproverecord.setWc(true);
|
|
123
|
+ prjApproverecord.setTjsj(format.format(data));
|
|
124
|
+ prjApproverecord.setShsj(format.format(data));
|
|
125
|
+ prjApproverecord.setXmid(prjContractXg.getId());
|
|
126
|
+ prjApproverecord.setTjr(getSysUserId());
|
|
127
|
+ prjApproverecord.setShr(getSysUserId());
|
|
128
|
+ prjApproverecord.setSpcz("合同数据解锁");
|
|
129
|
+ prjApproverecord.setSffh(true);
|
|
130
|
+ prjApproverecord.setZt("合同解锁");
|
|
131
|
+ int num = prjApproverecordService.insert(prjApproverecord);
|
|
132
|
+ if (num == 0){
|
|
133
|
+ return BaseResult.failure(1,"合同数据回退失败");
|
|
134
|
+ }
|
|
135
|
+ return BaseResult.success("合同数据回退成功!");
|
|
136
|
+ }
|
100
|
137
|
}
|