|
@@ -97,19 +97,19 @@ public class CooperatorController {
|
|
|
{
|
|
|
JSONObject req = JSON.parseObject(json);
|
|
|
String cooperator_name=req.getString("cooperator_name");
|
|
|
- CooperatorInfo dupCooperatorInfo= CooperatorService.findByCooperatorNum(cooperator_name);
|
|
|
- if (dupCooperatorInfo!=null){
|
|
|
+
|
|
|
+
|
|
|
+ List<CooperatorInfo> dupNumCooperatorInfo=CooperatorService.findByCorpCertificateNumAndType(req.getString("corpCertificateNum"),req.getString("corp_certificate_type"));
|
|
|
+ if (!dupNumCooperatorInfo.isEmpty())
|
|
|
return Result.error("合作方已存在!");
|
|
|
- }
|
|
|
|
|
|
+ System.out.println(req.getString("corp_certificate_type"));
|
|
|
CooperatorInfo cooperatorInfo = new CooperatorInfo();
|
|
|
cooperatorInfo.setCooperatorName(req.getString("cooperator_name"));
|
|
|
long time1 = System.currentTimeMillis();
|
|
|
cooperatorInfo.setCooperatorNum(Long.toString(time1));
|
|
|
cooperatorInfo.setCorpCertificateNum(req.getString("corpCertificateNum"));
|
|
|
cooperatorInfo.setCorpCertificateType(req.getString("corp_certificate_type"));
|
|
|
-// long time1 = System.currentTimeMillis();
|
|
|
-// cooperatorInfo.setCooperatorNum(Long.toString(time1));
|
|
|
cooperatorInfo.setTemplateId(req.getString("field_template_id"));
|
|
|
Calendar calendar= Calendar.getInstance();
|
|
|
SimpleDateFormat dateFormat= new SimpleDateFormat("yyyy-MM-dd :HH:mm:ss");
|