|
|
@@ -10,6 +10,7 @@ import javax.annotation.Resource;
|
|
10
|
10
|
import javax.servlet.http.HttpServletRequest;
|
|
11
|
11
|
|
|
12
|
12
|
import org.springframework.http.MediaType;
|
|
|
13
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
13
|
14
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
14
|
15
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
15
|
16
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
@@ -121,14 +122,14 @@ public class BasicEquipmentEquipmentPoolController {
|
|
121
|
122
|
@ApiImplicitParam(name = "orgId", value = "当前登录人组织id", paramType = "form"),
|
|
122
|
123
|
@ApiImplicitParam(name = "poolJson", value = "数据对象", paramType = "form")
|
|
123
|
124
|
})
|
|
124
|
|
- public Map<String, Object> update(String poolJson ,Integer userId ,Integer orgId) {
|
|
|
125
|
+ public Map<String, Object> update(@RequestBody BasicEquipmentEquipmentPool pool) {
|
|
125
|
126
|
Map<String, Object> map = new HashMap<String, Object>();
|
|
126
|
|
- ObjectMapper mapper = new ObjectMapper();
|
|
|
127
|
+ /*ObjectMapper mapper = new ObjectMapper();*/
|
|
127
|
128
|
try {
|
|
128
|
|
- BasicEquipmentEquipmentPool pool = mapper.readValue(poolJson, BasicEquipmentEquipmentPool.class);
|
|
|
129
|
+ /*BasicEquipmentEquipmentPool pool = mapper.readValue(poolJson, BasicEquipmentEquipmentPool.class);*/
|
|
129
|
130
|
if (pool.getId() == null) {
|
|
130
|
|
- pool.setOrgId(orgId);
|
|
131
|
|
- pool.setInputPersonId(userId);
|
|
|
131
|
+ pool.setOrgId(pool.getOrgId());
|
|
|
132
|
+ pool.setInputPersonId(pool.getInputPersonId());
|
|
132
|
133
|
pool.setInputDate(new Date());
|
|
133
|
134
|
poolServivce.add(pool);
|
|
134
|
135
|
} else {
|