|
@@ -96,7 +96,6 @@ public class CmcDeviceApprovalController extends BaseController
|
96
|
96
|
cmcDeviceApproval.setBeginDate(formDataJson.getDate("beginDate"));
|
97
|
97
|
cmcDeviceApproval.setEndDate(formDataJson.getDate("endDate"));
|
98
|
98
|
cmcDeviceApproval.setDays(formDataJson.getLong("days"));
|
99
|
|
- cmcDeviceApproval.setState("0");
|
100
|
99
|
if (formDataJson.getJSONArray("devices").size() > 0) {
|
101
|
100
|
String deviceString = formDataJson.getString("devices").substring(1, formDataJson.getString("devices").length() - 1);
|
102
|
101
|
cmcDeviceApproval.setDevices(deviceString);
|
|
@@ -104,8 +103,6 @@ public class CmcDeviceApprovalController extends BaseController
|
104
|
103
|
BigDecimal estimateCost = new BigDecimal(0);
|
105
|
104
|
for (String device : devices) {
|
106
|
105
|
CmcDevice cmcDevice = cmcDeviceService.selectCmcDeviceByDeviceId(Integer.parseInt(device));
|
107
|
|
- cmcDevice.setStatus("0");
|
108
|
|
- cmcDeviceService.updateCmcDevice(cmcDevice);
|
109
|
106
|
if (cmcDevice.getDayCost() != null)
|
110
|
107
|
estimateCost = estimateCost.add(cmcDevice.getDayCost().multiply(new BigDecimal(cmcDeviceApproval.getDays())));
|
111
|
108
|
}
|
|
@@ -140,7 +137,6 @@ public class CmcDeviceApprovalController extends BaseController
|
140
|
137
|
cmcDeviceApproval.setManagerTime(new Date());
|
141
|
138
|
}
|
142
|
139
|
if (formDataJson.getDate("confirmDate") != null) {
|
143
|
|
- cmcDeviceApproval.setState("1");
|
144
|
140
|
cmcDeviceApproval.setConfirmDate(formDataJson.getDate("confirmDate"));
|
145
|
141
|
}
|
146
|
142
|
if (formDataJson.getDate("returnDate") != null) {
|
|
@@ -156,13 +152,11 @@ public class CmcDeviceApprovalController extends BaseController
|
156
|
152
|
if (formDataJson.getJSONArray("modifyDevices").size() > 0) {
|
157
|
153
|
cmcDeviceApproval.setDispatcher(getLoginUser().getUserId());
|
158
|
154
|
String deviceString = formDataJson.getString("modifyDevices").substring(1, formDataJson.getString("modifyDevices").length() - 1);
|
159
|
|
- cmcDeviceApproval.setDevices(deviceString);
|
|
155
|
+ cmcDeviceApproval.setModifyDevices(deviceString);
|
160
|
156
|
String[] devices = deviceString.split(",");
|
161
|
157
|
BigDecimal estimateCost = new BigDecimal(0);
|
162
|
158
|
for (String device : devices) {
|
163
|
159
|
CmcDevice cmcDevice = cmcDeviceService.selectCmcDeviceByDeviceId(Integer.parseInt(device));
|
164
|
|
- cmcDevice.setStatus("1");
|
165
|
|
- cmcDeviceService.updateCmcDevice(cmcDevice);
|
166
|
160
|
if (cmcDevice.getDayCost() != null)
|
167
|
161
|
estimateCost = estimateCost.add(cmcDevice.getDayCost().multiply(new BigDecimal(cmcDeviceApproval.getDays())));
|
168
|
162
|
}
|