分包管理除法人姓名和分包商名称外,其他的不做必填
This commit is contained in:
parent
7bad0d8681
commit
0a8dd92f3c
|
|
@ -5,6 +5,7 @@ import com.bonus.gs.sub.evaluate.manager.utils.RegularCheckUtils;
|
|||
import com.bonus.gs.sub.evaluate.outsourceEnterprise.beans.ImportUserDataVo;
|
||||
import com.bonus.gs.sub.evaluate.outsourceEnterprise.beans.ViolationBean;
|
||||
import com.bonus.gs.sub.evaluate.outsourceEnterprise.dao.ViolationDao;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -28,13 +29,20 @@ public class ViolationServiceImpl implements ViolationService {
|
|||
@Override
|
||||
public AjaxRes addOutsourceEnterprise(ViolationBean o) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
if (!isValidChineseMobileNumber(o.getPhone()) || !isValidChineseMobileNumber(o.getPreSalesPhone())) {
|
||||
ar.setFailMsg("手机号码格式不正确!");
|
||||
return ar;
|
||||
if (StringUtils.isNotBlank(o.getPhone())) {
|
||||
if (!isValidChineseMobileNumber(o.getPhone())) {
|
||||
ar.setFailMsg("法人手机号码格式不正确!");
|
||||
return ar;
|
||||
}
|
||||
}
|
||||
if ( StringUtils.isNotBlank(o.getPreSalesPhone())) {
|
||||
if (!isValidChineseMobileNumber(o.getPreSalesPhone())) {
|
||||
ar.setFailMsg("售前委托人手机号码不正确!");
|
||||
return ar;
|
||||
}
|
||||
}
|
||||
|
||||
ViolationBean selected = new ViolationBean();
|
||||
|
||||
selected.setIdCard(o.getIdCard());
|
||||
int isAc = dao.getOutSourceNumById(selected);
|
||||
/*if(isAc>0){
|
||||
|
|
@ -50,19 +58,24 @@ public class ViolationServiceImpl implements ViolationService {
|
|||
return ar;
|
||||
}
|
||||
|
||||
selected = new ViolationBean();
|
||||
selected.setSocialCreditCode(o.getSocialCreditCode());
|
||||
isAc = dao.getOutSourceNumById(selected);
|
||||
if (isAc > 0) {
|
||||
ar.setFailMsg("统一社会信用代码已存在!");
|
||||
return ar;
|
||||
if (StringUtils.isNotBlank(o.getSocialCreditCode())) {
|
||||
selected = new ViolationBean();
|
||||
selected.setSocialCreditCode(o.getSocialCreditCode());
|
||||
isAc = dao.getOutSourceNumById(selected);
|
||||
if (isAc > 0) {
|
||||
ar.setFailMsg("统一社会信用代码已存在!");
|
||||
return ar;
|
||||
}
|
||||
}
|
||||
selected = new ViolationBean();
|
||||
selected.setPhone(o.getPhone());
|
||||
isAc = dao.getOutSourceNumById(selected);
|
||||
if (isAc > 0) {
|
||||
ar.setFailMsg("手机号码已存在!");
|
||||
return ar;
|
||||
|
||||
if (StringUtils.isNotBlank(o.getPhone())) {
|
||||
selected = new ViolationBean();
|
||||
selected.setPhone(o.getPhone());
|
||||
isAc = dao.getOutSourceNumById(selected);
|
||||
if (isAc > 0) {
|
||||
ar.setFailMsg("手机号码已存在!");
|
||||
return ar;
|
||||
}
|
||||
}
|
||||
|
||||
int num = dao.addOutsourceEnterprise(o);
|
||||
|
|
@ -96,9 +109,17 @@ public class ViolationServiceImpl implements ViolationService {
|
|||
@Override
|
||||
public AjaxRes updateOutsourceEnterprise(ViolationBean o) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
if (!isValidChineseMobileNumber(o.getPhone()) || !isValidChineseMobileNumber(o.getPreSalesPhone())) {
|
||||
ar.setFailMsg("手机号码格式不正确!");
|
||||
return ar;
|
||||
if (StringUtils.isNotBlank(o.getPhone())) {
|
||||
if (!isValidChineseMobileNumber(o.getPhone())) {
|
||||
ar.setFailMsg("法人手机号码格式不正确!");
|
||||
return ar;
|
||||
}
|
||||
}
|
||||
if ( StringUtils.isNotBlank(o.getPreSalesPhone())) {
|
||||
if (!isValidChineseMobileNumber(o.getPreSalesPhone())) {
|
||||
ar.setFailMsg("售前委托人手机号码不正确!");
|
||||
return ar;
|
||||
}
|
||||
}
|
||||
|
||||
ViolationBean selected = new ViolationBean();
|
||||
|
|
@ -119,21 +140,25 @@ public class ViolationServiceImpl implements ViolationService {
|
|||
return ar;
|
||||
}
|
||||
|
||||
selected = new ViolationBean();
|
||||
selected.setId(o.getId());
|
||||
selected.setSocialCreditCode(o.getSocialCreditCode());
|
||||
isAc = dao.getOutSourceNumById(selected);
|
||||
if (isAc > 0) {
|
||||
ar.setFailMsg("统一社会信用代码已存在!");
|
||||
return ar;
|
||||
if (StringUtils.isNotBlank(o.getSocialCreditCode())) {
|
||||
selected = new ViolationBean();
|
||||
selected.setId(o.getId());
|
||||
selected.setSocialCreditCode(o.getSocialCreditCode());
|
||||
isAc = dao.getOutSourceNumById(selected);
|
||||
if (isAc > 0) {
|
||||
ar.setFailMsg("统一社会信用代码已存在!");
|
||||
return ar;
|
||||
}
|
||||
}
|
||||
selected = new ViolationBean();
|
||||
selected.setId(o.getId());
|
||||
selected.setPhone(o.getPhone());
|
||||
isAc = dao.getOutSourceNumById(selected);
|
||||
if (isAc > 0) {
|
||||
ar.setFailMsg("手机号码已存在!");
|
||||
return ar;
|
||||
if (StringUtils.isNotBlank(o.getPhone())) {
|
||||
selected = new ViolationBean();
|
||||
selected.setId(o.getId());
|
||||
selected.setPhone(o.getPhone());
|
||||
isAc = dao.getOutSourceNumById(selected);
|
||||
if (isAc > 0) {
|
||||
ar.setFailMsg("手机号码已存在!");
|
||||
return ar;
|
||||
}
|
||||
}
|
||||
|
||||
int num = dao.updateOutsourceEnterprise(o);
|
||||
|
|
@ -173,9 +198,6 @@ public class ViolationServiceImpl implements ViolationService {
|
|||
/**
|
||||
* 导入数据校验
|
||||
*
|
||||
* @param socialCreditCode
|
||||
* @param idCard
|
||||
* @param phone
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -45,21 +45,21 @@
|
|||
<label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>企业名称:</label>
|
||||
<div class="layui-input-inline" style="width: 60%">
|
||||
<input type="text" lay-affix="clear" id="enterpriseName" name="enterpriseName" autocomplete="off"
|
||||
class="layui-input" lay-verify="required" maxlength="20">
|
||||
lay-verify="required" class="layui-input" maxlength="20">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline" style="width: 50%">
|
||||
<label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>统一社会信用代码:</label>
|
||||
<label class="layui-form-label" style="width: 150px"><span style="color: red"></span>统一社会信用代码:</label>
|
||||
<div class="layui-input-inline" style="width: 60%">
|
||||
<input type="text" lay-affix="clear" id="socialCreditCode" name="socialCreditCode"
|
||||
autocomplete="off" class="layui-input" lay-verify="required" maxlength="30">
|
||||
autocomplete="off" class="layui-input" maxlength="30">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline" style="width: 50%">
|
||||
<label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>成立日期:</label>
|
||||
<label class="layui-form-label" style="width: 150px"><span style="color: red"></span>成立日期:</label>
|
||||
<div class="layui-input-inline" style="width: 60%">
|
||||
<input type="text" lay-affix="clear" class="layui-input" id="setTime" name="setTime"
|
||||
lay-verify="required" autocomplete="off" >
|
||||
autocomplete="off" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline" style="width: 50%">
|
||||
|
|
@ -79,32 +79,32 @@
|
|||
<!-- </div>-->
|
||||
<div class="layui-inline" style="width: 50%">
|
||||
<label class="layui-form-label" style="width: 150px"><span
|
||||
style="color: red">*</span>法人手机号码:</label>
|
||||
style="color: red"></span>法人手机号码:</label>
|
||||
<div class="layui-input-inline" style="width: 60%">
|
||||
<input type="text" maxlength="11" lay-affix="clear" id="phone" name="phone" autocomplete="off"
|
||||
class="layui-input" lay-verify="required|phone">
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline" style="width: 50%">
|
||||
<label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>单位地址:</label>
|
||||
<label class="layui-form-label" style="width: 150px"><span style="color: red"></span>单位地址:</label>
|
||||
<div class="layui-input-inline" style="width: 60%">
|
||||
<input type="text" maxlength="30" lay-affix="clear" id="address" name="address"
|
||||
autocomplete="off" class="layui-input" lay-verify="required">
|
||||
autocomplete="off" class="layui-input" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline" style="width: 50%">
|
||||
<label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>售前委托人:</label>
|
||||
<label class="layui-form-label" style="width: 150px"><span style="color: red"></span>售前委托人:</label>
|
||||
<div class="layui-input-inline" style="width: 60%">
|
||||
<input type="text" maxlength="10" lay-affix="clear" id="preSalesMan" name="preSalesMan"
|
||||
autocomplete="off" class="layui-input" lay-verify="required">
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline" style="width: 50%">
|
||||
<label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>售前委托人电话:</label>
|
||||
<label class="layui-form-label" style="width: 150px"><span style="color: red"></span>售前委托人电话:</label>
|
||||
<div class="layui-input-inline" style="width: 60%">
|
||||
<input type="text" maxlength="11" lay-affix="clear" id="preSalesPhone" name="preSalesPhone"
|
||||
autocomplete="off" class="layui-input" lay-verify="required">
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -191,13 +191,17 @@
|
|||
// layer.msg("身份证号码格式不正确", {icon: 2, time: 2000});
|
||||
// return false;
|
||||
// }
|
||||
if (!phone_reg($("#phone").val())) {
|
||||
layer.msg("法人手机号码格式不正确", {icon: 2, time: 2000});
|
||||
return false;
|
||||
if ($("#phone").val()){
|
||||
if (!phone_reg($("#phone").val())) {
|
||||
layer.msg("法人手机号码格式不正确", {icon: 2, time: 2000});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!phone_reg($("#preSalesPhone").val())) {
|
||||
layer.msg("售前委托人手机号码格式不正确", {icon: 2, time: 2000});
|
||||
return false;
|
||||
if ($("#preSalesPhone").val()){
|
||||
if (!phone_reg($("#preSalesPhone").val())) {
|
||||
layer.msg("售前委托人手机号码格式不正确", {icon: 2, time: 2000});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
checkLoginNameIsExist($("#enterpriseName").val(),data);
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue