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