|
@@ -53,6 +53,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
<result property="isAgree" column="isAgree" />
|
|
|
+ <result property="deptId" column="deptId" />
|
|
|
+ <result property="dwType" column="dwType" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectProposalInfoVo">
|
|
@@ -111,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
p.is_survey, p.is_first, p.is_person, p.is_record, p.negotiate_type, p.proposed_contractor, p.proposal_progress, p.rolling_process, p.complex_type,
|
|
|
p.is_cases_together, p.unite_proposal_id, p.satisfaction, p.members_opinion,p.cbdwdfwy,
|
|
|
p.zx_satisfaction,p.zx_opinion,p.is_key_point,p.key_point_argument,p.is_outstanding,p.outstanding_argument,p.create_by, p.create_time,
|
|
|
- p.update_by, p.update_time, p.remark,u.is_agree as isAgree
|
|
|
+ p.update_by, p.update_time, p.remark,u.is_agree as isAgree,u.type as dwType
|
|
|
from proposal_info p
|
|
|
left join proposal_user u on p.proposal_id = u.proposal_id
|
|
|
where u.user_id = #{proposalUserId} and u.type = '2'
|
|
@@ -152,6 +154,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
order by p.update_time desc
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectProposalInfoListByUnit" resultMap="ProposalInfoResult">
|
|
|
+ select p.proposal_id, p.proposal_user_id, p.proposal_number, p.title, p.proposal_name, p.proposal_phone, p.boundary, p.party_affiliation,
|
|
|
+ p.contact_address, p.category_id, p.category_name, p.proposal_type, p.proposal_content, p.is_jointly, p.is_publicity, p.content_publicity,
|
|
|
+ p.is_survey, p.is_first, p.is_person, p.is_record, p.negotiate_type, p.proposed_contractor, p.proposal_progress, p.rolling_process, p.complex_type,
|
|
|
+ p.is_cases_together, p.unite_proposal_id, p.satisfaction, p.members_opinion,p.cbdwdfwy,
|
|
|
+ p.zx_satisfaction,p.zx_opinion,p.is_key_point,p.key_point_argument,p.is_outstanding,p.outstanding_argument,p.create_by, p.create_time,
|
|
|
+ p.update_by, p.update_time, p.remark,u.is_agree as isAgree
|
|
|
+ from proposal_info p
|
|
|
+ left join proposal_unit_reply u on p.proposal_id = u.proposal_id
|
|
|
+ where u.dept_id = #{deptId}
|
|
|
+ <if test="type != null and type != ''"> and u.type = #{dwType}</if>
|
|
|
+ <if test="proposalNumber != null and proposalNumber != ''"> and p.proposal_number = #{proposalNumber}</if>
|
|
|
+ <if test="title != null and title != ''"> and p.title = #{title}</if>
|
|
|
+ <if test="proposalName != null and proposalName != ''"> and p.proposal_name like concat('%', #{proposalName}, '%')</if>
|
|
|
+ <if test="proposalPhone != null and proposalPhone != ''"> and p.proposal_phone = #{proposalPhone}</if>
|
|
|
+ <if test="boundary != null and boundary != ''"> and p.boundary = #{boundary}</if>
|
|
|
+ <if test="partyAffiliation != null and partyAffiliation != ''"> and p.party_affiliation = #{partyAffiliation}</if>
|
|
|
+ <if test="contactAddress != null and contactAddress != ''"> and p.contact_address = #{contactAddress}</if>
|
|
|
+ <if test="categoryId != null "> and p.category_id = #{categoryId}</if>
|
|
|
+ <if test="categoryName != null and categoryName != ''"> and p.category_name like concat('%', #{categoryName}, '%')</if>
|
|
|
+ <if test="proposalType != null and proposalType != ''"> and p.proposal_type = #{proposalType}</if>
|
|
|
+ <if test="proposalContent != null and proposalContent != ''"> and p.proposal_content = #{proposalContent}</if>
|
|
|
+ <if test="isJointly != null and isJointly != ''"> and p.is_jointly = #{isJointly}</if>
|
|
|
+ <if test="isPublicity != null and isPublicity != ''"> and p.is_publicity = #{isPublicity}</if>
|
|
|
+ <if test="contentPublicity != null and contentPublicity != ''"> and p.content_publicity = #{contentPublicity}</if>
|
|
|
+ <if test="isSurvey != null and isSurvey != ''"> and p.is_survey = #{isSurvey}</if>
|
|
|
+ <if test="isFirst != null and isFirst != ''"> and p.is_first = #{isFirst}</if>
|
|
|
+ <if test="isPerson != null and isPerson != ''"> and p.is_person = #{isPerson}</if>
|
|
|
+ <if test="isRecord != null and isRecord != ''"> and p.is_record = #{isRecord}</if>
|
|
|
+ <if test="negotiateType != null and negotiateType != ''"> and p.negotiate_type = #{negotiateType}</if>
|
|
|
+ <if test="proposedContractor != null and proposedContractor != ''"> and p.proposed_contractor = #{proposedContractor}</if>
|
|
|
+ <if test="proposalProgress != null and proposalProgress != ''"> and p.proposal_progress = #{proposalProgress}</if>
|
|
|
+ <if test="rollingProcess != null and rollingProcess != ''"> and p.rolling_process = #{rollingProcess}</if>
|
|
|
+ <if test="complexType != null and complexType != ''"> and p.complex_type = #{complexType}</if>
|
|
|
+ <if test="isCasesTogether != null and isCasesTogether != ''"> and p.is_cases_together = #{isCasesTogether}</if>
|
|
|
+ <if test="uniteProposalId != null "> and p.unite_proposal_id = #{uniteProposalId}</if>
|
|
|
+ <if test="satisfaction != null and satisfaction != ''"> and p.satisfaction = #{satisfaction}</if>
|
|
|
+ <if test="membersOpinion != null and membersOpinion != ''"> and p.members_opinion = #{membersOpinion}</if>
|
|
|
+ <if test="zxSatisfaction != null and zxSatisfaction != ''"> and p.zx_satisfaction = #{zxSatisfaction}</if>
|
|
|
+ <if test="zxOpinion != null and zxOpinion != ''"> and p.zx_opinion = #{zxOpinion}</if>
|
|
|
+ <if test="isKeyPoint != null and isKeyPoint != ''"> and p.is_key_point = #{isKeyPoint}</if>
|
|
|
+ <if test="keyPointArgument != null and keyPointArgument != ''"> and p.key_point_argument = #{keyPointArgument}</if>
|
|
|
+ <if test="isOutstanding != null and isOutstanding != ''"> and p.is_outstanding = #{isOutstanding}</if>
|
|
|
+ <if test="outstandingArgument != null and outstandingArgument != ''"> and p.outstanding_argument = #{outstandingArgument}</if>
|
|
|
+ order by p.update_time desc
|
|
|
+ </select>
|
|
|
+
|
|
|
<insert id="insertProposalInfo" parameterType="ProposalInfo" useGeneratedKeys="true" keyProperty="proposalId">
|
|
|
insert into proposal_info
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|