Your Name 3 år sedan
förälder
incheckning
327ba45a4d

+ 14
- 6
src/main/java/com/njyunzhi/pet_identity/controller/TaApplicationController.java Visa fil

@@ -186,12 +186,6 @@ public class TaApplicationController extends BaseController {
186 186
         taApplication.setVerifyStatus(Constants.AUDIT_STATUS_READY);
187 187
         taApplication.setMakeStatus(Constants.MAKE_STATUS_READY);
188 188
 
189
-        Integer totalCharge = iTaApplicationService.getTotalCharge(taApplication);
190
-        if (totalCharge < 1) {
191
-            // 不需要缴费
192
-            taApplication.setStatus(Constants.WORKFLOW_STATUS_PROCESSING);
193
-        }
194
-
195 189
         if (Constants.APPLY_TYPE_RENEWAL.equals(taApplication.getApplyType())) {
196 190
             // 如果是续期申请
197 191
             if (StringUtils.isEmpty(taApplication.getOriginCardNo())) {
@@ -219,12 +213,26 @@ public class TaApplicationController extends BaseController {
219 213
             if (!iTaPetIdentityService.updateById(taPetIdentity)) {
220 214
                 return ResponseBean.error("挂失证件失败, 请重试");
221 215
             }
216
+
217
+            Integer totalCharge = iTaApplicationService.getTotalCharge(taApplication);
218
+            if (totalCharge < 1) {
219
+                // 不需要缴费
220
+                taApplication.setStatus(Constants.WORKFLOW_STATUS_PROCESSING);
221
+            }
222
+
222 223
         } else {
223 224
             // 当前狗狗是否存在证件
224 225
             TaPetIdentity origin = iTaPetIdentityService.getByPet(taApplication.getPetId(), taApplication.getPersonId());
225 226
             if (null != origin) {
226 227
                 return ResponseBean.error("请先挂失原始证件");
227 228
             }
229
+
230
+            Integer totalCharge = iTaApplicationService.getTotalCharge(taApplication);
231
+            if (totalCharge < 1) {
232
+                // 不需要缴费
233
+                taApplication.setStatus(Constants.WORKFLOW_STATUS_PROCESSING);
234
+            }
235
+
228 236
         }
229 237
 
230 238
         if (iTaApplicationService.save(taApplication)){