wangjiuyun 2025-06-06 17:34:55 +08:00
commit 6e4e1e916a
2 changed files with 8 additions and 8 deletions

View File

@ -143,11 +143,11 @@ public class ProjectInfoServiceImpl implements IProjectInfoService {
private void setProjectCode(ProjectInfo projectInfo) {
String s = projectInfoMapper.selectMaxProjectCode(projectInfo);
if (s == null) {
projectInfo.setProjectCode(PROJECT_CODE_PREFIX + "00001");
}else{
projectInfo.setProjectCode(PROJECT_CODE_PREFIX + String.format("%0" + PROJECT_CODE_LENGTH + "d",
Integer.parseInt(s.substring(PROJECT_CODE_PREFIX.length())) + 1));
s = "0";
}
projectInfo.setProjectCode(PROJECT_CODE_PREFIX + String.format("%0" + PROJECT_CODE_LENGTH + "d",
Integer.parseInt(s.substring(PROJECT_CODE_PREFIX.length())) + 1));
}
private void saveOtherInfo(ProjectInfo projectInfo1) {

View File

@ -77,11 +77,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectProjectInfoList" parameterType="ProjectInfo" resultMap="ProjectInfoResult">
<include refid="selectRelationProjectInfoVo"/>
<where>
<where>
<if test="projectCode != null and projectCode != ''"> and t1.project_code = #{projectCode}</if>
<if test="projectName != null and projectName != ''"> and t1.project_name like concat('%', #{projectName}, '%')</if>
<if test="customerCode != null and customerCode != ''"> and t1.customer_code = #{customerCode}</if>
<if test="agentCode != null and agentCode != ''"> and t1.agent_code = #{agentCode}</if>
<if test="agentName != null and agentName != ''"> and t2.agent_name like concat('%', #{agentName}, '%')</if>
<if test="customerName != null and customerName != ''"> and t1.customer_name like concat('%', #{customerName}, '%')</if>
<if test="industryType != null and industryType != ''"> and t1.industry_type = #{industryType}</if>
<if test="bgProperty != null and bgProperty != ''"> and t1.bg_property = #{bgProperty}</if>
@ -89,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="projectStage != null and projectStage != ''"> and t1.project_stage = #{projectStage}</if>
<if test="projectGraspDegree != null and projectGraspDegree != ''"> and t1.project_grasp_degree = #{projectGraspDegree}</if>
<if test="hzSupportUser != null and hzSupportUser != ''"> and t1.hz_support_user = #{hzSupportUser}</if>
<if test="hzSupportUserName != null and hzSupportUserName != ''"> t3.user_name like concat('%', #{hzSupportUserName}, '%')</if>
<if test="operateInstitution != null and operateInstitution != ''"> and t1.operate_institution = #{operateInstitution}</if>
<if test="partnerCode != null and partnerCode != ''"> and t1.partner_code = #{partnerCode}</if>
<if test="partnerName != null and partnerName != ''"> and t1.partner_name = #{partnerName}</if>
@ -154,9 +156,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where t1.id = #{id}
</select>
<select id="selectMaxProjectCode" resultType="java.lang.String">
select project_code from project_info
where agent_code=#{agentCode}
order by project_code desc limit 1
select max(project_code) from project_info
</select>
<select id="selectUserById" resultType="com.ruoyi.common.core.domain.entity.SysUser">
select * from sys_user