分包商管理增加售前委托人
This commit is contained in:
parent
3408e349f7
commit
7bad0d8681
|
|
@ -76,6 +76,10 @@ public class ViolationBean {
|
||||||
private String identification;
|
private String identification;
|
||||||
@ApiModelProperty("部门名称")
|
@ApiModelProperty("部门名称")
|
||||||
private String deptName;
|
private String deptName;
|
||||||
|
@ApiModelProperty("售前委托人")
|
||||||
|
private String preSalesMan;
|
||||||
|
@ApiModelProperty("售前委托人电话")
|
||||||
|
private String preSalesPhone;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,10 @@ public class ViolationController extends BaseController<ViolationBean> {
|
||||||
if (StringUtils.isNotBlank(phone)) {
|
if (StringUtils.isNotBlank(phone)) {
|
||||||
violationBean.setPhone(AesCbcUtils.encrypt(phone));
|
violationBean.setPhone(AesCbcUtils.encrypt(phone));
|
||||||
}
|
}
|
||||||
|
String preSalesPhone = violationBean.getPreSalesPhone();
|
||||||
|
if (StringUtils.isNotBlank(preSalesPhone)) {
|
||||||
|
violationBean.setPreSalesPhone(AesCbcUtils.encrypt(preSalesPhone));
|
||||||
|
}
|
||||||
String idCard = violationBean.getIdCard();
|
String idCard = violationBean.getIdCard();
|
||||||
if (StringUtils.isNotBlank(idCard)) {
|
if (StringUtils.isNotBlank(idCard)) {
|
||||||
violationBean.setIdCard(AesCbcUtils.encrypt(idCard));
|
violationBean.setIdCard(AesCbcUtils.encrypt(idCard));
|
||||||
|
|
@ -186,6 +190,7 @@ public class ViolationController extends BaseController<ViolationBean> {
|
||||||
o.setId(id);
|
o.setId(id);
|
||||||
ViolationBean result = service.toViewOutsourceEnterprise(o);
|
ViolationBean result = service.toViewOutsourceEnterprise(o);
|
||||||
result.setPhone(AesCbcUtils.encrypt(result.getPhone()));
|
result.setPhone(AesCbcUtils.encrypt(result.getPhone()));
|
||||||
|
result.setPreSalesPhone(AesCbcUtils.encrypt(result.getPreSalesPhone()));
|
||||||
ar.setSucceed(result);
|
ar.setSucceed(result);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
@ -251,7 +256,6 @@ public class ViolationController extends BaseController<ViolationBean> {
|
||||||
if (hssfSheet != null) {
|
if (hssfSheet != null) {
|
||||||
// 遍历行row,continue只是终止本次循环,接着还执行后面的循环
|
// 遍历行row,continue只是终止本次循环,接着还执行后面的循环
|
||||||
int rowNum = hssfSheet.getLastRowNum();
|
int rowNum = hssfSheet.getLastRowNum();
|
||||||
boolean hasEmptyRow = false;
|
|
||||||
// 从第三行开始
|
// 从第三行开始
|
||||||
for (int rownum = 2; rownum <= rowNum; rownum++) {
|
for (int rownum = 2; rownum <= rowNum; rownum++) {
|
||||||
// 获取到每一行
|
// 获取到每一行
|
||||||
|
|
@ -393,7 +397,9 @@ public class ViolationController extends BaseController<ViolationBean> {
|
||||||
String corporateName = getValue(sheetRow.getCell(3)).trim();
|
String corporateName = getValue(sheetRow.getCell(3)).trim();
|
||||||
String idCard = getValue(sheetRow.getCell(4)).trim();
|
String idCard = getValue(sheetRow.getCell(4)).trim();
|
||||||
String phone = translateToPlainStr(getValue(sheetRow.getCell(5)).trim());
|
String phone = translateToPlainStr(getValue(sheetRow.getCell(5)).trim());
|
||||||
String address = translateToPlainStr(getValue(sheetRow.getCell(6)).trim());
|
String address = getValue(sheetRow.getCell(6)).trim();
|
||||||
|
String preSalesMan = getValue(sheetRow.getCell(7)).trim();
|
||||||
|
String preSalesPhone = translateToPlainStr(getValue(sheetRow.getCell(8)).trim());
|
||||||
bean.setEnterpriseName(enterpriseName);
|
bean.setEnterpriseName(enterpriseName);
|
||||||
bean.setSocialCreditCode(socialCreditCode);
|
bean.setSocialCreditCode(socialCreditCode);
|
||||||
bean.setSetTime(setTime);
|
bean.setSetTime(setTime);
|
||||||
|
|
@ -401,6 +407,8 @@ public class ViolationController extends BaseController<ViolationBean> {
|
||||||
bean.setIdCard(idCard);
|
bean.setIdCard(idCard);
|
||||||
bean.setPhone(phone);
|
bean.setPhone(phone);
|
||||||
bean.setAddress(address);
|
bean.setAddress(address);
|
||||||
|
bean.setPreSalesMan(preSalesMan);
|
||||||
|
bean.setPreSalesPhone(preSalesPhone);
|
||||||
ar = service.updateShopBaseInfo(bean, row);
|
ar = service.updateShopBaseInfo(bean, row);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error(e.toString(), e);
|
logger.error(e.toString(), e);
|
||||||
|
|
@ -578,6 +586,8 @@ public class ViolationController extends BaseController<ViolationBean> {
|
||||||
maps.put("phone", bean.getPhone());
|
maps.put("phone", bean.getPhone());
|
||||||
maps.put("proNum", bean.getProNum());
|
maps.put("proNum", bean.getProNum());
|
||||||
maps.put("address", bean.getAddress());
|
maps.put("address", bean.getAddress());
|
||||||
|
maps.put("preSalesMan", bean.getPreSalesMan());
|
||||||
|
maps.put("preSalesPhone", bean.getPreSalesPhone());
|
||||||
break;
|
break;
|
||||||
case "人员违章记录表":
|
case "人员违章记录表":
|
||||||
maps.put("name", bean.getName());
|
maps.put("name", bean.getName());
|
||||||
|
|
@ -658,6 +668,8 @@ public class ViolationController extends BaseController<ViolationBean> {
|
||||||
list.add("法人手机号码");
|
list.add("法人手机号码");
|
||||||
list.add("项目数量");
|
list.add("项目数量");
|
||||||
list.add("单位地址");
|
list.add("单位地址");
|
||||||
|
list.add("售前委托人姓名");
|
||||||
|
list.add("售前委托人电话");
|
||||||
break;
|
break;
|
||||||
case "人员违章记录表":
|
case "人员违章记录表":
|
||||||
list.add("姓名");
|
list.add("姓名");
|
||||||
|
|
|
||||||
|
|
@ -17,241 +17,242 @@ import java.util.List;
|
||||||
@Service("ViolationService")
|
@Service("ViolationService")
|
||||||
public class ViolationServiceImpl implements ViolationService {
|
public class ViolationServiceImpl implements ViolationService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ViolationDao dao;
|
private ViolationDao dao;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param o
|
* @param o
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AjaxRes addOutsourceEnterprise(ViolationBean o) {
|
public AjaxRes addOutsourceEnterprise(ViolationBean o) {
|
||||||
AjaxRes ar = new AjaxRes();
|
AjaxRes ar = new AjaxRes();
|
||||||
if(!isValidChineseMobileNumber(o.getPhone())){
|
if (!isValidChineseMobileNumber(o.getPhone()) || !isValidChineseMobileNumber(o.getPreSalesPhone())) {
|
||||||
ar.setFailMsg("手机号码格式不正确!");
|
ar.setFailMsg("手机号码格式不正确!");
|
||||||
return ar;
|
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){
|
||||||
ar.setFailMsg("身份证号码已存在!");
|
ar.setFailMsg("身份证号码已存在!");
|
||||||
return ar;
|
return ar;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
selected=new ViolationBean();
|
selected = new ViolationBean();
|
||||||
selected.setEnterpriseName(o.getEnterpriseName());
|
selected.setEnterpriseName(o.getEnterpriseName());
|
||||||
isAc =dao.getOutSourceNumById(selected);
|
isAc = dao.getOutSourceNumById(selected);
|
||||||
if(isAc>0){
|
if (isAc > 0) {
|
||||||
ar.setFailMsg("企业名称已存在!");
|
ar.setFailMsg("企业名称已存在!");
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
|
|
||||||
selected=new ViolationBean();
|
selected = new ViolationBean();
|
||||||
selected.setSocialCreditCode(o.getSocialCreditCode());
|
selected.setSocialCreditCode(o.getSocialCreditCode());
|
||||||
isAc =dao.getOutSourceNumById(selected);
|
isAc = dao.getOutSourceNumById(selected);
|
||||||
if(isAc>0){
|
if (isAc > 0) {
|
||||||
ar.setFailMsg("统一社会信用代码已存在!");
|
ar.setFailMsg("统一社会信用代码已存在!");
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
selected=new ViolationBean();
|
selected = new ViolationBean();
|
||||||
selected.setPhone(o.getPhone());
|
selected.setPhone(o.getPhone());
|
||||||
isAc =dao.getOutSourceNumById(selected);
|
isAc = dao.getOutSourceNumById(selected);
|
||||||
if(isAc>0){
|
if (isAc > 0) {
|
||||||
ar.setFailMsg("手机号码已存在!");
|
ar.setFailMsg("手机号码已存在!");
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
|
|
||||||
int num=dao.addOutsourceEnterprise(o);
|
int num = dao.addOutsourceEnterprise(o);
|
||||||
if(num>0){
|
if (num > 0) {
|
||||||
ar.setSucceedMsg("违章新增成功!");
|
ar.setSucceedMsg("分包商新增成功!");
|
||||||
}else {
|
} else {
|
||||||
ar.setFailMsg("新增失败!");
|
ar.setFailMsg("新增失败!");
|
||||||
}
|
}
|
||||||
|
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
public static boolean isValidChineseMobileNumber(String number) {
|
|
||||||
String regex = "^1[3-9]\\d{9}$";
|
|
||||||
return number.matches(regex);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
public static boolean isValidChineseMobileNumber(String number) {
|
||||||
* @param o
|
String regex = "^1[3-9]\\d{9}$";
|
||||||
* @return
|
return number.matches(regex);
|
||||||
*/
|
}
|
||||||
@Override
|
|
||||||
public ViolationBean toViewOutsourceEnterprise(ViolationBean o) {
|
|
||||||
return dao.toViewOutsourceEnterprise(o);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param o
|
* @param o
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AjaxRes updateOutsourceEnterprise(ViolationBean o) {
|
public ViolationBean toViewOutsourceEnterprise(ViolationBean o) {
|
||||||
AjaxRes ar = new AjaxRes();
|
return dao.toViewOutsourceEnterprise(o);
|
||||||
if(!isValidChineseMobileNumber(o.getPhone())){
|
}
|
||||||
ar.setFailMsg("手机号码格式不正确!");
|
|
||||||
return ar;
|
|
||||||
}
|
|
||||||
|
|
||||||
ViolationBean selected=new ViolationBean();
|
/**
|
||||||
selected.setId(o.getId());
|
* @param o
|
||||||
selected.setIdCard(o.getIdCard());
|
* @return
|
||||||
int isAc =dao.getOutSourceNumById(selected);
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxRes updateOutsourceEnterprise(ViolationBean o) {
|
||||||
|
AjaxRes ar = new AjaxRes();
|
||||||
|
if (!isValidChineseMobileNumber(o.getPhone()) || !isValidChineseMobileNumber(o.getPreSalesPhone())) {
|
||||||
|
ar.setFailMsg("手机号码格式不正确!");
|
||||||
|
return ar;
|
||||||
|
}
|
||||||
|
|
||||||
|
ViolationBean selected = new ViolationBean();
|
||||||
|
selected.setId(o.getId());
|
||||||
|
selected.setIdCard(o.getIdCard());
|
||||||
|
int isAc = dao.getOutSourceNumById(selected);
|
||||||
/*if(isAc>0){
|
/*if(isAc>0){
|
||||||
ar.setFailMsg("身份证号码已存在!");
|
ar.setFailMsg("身份证号码已存在!");
|
||||||
return ar;
|
return ar;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
selected=new ViolationBean();
|
selected = new ViolationBean();
|
||||||
selected.setId(o.getId());
|
selected.setId(o.getId());
|
||||||
selected.setEnterpriseName(o.getEnterpriseName());
|
selected.setEnterpriseName(o.getEnterpriseName());
|
||||||
isAc =dao.getOutSourceNumById(selected);
|
isAc = dao.getOutSourceNumById(selected);
|
||||||
if(isAc>0){
|
if (isAc > 0) {
|
||||||
ar.setFailMsg("企业名称已存在!");
|
ar.setFailMsg("企业名称已存在!");
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
|
|
||||||
selected=new ViolationBean();
|
selected = new ViolationBean();
|
||||||
selected.setId(o.getId());
|
selected.setId(o.getId());
|
||||||
selected.setSocialCreditCode(o.getSocialCreditCode());
|
selected.setSocialCreditCode(o.getSocialCreditCode());
|
||||||
isAc =dao.getOutSourceNumById(selected);
|
isAc = dao.getOutSourceNumById(selected);
|
||||||
if(isAc>0){
|
if (isAc > 0) {
|
||||||
ar.setFailMsg("统一社会信用代码已存在!");
|
ar.setFailMsg("统一社会信用代码已存在!");
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
selected=new ViolationBean();
|
selected = new ViolationBean();
|
||||||
selected.setId(o.getId());
|
selected.setId(o.getId());
|
||||||
selected.setPhone(o.getPhone());
|
selected.setPhone(o.getPhone());
|
||||||
isAc =dao.getOutSourceNumById(selected);
|
isAc = dao.getOutSourceNumById(selected);
|
||||||
if(isAc>0){
|
if (isAc > 0) {
|
||||||
ar.setFailMsg("手机号码已存在!");
|
ar.setFailMsg("手机号码已存在!");
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
|
|
||||||
int num=dao.updateOutsourceEnterprise(o);
|
int num = dao.updateOutsourceEnterprise(o);
|
||||||
if(num>0){
|
if (num > 0) {
|
||||||
ar.setSucceedMsg("修改成功!");
|
ar.setSucceedMsg("修改成功!");
|
||||||
}else {
|
} else {
|
||||||
ar.setFailMsg("修改失败!");
|
ar.setFailMsg("修改失败!");
|
||||||
}
|
}
|
||||||
|
|
||||||
ar.setSucceedMsg("外包企业修改成功!");
|
ar.setSucceedMsg("外包企业修改成功!");
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int outsourceEnterpriseDelete(String[] id) {
|
public int outsourceEnterpriseDelete(String[] id) {
|
||||||
return dao.outsourceEnterpriseDelete(id);
|
return dao.outsourceEnterpriseDelete(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param bean
|
* @param bean
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<ViolationBean> exportOutsourceEnterprise(ViolationBean bean) {
|
public List<ViolationBean> exportOutsourceEnterprise(ViolationBean bean) {
|
||||||
return dao.exportOutsourceEnterprise(bean);
|
return dao.exportOutsourceEnterprise(bean);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ViolationBean> getOutsourceEnterpriseByPage(ViolationBean o) {
|
public List<ViolationBean> getOutsourceEnterpriseByPage(ViolationBean o) {
|
||||||
return dao.getOutsourceEnterpriseByPage(o);
|
return dao.getOutsourceEnterpriseByPage(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入数据校验
|
* 导入数据校验
|
||||||
* @param socialCreditCode
|
*
|
||||||
* @param idCard
|
* @param socialCreditCode
|
||||||
* @param phone
|
* @param idCard
|
||||||
* @return
|
* @param phone
|
||||||
*/
|
* @return
|
||||||
@Override
|
*/
|
||||||
public Integer getImportDataCheck(ImportUserDataVo dataVo) {
|
@Override
|
||||||
return dao.getImportDataCheck(dataVo);
|
public Integer getImportDataCheck(ImportUserDataVo dataVo) {
|
||||||
}
|
return dao.getImportDataCheck(dataVo);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param enterpriseName
|
* @param enterpriseName
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param bean
|
* @param bean
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AjaxRes updateShopBaseInfo(ViolationBean bean,int row) {
|
public AjaxRes updateShopBaseInfo(ViolationBean bean, int row) {
|
||||||
AjaxRes ar = new AjaxRes();
|
AjaxRes ar = new AjaxRes();
|
||||||
if(!RegularCheckUtils.verificationPhone(bean.getPhone())){
|
if (!RegularCheckUtils.verificationPhone(bean.getPhone()) || !RegularCheckUtils.verificationPhone(bean.getPreSalesPhone())) {
|
||||||
ar.setFailMsg("第" + row + "行手机号码格式不正确!");
|
ar.setFailMsg("第" + row + "行手机号码格式不正确!");
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
if (!RegularCheckUtils.verificationIdCard(bean.getIdCard())) {
|
if (!RegularCheckUtils.verificationIdCard(bean.getIdCard())) {
|
||||||
ar.setFailMsg("第" + row + "行身份证号码格式不正确!");
|
ar.setFailMsg("第" + row + "行身份证号码格式不正确!");
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
ViolationBean selected=new ViolationBean();
|
ViolationBean selected = new ViolationBean();
|
||||||
selected.setIdCard(bean.getIdCard());
|
selected.setIdCard(bean.getIdCard());
|
||||||
int isAc =dao.getOutSourceNumById(selected);
|
int isAc = dao.getOutSourceNumById(selected);
|
||||||
if(isAc>0){
|
if (isAc > 0) {
|
||||||
ar.setFailMsg("第" + row + "行身份证号码已存在!");
|
ar.setFailMsg("第" + row + "行身份证号码已存在!");
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
|
|
||||||
selected=new ViolationBean();
|
selected = new ViolationBean();
|
||||||
selected.setEnterpriseName(bean.getEnterpriseName());
|
selected.setEnterpriseName(bean.getEnterpriseName());
|
||||||
isAc =dao.getOutSourceNumById(selected);
|
isAc = dao.getOutSourceNumById(selected);
|
||||||
if(isAc>0){
|
if (isAc > 0) {
|
||||||
ar.setFailMsg("第" + row + "企业名称已存在!");
|
ar.setFailMsg("第" + row + "企业名称已存在!");
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
|
|
||||||
selected=new ViolationBean();
|
selected = new ViolationBean();
|
||||||
selected.setSocialCreditCode(bean.getSocialCreditCode());
|
selected.setSocialCreditCode(bean.getSocialCreditCode());
|
||||||
isAc =dao.getOutSourceNumById(selected);
|
isAc = dao.getOutSourceNumById(selected);
|
||||||
if(isAc>0){
|
if (isAc > 0) {
|
||||||
ar.setFailMsg("第" + row + "统一社会信用代码已存在!");
|
ar.setFailMsg("第" + row + "统一社会信用代码已存在!");
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
selected=new ViolationBean();
|
selected = new ViolationBean();
|
||||||
selected.setPhone(bean.getPhone());
|
selected.setPhone(bean.getPhone());
|
||||||
isAc =dao.getOutSourceNumById(selected);
|
isAc = dao.getOutSourceNumById(selected);
|
||||||
if(isAc>0){
|
if (isAc > 0) {
|
||||||
ar.setFailMsg("第" + row + "手机号码已存在!");
|
ar.setFailMsg("第" + row + "手机号码已存在!");
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
int num=dao.addShopBaseInfo(bean);
|
int num = dao.addShopBaseInfo(bean);
|
||||||
if(num>0){
|
if (num > 0) {
|
||||||
ar.setSucceedMsg("第" + row + "新增成功!");
|
ar.setSucceedMsg("第" + row + "新增成功!");
|
||||||
}else {
|
} else {
|
||||||
ar.setFailMsg("第" + row + "新增失败!,前几行数据新增成功");
|
ar.setFailMsg("第" + row + "新增失败!,前几行数据新增成功");
|
||||||
}
|
}
|
||||||
return ar;
|
return ar;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
/**
|
* @param bean
|
||||||
* @param bean
|
* @return
|
||||||
* @return
|
*/
|
||||||
*/
|
@Override
|
||||||
@Override
|
public List<ViolationBean> exportSubpageList(ViolationBean bean) {
|
||||||
public List<ViolationBean> exportSubpageList(ViolationBean bean) {
|
return dao.exportSubpageList(bean);
|
||||||
return dao.exportSubpageList(bean);
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -14,6 +14,8 @@
|
||||||
create_time,
|
create_time,
|
||||||
update_time,
|
update_time,
|
||||||
address,
|
address,
|
||||||
|
pre_sales_man,
|
||||||
|
pre_sales_phone,
|
||||||
is_active
|
is_active
|
||||||
)
|
)
|
||||||
values(
|
values(
|
||||||
|
|
@ -28,6 +30,8 @@
|
||||||
now(),
|
now(),
|
||||||
now(),
|
now(),
|
||||||
#{address},
|
#{address},
|
||||||
|
#{preSalesMan},
|
||||||
|
#{preSalesPhone},
|
||||||
'1'
|
'1'
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
@ -40,6 +44,8 @@
|
||||||
idCard,
|
idCard,
|
||||||
phone,
|
phone,
|
||||||
address,
|
address,
|
||||||
|
pre_sales_man,
|
||||||
|
pre_sales_phone,
|
||||||
inThoseDays,
|
inThoseDays,
|
||||||
currentScore,
|
currentScore,
|
||||||
create_time,
|
create_time,
|
||||||
|
|
@ -54,6 +60,8 @@
|
||||||
#{idCard},
|
#{idCard},
|
||||||
#{phone},
|
#{phone},
|
||||||
#{address},
|
#{address},
|
||||||
|
#{preSalesMan},
|
||||||
|
#{preSalesPhone},
|
||||||
YEAR(NOW()),
|
YEAR(NOW()),
|
||||||
'12',
|
'12',
|
||||||
now(),
|
now(),
|
||||||
|
|
@ -72,6 +80,8 @@
|
||||||
inThoseDays = #{inThoseDays},
|
inThoseDays = #{inThoseDays},
|
||||||
currentScore = #{currentScore},
|
currentScore = #{currentScore},
|
||||||
address = #{address},
|
address = #{address},
|
||||||
|
pre_sales_man = #{preSalesMan},
|
||||||
|
pre_sales_phone = #{preSalesPhone},
|
||||||
update_time = now()
|
update_time = now()
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
@ -119,7 +129,9 @@
|
||||||
pa.corporateName as corporateName,
|
pa.corporateName as corporateName,
|
||||||
pa.idCard as idCard,
|
pa.idCard as idCard,
|
||||||
pa.phone as phone,
|
pa.phone as phone,
|
||||||
pa.address as address
|
pa.address as address,
|
||||||
|
pa.pre_sales_man as preSalesMan,
|
||||||
|
pa.pre_sales_phone as preSalesPhone
|
||||||
FROM project_assignment pa
|
FROM project_assignment pa
|
||||||
LEFT JOIN(SELECT count(1) num, lk_id
|
LEFT JOIN(SELECT count(1) num, lk_id
|
||||||
FROM pm_org_info
|
FROM pm_org_info
|
||||||
|
|
@ -138,6 +150,8 @@
|
||||||
pa.idCard as idCard,
|
pa.idCard as idCard,
|
||||||
pa.phone as phone,
|
pa.phone as phone,
|
||||||
pa.address as address,
|
pa.address as address,
|
||||||
|
pa.pre_sales_man as preSalesMan,
|
||||||
|
pa.pre_sales_phone as preSalesPhone,
|
||||||
ifnull(pro.num,'0') as proNum
|
ifnull(pro.num,'0') as proNum
|
||||||
FROM project_assignment pa
|
FROM project_assignment pa
|
||||||
LEFT JOIN(
|
LEFT JOIN(
|
||||||
|
|
@ -302,7 +316,9 @@
|
||||||
pa.corporateName as corporateName,
|
pa.corporateName as corporateName,
|
||||||
pa.idCard as idCard,ifnull(pro.num,'0') proNum,
|
pa.idCard as idCard,ifnull(pro.num,'0') proNum,
|
||||||
pa.phone as phone,
|
pa.phone as phone,
|
||||||
pa.address as address
|
pa.address as address,
|
||||||
|
pa.pre_sales_man as preSalesMan,
|
||||||
|
pa.pre_sales_phone as preSalesPhone
|
||||||
FROM project_assignment pa
|
FROM project_assignment pa
|
||||||
LEFT JOIN(
|
LEFT JOIN(
|
||||||
SELECT count(1) num ,lk_id FROM pm_org_info GROUP BY lk_id
|
SELECT count(1) num ,lk_id FROM pm_org_info GROUP BY lk_id
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,20 @@
|
||||||
autocomplete="off" class="layui-input" lay-verify="required">
|
autocomplete="off" class="layui-input" lay-verify="required">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-inline" style="width: 50%">
|
||||||
|
<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">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline" style="width: 50%">
|
||||||
|
<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">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item" style="display: none">
|
<div class="layui-form-item" style="display: none">
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
|
|
@ -136,6 +150,8 @@
|
||||||
$("#idCard").val(obj.idCard);
|
$("#idCard").val(obj.idCard);
|
||||||
$("#phone").val(decryptCBC(obj.phone));
|
$("#phone").val(decryptCBC(obj.phone));
|
||||||
$("#address").val(obj.address);
|
$("#address").val(obj.address);
|
||||||
|
$("#preSalesMan").val(obj.preSalesMan);
|
||||||
|
$("#preSalesPhone").val(decryptCBC(obj.preSalesPhone));
|
||||||
} else {
|
} else {
|
||||||
layer.msg(data.resMsg, {icon: 2, time: 2000});
|
layer.msg(data.resMsg, {icon: 2, time: 2000});
|
||||||
}
|
}
|
||||||
|
|
@ -176,7 +192,11 @@
|
||||||
// return false;
|
// return false;
|
||||||
// }
|
// }
|
||||||
if (!phone_reg($("#phone").val())) {
|
if (!phone_reg($("#phone").val())) {
|
||||||
layer.msg("手机号码格式不正确", {icon: 2, time: 2000});
|
layer.msg("法人手机号码格式不正确", {icon: 2, time: 2000});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!phone_reg($("#preSalesPhone").val())) {
|
||||||
|
layer.msg("售前委托人手机号码格式不正确", {icon: 2, time: 2000});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
checkLoginNameIsExist($("#enterpriseName").val(),data);
|
checkLoginNameIsExist($("#enterpriseName").val(),data);
|
||||||
|
|
@ -195,6 +215,8 @@
|
||||||
params.phone = encryptCBC(data.phone)
|
params.phone = encryptCBC(data.phone)
|
||||||
params.setTime = encryptCBC(data.setTime)
|
params.setTime = encryptCBC(data.setTime)
|
||||||
params.socialCreditCode = encryptCBC(data.socialCreditCode)
|
params.socialCreditCode = encryptCBC(data.socialCreditCode)
|
||||||
|
params.preSalesMan = encryptCBC(data.preSalesMan)
|
||||||
|
params.preSalesPhone = encryptCBC(data.preSalesPhone)
|
||||||
params.id = encryptCBC(getUrlParam("id"))
|
params.id = encryptCBC(getUrlParam("id"))
|
||||||
var idx = layer.msg('正在提交保存,请稍等...', {
|
var idx = layer.msg('正在提交保存,请稍等...', {
|
||||||
icon: 16
|
icon: 16
|
||||||
|
|
|
||||||
|
|
@ -37,12 +37,14 @@
|
||||||
<div class="layui-container" style="width: 100%;height: 100%;padding: 10px">
|
<div class="layui-container" style="width: 100%;height: 100%;padding: 10px">
|
||||||
<form id="baseForm" class="layui-form" method="POST" onsubmit="return false;">
|
<form id="baseForm" class="layui-form" method="POST" onsubmit="return false;">
|
||||||
<div class="layui-inline" style="width: 100%;display: flex;flex-direction: row">
|
<div class="layui-inline" style="width: 100%;display: flex;flex-direction: row">
|
||||||
<input type="text" name="keyWord" id="keyWord" autocomplete="off" placeholder="请输入企业名称" class="layui-input"
|
<input type="text" name="keyWord" id="keyWord" autocomplete="off" placeholder="请输入企业名称"
|
||||||
|
class="layui-input"
|
||||||
style="width: 15%"
|
style="width: 15%"
|
||||||
maxlength="30">
|
maxlength="30">
|
||||||
<input id="socialCreditCode" type="text" name="socialCreditCode" placeholder="请输入统一社会信用代码"
|
<input id="socialCreditCode" type="text" name="socialCreditCode" placeholder="请输入统一社会信用代码"
|
||||||
class="layui-input" autocomplete="off" style="margin-left: 10px;width: 15%"/>
|
class="layui-input" autocomplete="off" style="margin-left: 10px;width: 15%"/>
|
||||||
<input id="corporateName" type="text" autocomplete="off" name="corporateName" placeholder="请输入法人姓名" class="layui-input"
|
<input id="corporateName" type="text" autocomplete="off" name="corporateName" placeholder="请输入法人姓名"
|
||||||
|
class="layui-input"
|
||||||
style="margin-left: 10px;width: 15%"/>
|
style="margin-left: 10px;width: 15%"/>
|
||||||
|
|
||||||
<button id='searchBtn' class="layui-btn layui-btn-warm" title="过滤" type="button"
|
<button id='searchBtn' class="layui-btn layui-btn-warm" title="过滤" type="button"
|
||||||
|
|
@ -138,13 +140,29 @@
|
||||||
// return maskSensitiveInfo(idCard, "idCard");
|
// return maskSensitiveInfo(idCard, "idCard");
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
{ field: 'phone', title: '联系电话', width: '15%', align: "center",
|
{
|
||||||
|
field: 'phone', title: '联系电话', width: '15%', align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
let phone = decryptCBC(d.phone);
|
let phone = decryptCBC(d.phone);
|
||||||
return maskSensitiveInfo(phone, "phone");
|
return maskSensitiveInfo(phone, "phone");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'address', title: '单位地址', width: '15%', align: "center" },
|
{field: 'address', title: '单位地址', align: "center"},
|
||||||
|
{field: 'preSalesMan', title: '售前委托人', align: "center"},
|
||||||
|
{
|
||||||
|
field: 'preSalesPhone',
|
||||||
|
title: '售前委托人电话',
|
||||||
|
width: '10%',
|
||||||
|
align: "center",
|
||||||
|
templet: function (d) {
|
||||||
|
if (d.preSalesPhone) {
|
||||||
|
let preSalesPhone = decryptCBC(d.preSalesPhone);
|
||||||
|
return maskSensitiveInfo(preSalesPhone, "phone");
|
||||||
|
}else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{field: 'proNum', align: 'center', title: '项目数量'},
|
{field: 'proNum', align: 'center', title: '项目数量'},
|
||||||
{
|
{
|
||||||
fixed: 'right', width: 180, title: '操作', align: 'center', templet: d => {
|
fixed: 'right', width: 180, title: '操作', align: 'center', templet: d => {
|
||||||
|
|
@ -311,21 +329,21 @@
|
||||||
// 告诉jQuery不要去设置Content-Type请求头
|
// 告诉jQuery不要去设置Content-Type请求头
|
||||||
contentType: false,
|
contentType: false,
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
/* layer.close(idx);
|
/* layer.close(idx);
|
||||||
layer.msg('导入成功', {icon: 1, time: 2000});
|
layer.msg('导入成功', {icon: 1, time: 2000});
|
||||||
search(1)*/
|
search(1)*/
|
||||||
if (data.res === 0) {
|
if (data.res === 0) {
|
||||||
layer.close(idx);
|
layer.close(idx);
|
||||||
layer.msg('导入失败' + data.resMsg, { icon: 2, time: 2000 });
|
layer.msg('导入失败' + data.resMsg, {icon: 2, time: 2000});
|
||||||
} else {
|
} else {
|
||||||
layer.close(idx);
|
layer.close(idx);
|
||||||
layer.msg('导入成功', { icon: 1, time: 2000 });
|
layer.msg('导入成功', {icon: 1, time: 2000});
|
||||||
search(1)
|
search(1)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function (data) {
|
error: function (data) {
|
||||||
alert(data);
|
alert(data);
|
||||||
console.log("我不好",data)
|
console.log("我不好", data)
|
||||||
layer.close(idx);
|
layer.close(idx);
|
||||||
layer.msg('导入成功', {icon: 2, time: 2000});
|
layer.msg('导入成功', {icon: 2, time: 2000});
|
||||||
}
|
}
|
||||||
|
|
@ -335,7 +353,7 @@
|
||||||
|
|
||||||
function importTemplate() {
|
function importTemplate() {
|
||||||
let token = localStorage.getItem("token");
|
let token = localStorage.getItem("token");
|
||||||
window.location.href =ctxPath + "/backstage/download?filename=外包企业导入模板.xls&token=" + token;
|
window.location.href = ctxPath + "/backstage/download?filename=外包企业导入模板.xls&token=" + token;
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue