|
|
@@ -132,10 +132,7 @@ public class BizSqrEnterpriseApplyServiceImpl implements BizSqrEnterpriseApplySe
|
|
132
|
132
|
BizSqrEnterpriseApply bizSqrEnterpriseApply = (BizSqrEnterpriseApply) mapper.readValue(bizSqrEnterpriseApplyJson, BizSqrEnterpriseApply.class);
|
|
133
|
133
|
String unitInfoId =bizSqrEnterpriseApply.getUnitInfoId();
|
|
134
|
134
|
BizSqrEnterprise bizSqrEnterprise=bizSqrEnterpriseMapper.fibdByEnterprise(unitInfoId);
|
|
135
|
|
- if(bizSqrEnterprise!=null){
|
|
136
|
|
- modelMap.put("error", "该企业已有承储资格,请勿重复申请");
|
|
137
|
|
- return modelMap;
|
|
138
|
|
- }
|
|
|
135
|
+
|
|
139
|
136
|
// BizSqrEnterpriseApply bSqrEnterpriseApply = bizSqrEnterpriseApplyService.findById(bizSqrEnterpriseApplyId);
|
|
140
|
137
|
if(bizSqrEnterpriseApply.getApplyStatus()==0){//保存
|
|
141
|
138
|
if(bizSqrEnterpriseApply.getApplyType()==4){
|
|
|
@@ -145,6 +142,7 @@ public class BizSqrEnterpriseApplyServiceImpl implements BizSqrEnterpriseApplySe
|
|
145
|
142
|
bizSqrEnterpriseApply.setUpdateTime(new Date());
|
|
146
|
143
|
bizSqrEnterpriseApplyMapper.insert(bizSqrEnterpriseApply);
|
|
147
|
144
|
}else{
|
|
|
145
|
+
|
|
148
|
146
|
bizSqrEnterpriseApply.setCreateTime(new Date());
|
|
149
|
147
|
bizSqrEnterpriseApply.setUpdateTime(new Date());
|
|
150
|
148
|
bizSqrEnterpriseApplyMapper.insert(bizSqrEnterpriseApply);
|
|
|
@@ -154,9 +152,15 @@ public class BizSqrEnterpriseApplyServiceImpl implements BizSqrEnterpriseApplySe
|
|
154
|
152
|
if(bizSqrEnterpriseApply.getId()!=null){//有数据
|
|
155
|
153
|
bizSqrEnterpriseService.delete(bizSqrEnterpriseApply.getSqrEnterpriseId());
|
|
156
|
154
|
bizSqrEnterpriseApplyMapper.delete(bizSqrEnterpriseApply.getId());
|
|
|
155
|
+
|
|
157
|
156
|
saveAndcreatEbizSqrEnterprise(bizSqrEnterpriseApply,userName);
|
|
158
|
157
|
}else{
|
|
159
|
|
-
|
|
|
158
|
+ if(bizSqrEnterpriseApply.getApplyType()==1){
|
|
|
159
|
+ if(bizSqrEnterprise!=null){
|
|
|
160
|
+ modelMap.put("error", "该企业已有承储资格,请勿重复申请");
|
|
|
161
|
+ return modelMap;
|
|
|
162
|
+ }
|
|
|
163
|
+ }
|
|
160
|
164
|
saveAndcreatEbizSqrEnterprise(bizSqrEnterpriseApply,userName);
|
|
161
|
165
|
|
|
162
|
166
|
|
|
|
@@ -189,7 +193,12 @@ public class BizSqrEnterpriseApplyServiceImpl implements BizSqrEnterpriseApplySe
|
|
189
|
193
|
bizSqrEnterpriseApplyMapper.delete(bizSqrEnterpriseApply.getId());
|
|
190
|
194
|
bizSqrEnterpriseApply.setCreateTime(new Date());
|
|
191
|
195
|
bizSqrEnterpriseApply.setUpdateTime(new Date());
|
|
192
|
|
-
|
|
|
196
|
+ if(bizSqrEnterpriseApply.getApplyType()==1){
|
|
|
197
|
+ if(bizSqrEnterprise!=null){
|
|
|
198
|
+ modelMap.put("error", "该企业已有承储资格,请勿重复申请");
|
|
|
199
|
+ return modelMap;
|
|
|
200
|
+ }
|
|
|
201
|
+ }
|
|
193
|
202
|
saveAndcreatEbizSqrEnterprise(bizSqrEnterpriseApply,userName);
|
|
194
|
203
|
saveAndcreatRequest(bizSqrEnterpriseApply,userName);
|
|
195
|
204
|
}
|
|
|
@@ -224,6 +233,7 @@ public class BizSqrEnterpriseApplyServiceImpl implements BizSqrEnterpriseApplySe
|
|
224
|
233
|
bizSqrEnterprise.setStatus(bizSqrEnterpriseApply.getApplyStatus());
|
|
225
|
234
|
bizSqrEnterprise.setCreateTime(new Date());
|
|
226
|
235
|
bizSqrEnterprise.setUpdateTime(new Date());
|
|
|
236
|
+
|
|
227
|
237
|
bizSqrEnterpriseService.add(bizSqrEnterprise);
|
|
228
|
238
|
bizSqrEnterpriseApply.setSqrEnterpriseId(bizSqrEnterprise.getId());
|
|
229
|
239
|
bizSqrEnterpriseApply.setCreateTime(new Date());
|