Commit 3e986395 by 唐功亮

【修改】 社会统一信用代码 唯一性检验

parent 1bce718e
......@@ -49,6 +49,9 @@ public interface TycpdmFirmDao extends BaseMapper<TycpdmFirmEntity> {
@Select("select count(1) from tycpdm_firm where firmName=#{firmname} and logout_flag=1")
int selectByIdFirmNameSC(@Param("firmname") String firmname);
@Select("select count(1) from tycpdm_firm where certificateCode=#{certificateCode} and logout_flag=1")
int selectByIdCertificateCode(@Param("certificateCode") String certificateCode);
@Select("select count(1) from firm where firm_name=#{firmname} and (logout_flag=2 or logout_flag=0)")
int selectByIdFirmNameXTSC(@Param("firmname")String firmname);
......
......@@ -319,9 +319,13 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
TycpdmFirmChangeEntity tycpdmFirmChangeEntity = new TycpdmFirmChangeEntity();
Integer status = body.get("status")==null?0:Integer.valueOf(String.valueOf(body.get("status")));
Object certificateCode = body.get("certificatecode");//填统一社会信用代码
if (!AlgorithmUtils.checkUSCC(certificateCode.toString())){
throw new RRException("统一社会信用代码输入错误");
}
if(tycpdmFirmDao.selectByIdCertificateCode(String.valueOf(certificateCode))>0){
throw new RRException("统一社会信用代码已存在");
}
//写入死值
body.put("useddesc","企业产品描述信息");
body.put("wishusednum",100);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment