机构、模板管理优化接口
This commit is contained in:
@@ -22,6 +22,8 @@ public class DeptIdentify extends BaseEntity {
|
|||||||
private Integer isUse;
|
private Integer isUse;
|
||||||
/** 经办人姓名 */
|
/** 经办人姓名 */
|
||||||
private String operName;
|
private String operName;
|
||||||
|
/** 经办人用户名 */
|
||||||
|
private String operUserName;
|
||||||
/** 经办人手机号 */
|
/** 经办人手机号 */
|
||||||
private String operPhone;
|
private String operPhone;
|
||||||
|
|
||||||
@@ -33,6 +35,15 @@ public class DeptIdentify extends BaseEntity {
|
|||||||
/** 部门认证链接 */
|
/** 部门认证链接 */
|
||||||
private String identifyUrl;
|
private String identifyUrl;
|
||||||
|
|
||||||
|
/** 机构信用代码 */
|
||||||
|
private String creditCode;
|
||||||
|
|
||||||
|
/** 法人姓名 */
|
||||||
|
private String legalPerName;
|
||||||
|
|
||||||
|
/** 法人手机号 */
|
||||||
|
private String legalPerPhone;
|
||||||
|
|
||||||
/** 机构类型(1 仲裁机构) */
|
/** 机构类型(1 仲裁机构) */
|
||||||
private Integer identifyType;
|
private Integer identifyType;
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,10 @@ public class TemplateManage extends BaseEntity {
|
|||||||
* 模板格式
|
* 模板格式
|
||||||
*/
|
*/
|
||||||
private String temFormat;
|
private String temFormat;
|
||||||
|
/**
|
||||||
|
* 文件名
|
||||||
|
*/
|
||||||
|
private String fileName;
|
||||||
/**
|
/**
|
||||||
* 原模板路径
|
* 原模板路径
|
||||||
*/
|
*/
|
||||||
|
|||||||
+10
-15
@@ -329,10 +329,13 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
|||||||
Long deptId = sysDept.getDeptId();
|
Long deptId = sysDept.getDeptId();
|
||||||
SysUser sysUser = new SysUser();
|
SysUser sysUser = new SysUser();
|
||||||
sysUser.setDeptId(deptId);
|
sysUser.setDeptId(deptId);
|
||||||
sysUser.setUserName(generateUniqueUsername());//设置默认的用户名
|
sysUser.setUserName(deptIdentify.getOperUserName());
|
||||||
sysUser.setNickName(operName);
|
sysUser.setNickName(operName);
|
||||||
sysUser.setPhonenumber(operPhone);
|
sysUser.setPhonenumber(operPhone);
|
||||||
sysUserMapper.insertUser(sysUser);
|
SysUser sysUser1 = sysUserMapper.selectUserByUserName(deptIdentify.getOperUserName());
|
||||||
|
if (sysUser1== null) {
|
||||||
|
sysUserMapper.insertUser(sysUser);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return AjaxResult.success("新增成功");
|
return AjaxResult.success("新增成功");
|
||||||
@@ -394,6 +397,8 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
|||||||
templateManage.setTemOrigPath(annexPath);
|
templateManage.setTemOrigPath(annexPath);
|
||||||
String format = getFileExtension(fileName);
|
String format = getFileExtension(fileName);
|
||||||
templateManage.setTemFormat(format);
|
templateManage.setTemFormat(format);
|
||||||
|
String subFileName = fileName.substring(fileName.lastIndexOf("/")+1);
|
||||||
|
templateManage.setFileName(subFileName);
|
||||||
templateManage.setCreateBy(getUsername());
|
templateManage.setCreateBy(getUsername());
|
||||||
int i = templateManageMapper.insertTemplateManage(templateManage);
|
int i = templateManageMapper.insertTemplateManage(templateManage);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
@@ -421,6 +426,8 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
|||||||
startIndex += prefix.length();
|
startIndex += prefix.length();
|
||||||
String annexPath = "uploadPath" + fileName.substring(startIndex);
|
String annexPath = "uploadPath" + fileName.substring(startIndex);
|
||||||
templateManage.setTemOrigPath(annexPath);
|
templateManage.setTemOrigPath(annexPath);
|
||||||
|
String subFileName = fileName.substring(fileName.lastIndexOf("/")+1);
|
||||||
|
templateManage.setFileName(subFileName);
|
||||||
String format = getFileExtension(fileName);
|
String format = getFileExtension(fileName);
|
||||||
templateManage.setTemFormat(format);
|
templateManage.setTemFormat(format);
|
||||||
}
|
}
|
||||||
@@ -468,19 +475,7 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
|||||||
return templateManages;
|
return templateManages;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String generateUniqueUsername() {
|
|
||||||
final Random random = new Random();
|
|
||||||
final Set<String> generatedUsernames = new HashSet<>();
|
|
||||||
while (true) {
|
|
||||||
int min = 000000; // 最小的六位数
|
|
||||||
int max = 999999; // 最大的六位数
|
|
||||||
int randomNum = random.nextInt(max - min + 1) + min;
|
|
||||||
if (!generatedUsernames.contains(randomNum)) {
|
|
||||||
generatedUsernames.add(String.valueOf(randomNum));
|
|
||||||
return String.valueOf(randomNum);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getFileExtension(String fileName) {
|
private String getFileExtension(String fileName) {
|
||||||
int lastDotIndex = fileName.lastIndexOf(".");
|
int lastDotIndex = fileName.lastIndexOf(".");
|
||||||
|
|||||||
+3
@@ -262,6 +262,9 @@ public class FixSelectFlowDetailUtils {
|
|||||||
deptIdentify1.setIsUse(0); //默认机构为未启用
|
deptIdentify1.setIsUse(0); //默认机构为未启用
|
||||||
int row = deptIdentifyMapper.updateDeptIdentify(deptIdentify1);
|
int row = deptIdentifyMapper.updateDeptIdentify(deptIdentify1);
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
deptIdentify1.setIdentifyStatus(2);
|
||||||
|
deptIdentifyMapper.updateDeptIdentify(deptIdentify1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,13 +15,16 @@
|
|||||||
<result property="operPhone" column="oper_phone" />
|
<result property="operPhone" column="oper_phone" />
|
||||||
<result property="identifyType" column="identify_type" />
|
<result property="identifyType" column="identify_type" />
|
||||||
<result property="delFlag" column="del_flag" />
|
<result property="delFlag" column="del_flag" />
|
||||||
|
<result property="creditCode" column="credit_code" />
|
||||||
|
<result property="legalPerName" column="legal_per_name" />
|
||||||
|
<result property="legalPerPhone" column="legal_per_phone" />
|
||||||
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectDeptIdentify" parameterType="DeptIdentify" resultMap="DeptIdentifyResult">
|
<select id="selectDeptIdentify" parameterType="DeptIdentify" resultMap="DeptIdentifyResult">
|
||||||
SELECT id, identify_name ,identify_status , identify_date,is_use,org_id,auth_flow_id,
|
SELECT id, identify_name ,identify_status , identify_date,is_use,org_id,auth_flow_id,
|
||||||
oper_name,oper_phone,identify_type
|
oper_name,oper_phone,identify_type,credit_code,legal_per_name,legal_per_phone
|
||||||
FROM dept_identify
|
FROM dept_identify
|
||||||
<where>
|
<where>
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
@@ -59,6 +62,9 @@
|
|||||||
<if test="operPhone != null and operPhone != ''">oper_phone,</if>
|
<if test="operPhone != null and operPhone != ''">oper_phone,</if>
|
||||||
<if test="identifyType != null">identify_type,</if>
|
<if test="identifyType != null">identify_type,</if>
|
||||||
<if test="authFlowId != null and authFlowId != ''">auth_flow_id,</if>
|
<if test="authFlowId != null and authFlowId != ''">auth_flow_id,</if>
|
||||||
|
<if test="creditCode != null and creditCode != ''">credit_code,</if>
|
||||||
|
<if test="legalPerName != null and legalPerName != ''">legal_per_name,</if>
|
||||||
|
<if test="legalPerPhone != null and legalPerPhone != ''">legal_per_phone,</if>
|
||||||
del_flag
|
del_flag
|
||||||
)values(
|
)values(
|
||||||
<if test="identifyName != null and identifyName != ''">#{identifyName},</if>
|
<if test="identifyName != null and identifyName != ''">#{identifyName},</if>
|
||||||
@@ -70,6 +76,9 @@
|
|||||||
<if test="operPhone != null and operPhone != ''">#{operPhone},</if>
|
<if test="operPhone != null and operPhone != ''">#{operPhone},</if>
|
||||||
<if test="identifyType != null ">#{identifyType},</if>
|
<if test="identifyType != null ">#{identifyType},</if>
|
||||||
<if test="authFlowId != null and authFlowId != '' ">#{authFlowId},</if>
|
<if test="authFlowId != null and authFlowId != '' ">#{authFlowId},</if>
|
||||||
|
<if test="creditCode != null and creditCode != '' ">#{creditCode},</if>
|
||||||
|
<if test="legalPerName != null and legalPerName != '' ">#{legalPerName},</if>
|
||||||
|
<if test="legalPerPhone != null and legalPerPhone != '' ">#{legalPerPhone},</if>
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
@@ -90,6 +99,9 @@
|
|||||||
<if test="delFlag != null ">del_flag = #{delFlag},</if>
|
<if test="delFlag != null ">del_flag = #{delFlag},</if>
|
||||||
<if test="operName != null ">oper_name = #{operName},</if>
|
<if test="operName != null ">oper_name = #{operName},</if>
|
||||||
<if test="operPhone != null ">oper_phone = #{operPhone},</if>
|
<if test="operPhone != null ">oper_phone = #{operPhone},</if>
|
||||||
|
<if test="creditCode != null ">credit_code = #{creditCode},</if>
|
||||||
|
<if test="legalPerName != null ">legal_per_name = #{legalPerName},</if>
|
||||||
|
<if test="legalPerPhone != null ">legal_per_phone = #{legalPerPhone},</if>
|
||||||
<if test="authFlowId != null and authFlowId != '' ">auth_flow_id = #{authFlowId}</if>
|
<if test="authFlowId != null and authFlowId != '' ">auth_flow_id = #{authFlowId}</if>
|
||||||
</set>
|
</set>
|
||||||
<where>
|
<where>
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
<result property="temOrigPath" column="tem_orig_path" />
|
<result property="temOrigPath" column="tem_orig_path" />
|
||||||
<result property="temRevisPath" column="tem_revis_path" />
|
<result property="temRevisPath" column="tem_revis_path" />
|
||||||
<result property="delFlag" column="del_flag" />
|
<result property="delFlag" column="del_flag" />
|
||||||
|
<result property="fileName" column="file_name" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<insert id="insertTemplateManage" parameterType="TemplateManage" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertTemplateManage" parameterType="TemplateManage" useGeneratedKeys="true" keyProperty="id">
|
||||||
@@ -23,6 +24,7 @@
|
|||||||
<if test="temOrigPath != null and temOrigPath != '' ">tem_orig_path,</if>
|
<if test="temOrigPath != null and temOrigPath != '' ">tem_orig_path,</if>
|
||||||
<if test="temRevisPath != null and temRevisPath != '' ">tem_revis_path,</if>
|
<if test="temRevisPath != null and temRevisPath != '' ">tem_revis_path,</if>
|
||||||
<if test="createBy != null and createBy != '' ">create_by,</if>
|
<if test="createBy != null and createBy != '' ">create_by,</if>
|
||||||
|
<if test="fileName != null and fileName != '' ">file_name,</if>
|
||||||
del_flag,create_time
|
del_flag,create_time
|
||||||
)values(
|
)values(
|
||||||
<if test="identifyId != null">#{identifyId},</if>
|
<if test="identifyId != null">#{identifyId},</if>
|
||||||
@@ -32,6 +34,7 @@
|
|||||||
<if test="temOrigPath != null and temOrigPath != ''">#{temOrigPath},</if>
|
<if test="temOrigPath != null and temOrigPath != ''">#{temOrigPath},</if>
|
||||||
<if test="temRevisPath != null and temRevisPath != ''">#{temRevisPath},</if>
|
<if test="temRevisPath != null and temRevisPath != ''">#{temRevisPath},</if>
|
||||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
<if test="fileName != null and fileName != ''">#{fileName},</if>
|
||||||
0,sysdate()
|
0,sysdate()
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
@@ -47,6 +50,7 @@
|
|||||||
<if test="delFlag != null ">del_flag = #{delFlag},</if>
|
<if test="delFlag != null ">del_flag = #{delFlag},</if>
|
||||||
<if test="temRevisPath != null and temRevisPath != '' ">tem_revis_path = #{temRevisPath},</if>
|
<if test="temRevisPath != null and temRevisPath != '' ">tem_revis_path = #{temRevisPath},</if>
|
||||||
<if test="updateBy != null and updateBy != '' ">update_by = #{updateBy},</if>
|
<if test="updateBy != null and updateBy != '' ">update_by = #{updateBy},</if>
|
||||||
|
<if test="fileName != null and fileName != '' ">file_name = #{fileName},</if>
|
||||||
update_time = sysdate()
|
update_time = sysdate()
|
||||||
</set>
|
</set>
|
||||||
<where>
|
<where>
|
||||||
@@ -58,7 +62,7 @@
|
|||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="selectTemplateList" parameterType="TemplateManage" resultMap="TemplateManageResult">
|
<select id="selectTemplateList" parameterType="TemplateManage" resultMap="TemplateManageResult">
|
||||||
SELECT id, identify_id ,tem_name , tem_type,tem_format,tem_orig_path,tem_revis_path
|
SELECT id, identify_id ,tem_name , tem_type,tem_format,tem_orig_path,tem_revis_path ,file_name
|
||||||
FROM template_manage
|
FROM template_manage
|
||||||
<where>
|
<where>
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
|
|||||||
Reference in New Issue
Block a user