1、优化查询,便于模糊查询条件2、界面查询条件调整
| | |
| | | private String storeId; |
| | | private String nextUserId; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | private String staffNameLike; |
| | | |
| | | private String contractName; |
| | | private String contractCode; |
| | | private String contractType; |
| | | |
| | | private String logStartTime; |
| | | private String logEndTime; |
| | | |
| | | public String getPlanType() { |
| | | return planType; |
| | |
| | | this.storeId = storeId; |
| | | } |
| | | |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | |
| | | public void setNextUserId(String nextUserId) { |
| | | this.nextUserId = nextUserId; |
| | | } |
| | | |
| | | public String getStaffNameLike() { |
| | | return staffNameLike; |
| | | } |
| | | |
| | | public void setStaffNameLike(String staffNameLike) { |
| | | this.staffNameLike = staffNameLike; |
| | | } |
| | | |
| | | @Override |
| | | public String getContractName() { |
| | | return contractName; |
| | | } |
| | | |
| | | @Override |
| | | public void setContractName(String contractName) { |
| | | this.contractName = contractName; |
| | | } |
| | | |
| | | @Override |
| | | public String getContractCode() { |
| | | return contractCode; |
| | | } |
| | | |
| | | @Override |
| | | public void setContractCode(String contractCode) { |
| | | this.contractCode = contractCode; |
| | | } |
| | | |
| | | @Override |
| | | public String getContractType() { |
| | | return contractType; |
| | | } |
| | | |
| | | @Override |
| | | public void setContractType(String contractType) { |
| | | this.contractType = contractType; |
| | | } |
| | | |
| | | public String getLogStartTime() { |
| | | return logStartTime; |
| | | } |
| | | |
| | | public void setLogStartTime(String logStartTime) { |
| | | this.logStartTime = logStartTime; |
| | | } |
| | | |
| | | public String getLogEndTime() { |
| | | return logEndTime; |
| | | } |
| | | |
| | | public void setLogEndTime(String logEndTime) { |
| | | this.logEndTime = logEndTime; |
| | | } |
| | | } |
| | |
| | | private String feeName; |
| | | private String paId; |
| | | private String areaNum; |
| | | private String areaNumLike; |
| | | private String startTime; |
| | | private String endTime; |
| | | private String ruleId; |
| | |
| | | |
| | | private List<TempCarFeeConfigAttrDto> tempCarFeeConfigAttrs; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getCarType() { |
| | | return carType; |
| | |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | |
| | | public void setFeeConfigId(String feeConfigId) { |
| | | this.feeConfigId = feeConfigId; |
| | | } |
| | | |
| | | public String getAreaNumLike() { |
| | | return areaNumLike; |
| | | } |
| | | |
| | | public void setAreaNumLike(String areaNumLike) { |
| | | this.areaNumLike = areaNumLike; |
| | | } |
| | | } |
| | |
| | | |
| | | private String staffNameLike; |
| | | |
| | | private String logStartTime; |
| | | private String logEndTime; |
| | | |
| | | private List<OwnerCarAttrDto> ownerCarAttrDto; |
| | | |
| | | public String getCarColor() { |
| | |
| | | public void setStaffNameLike(String staffNameLike) { |
| | | this.staffNameLike = staffNameLike; |
| | | } |
| | | |
| | | public String getLogStartTime() { |
| | | return logStartTime; |
| | | } |
| | | |
| | | public void setLogStartTime(String logStartTime) { |
| | | this.logStartTime = logStartTime; |
| | | } |
| | | |
| | | public String getLogEndTime() { |
| | | return logEndTime; |
| | | } |
| | | |
| | | public void setLogEndTime(String logEndTime) { |
| | | this.logEndTime = logEndTime; |
| | | } |
| | | } |
| | |
| | | |
| | | private String qaName; |
| | | private String qaType; |
| | | private String qaTypeName; |
| | | private String startTime; |
| | | private String remark; |
| | | private String endTime; |
| | | private String communityId; |
| | | private String content; |
| | | private String qaId; |
| | | private String objType; |
| | | private String objId; |
| | | |
| | | private String titleType; |
| | | |
| | |
| | | public void setQaId(String qaId) { |
| | | this.qaId = qaId; |
| | | } |
| | | |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | |
| | | public void setScore(long score) { |
| | | this.score = score; |
| | | } |
| | | |
| | | public String getObjType() { |
| | | return objType; |
| | | } |
| | | |
| | | public void setObjType(String objType) { |
| | | this.objType = objType; |
| | | } |
| | | |
| | | public String getObjId() { |
| | | return objId; |
| | | } |
| | | |
| | | public void setObjId(String objId) { |
| | | this.objId = objId; |
| | | } |
| | | |
| | | public String getQaTypeName() { |
| | | return qaTypeName; |
| | | } |
| | | |
| | | public void setQaTypeName(String qaTypeName) { |
| | | this.qaTypeName = qaTypeName; |
| | | } |
| | | } |
| | |
| | | //是否是固定物品 |
| | | private String isFixed; |
| | | private String isFixedName; |
| | | private String timesId; |
| | | |
| | | private String communityId; |
| | | |
| | |
| | | this.shName = shName; |
| | | } |
| | | |
| | | |
| | | |
| | | public String getWarningStock() { |
| | | return warningStock; |
| | | } |
| | |
| | | this.isFixedName = isFixedName; |
| | | } |
| | | |
| | | |
| | | |
| | | public List<ResourceStoreTimesDto> getTimes() { |
| | | return times; |
| | | } |
| | |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | public String getTimesId() { |
| | | return timesId; |
| | | } |
| | | |
| | | public void setTimesId(String timesId) { |
| | | this.timesId = timesId; |
| | | } |
| | | } |
| | |
| | | |
| | | private String operate; |
| | | |
| | | private String staffNameLike; |
| | | |
| | | |
| | | private String logStartTime; |
| | | private String logEndTime; |
| | | |
| | | public String getFeeCoefficient() { |
| | | return feeCoefficient; |
| | |
| | | public void setOperate(String operate) { |
| | | this.operate = operate; |
| | | } |
| | | |
| | | public String getStaffNameLike() { |
| | | return staffNameLike; |
| | | } |
| | | |
| | | public void setStaffNameLike(String staffNameLike) { |
| | | this.staffNameLike = staffNameLike; |
| | | } |
| | | |
| | | public String getLogStartTime() { |
| | | return logStartTime; |
| | | } |
| | | |
| | | public void setLogStartTime(String logStartTime) { |
| | | this.logStartTime = logStartTime; |
| | | } |
| | | |
| | | public String getLogEndTime() { |
| | | return logEndTime; |
| | | } |
| | | |
| | | public void setLogEndTime(String logEndTime) { |
| | | this.logEndTime = logEndTime; |
| | | } |
| | | } |
| | |
| | | private String consultPrice; |
| | | private String shId; |
| | | |
| | | private String bId; |
| | | |
| | | public String getApplyOrderId() { |
| | | return applyOrderId; |
| | | } |
| | |
| | | public void setShId(String shId) { |
| | | this.shId = shId; |
| | | } |
| | | |
| | | public String getbId() { |
| | | return bId; |
| | | } |
| | | |
| | | public void setbId(String bId) { |
| | | this.bId = bId; |
| | | } |
| | | } |
| | |
| | | private String communityId; |
| | | private String content; |
| | | private String qaId; |
| | | private String objType; |
| | | private String objId; |
| | | |
| | | private String state; |
| | | |
| | |
| | | public void setState(String state) { |
| | | this.state = state; |
| | | } |
| | | |
| | | public String getObjType() { |
| | | return objType; |
| | | } |
| | | |
| | | public void setObjType(String objType) { |
| | | this.objType = objType; |
| | | } |
| | | |
| | | public String getObjId() { |
| | | return objId; |
| | | } |
| | | |
| | | public void setObjId(String objId) { |
| | | this.objId = objId; |
| | | } |
| | | } |
| | |
| | | package com.java110.vo.api.auditAppUserBindingOwner; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | public class ApiAuditAppUserBindingOwnerDataVo implements Serializable { |
| | | |
| | |
| | | private String parentAreaName; |
| | | |
| | | private String userId; |
| | | private String ownerId; |
| | | private String ownerName; |
| | | |
| | | public String getAppUserId() { |
| | | return appUserId; |
| | |
| | | public void setAppTypeName(String appTypeName) { |
| | | this.appTypeName = appTypeName; |
| | | } |
| | | |
| | | public String getOwnerId() { |
| | | return ownerId; |
| | | } |
| | | |
| | | public void setOwnerId(String ownerId) { |
| | | this.ownerId = ownerId; |
| | | } |
| | | |
| | | public String getOwnerName() { |
| | | return ownerName; |
| | | } |
| | | |
| | | public void setOwnerName(String ownerName) { |
| | | this.ownerName = ownerName; |
| | | } |
| | | } |
| | |
| | | |
| | | private String totalPrice; |
| | | |
| | | private String timesId; |
| | | |
| | | private List<ResourceStoreTimesDto> times; |
| | | public String getResId() { |
| | | return resId; |
| | |
| | | public void setTotalPrice(String totalPrice) { |
| | | this.totalPrice = totalPrice; |
| | | } |
| | | |
| | | public String getTimesId() { |
| | | return timesId; |
| | | } |
| | | |
| | | public void setTimesId(String timesId) { |
| | | this.timesId = timesId; |
| | | } |
| | | } |
| | |
| | | select t.amount,t.acct_type,t.acct_type acctType,t.obj_id,t.obj_id objId,t.acct_id,t.acct_id |
| | | acctId,t.status_cd,t.status_cd statusCd,t.acct_name,t.acct_name acctName,t.b_id,t.b_id bId,t.obj_type,t.obj_type |
| | | objType,t.create_time createTime,td.`name` acctTypeName,t.part_id,t.part_id partId,t.link |
| | | <if test="objType !=null and objType == 6006"> |
| | | ,bo.id_card idCard |
| | | </if> |
| | | from account t |
| | | LEFT JOIN t_dict td on t.acct_type = td.status_cd and td.table_name = 'account' and td.table_columns = |
| | | 'acct_type' |
| | | <if test="objType !=null and objType == 6006"> |
| | | left join building_owner bo on t.obj_id = bo.owner_id and bo.status_cd = '0' |
| | | </if> |
| | | where 1 =1 |
| | | <if test="amount !=null and amount != ''"> |
| | | and t.amount= #{amount} |
| | |
| | | <select id="queryAccountsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from account t |
| | | LEFT JOIN t_dict td on t.acct_type = td.status_cd and td.table_name = 'account' and td.table_columns = |
| | | 'acct_type' |
| | | <if test="objType !=null and objType == 6006"> |
| | | left join building_owner bo on t.obj_id = bo.owner_id and bo.status_cd = '0' |
| | | </if> |
| | | where 1 =1 |
| | | <if test="amount !=null and amount != ''"> |
| | | and t.amount= #{amount} |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="communityPublicityV1ServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存小区公示信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveCommunityPublicityInfo" parameterType="Map"> |
| | | insert into community_publicity( |
| | | create_user_id,pub_id,context,collect_count,pub_type,like_count,create_user_name,title,community_id,read_count,header_img |
| | | ) values ( |
| | | #{createUserId},#{pubId},#{context},#{collectCount},#{pubType},#{likeCount},#{createUserName},#{title},#{communityId},#{readCount},#{headerImg} |
| | | ) |
| | | insert into community_publicity(create_user_id, pub_id, context, collect_count, pub_type, like_count, |
| | | create_user_name, title, community_id, read_count, header_img) |
| | | values (#{createUserId}, #{pubId}, #{context}, #{collectCount}, #{pubType}, #{likeCount}, #{createUserName}, |
| | | #{title}, #{communityId}, #{readCount}, #{headerImg}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询小区公示信息 add by wuxw 2018-07-03 --> |
| | | <select id="getCommunityPublicityInfo" parameterType="Map" resultType="Map"> |
| | |
| | | communityId,t.read_count,t.read_count readCount,t.header_img,t.header_img headerImg, |
| | | t.create_time createTime,td.`name` pubTypeName |
| | | from community_publicity t |
| | | left join t_dict td on t.pub_type = td.status_cd and td.table_name = 'community_publicity' and td.table_columns = 'pub_type' |
| | | left join t_dict td on t.pub_type = td.status_cd and td.table_name = 'community_publicity' and td.table_columns |
| | | = 'pub_type' |
| | | where 1 =1 |
| | | <if test="createUserId !=null and createUserId != ''"> |
| | | and t.create_user_id= #{createUserId} |
| | |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="title !=null and title != ''"> |
| | | and t.title= #{title} |
| | | and t.title like concat('%',#{title},'%') |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改小区公示信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateCommunityPublicityInfo" parameterType="Map"> |
| | |
| | | <if test="pubId !=null and pubId != ''"> |
| | | and t.pub_id= #{pubId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询小区公示数量 add by wuxw 2018-07-03 --> |
| | |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="title !=null and title != ''"> |
| | | and t.title= #{title} |
| | | and t.title like concat('%',#{title},'%') |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | |
| | | <if test="headerImg !=null and headerImg != ''"> |
| | | and t.header_img= #{headerImg} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="itemReleaseTypeV1ServiceDaoImpl"> |
| | | |
| | | <!-- 保存放行类型信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveItemReleaseTypeInfo" parameterType="Map"> |
| | | insert into item_release_type( |
| | | type_name,type_id,remark,community_id,flow_id,flow_name |
| | | ) values ( |
| | | #{typeName},#{typeId},#{remark},#{communityId},#{flowId},#{flowName} |
| | | ) |
| | | insert into item_release_type(type_name, type_id, remark, community_id, flow_id, flow_name) |
| | | values (#{typeName}, #{typeId}, #{remark}, #{communityId}, #{flowId}, #{flowName}) |
| | | </insert> |
| | | |
| | | <!-- 查询放行类型信息 add by wuxw 2018-07-03 --> |
| | |
| | | from item_release_type t |
| | | where 1 =1 |
| | | <if test="typeName !=null and typeName != ''"> |
| | | and t.type_name= #{typeName} |
| | | and t.type_name like concat('%',#{typeName},'%') |
| | | </if> |
| | | <if test="typeId !=null and typeId != ''"> |
| | | and t.type_id= #{typeId} |
| | |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改放行类型信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateItemReleaseTypeInfo" parameterType="Map"> |
| | |
| | | <if test="typeId !=null and typeId != ''"> |
| | | and t.type_id= #{typeId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询放行类型数量 add by wuxw 2018-07-03 --> |
| | |
| | | from item_release_type t |
| | | where 1 =1 |
| | | <if test="typeName !=null and typeName != ''"> |
| | | and t.type_name= #{typeName} |
| | | and t.type_name like concat('%',#{typeName},'%') |
| | | </if> |
| | | <if test="typeId !=null and typeId != ''"> |
| | | and t.type_id= #{typeId} |
| | |
| | | <if test="flowName !=null and flowName != ''"> |
| | | and t.flow_name= #{flowName} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="itemReleaseV1ServiceDaoImpl"> |
| | | |
| | | <!-- 保存放行管理信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveItemReleaseInfo" parameterType="Map"> |
| | | insert into item_release( |
| | | apply_company,id_card,pass_time,car_num,remark,apply_person,ir_id,apply_tel,type_id,state,community_id,create_user_id |
| | | ) values ( |
| | | #{applyCompany},#{idCard},#{passTime},#{carNum},#{remark},#{applyPerson},#{irId},#{applyTel},#{typeId},#{state},#{communityId},#{createUserId} |
| | | ) |
| | | insert into item_release(apply_company, id_card, pass_time, car_num, remark, apply_person, ir_id, apply_tel, |
| | | type_id, state, community_id, create_user_id) |
| | | values (#{applyCompany}, #{idCard}, #{passTime}, #{carNum}, #{remark}, #{applyPerson}, #{irId}, #{applyTel}, |
| | | #{typeId}, #{state}, #{communityId}, #{createUserId}) |
| | | </insert> |
| | | |
| | | <!-- 查询放行管理信息 add by wuxw 2018-07-03 --> |
| | |
| | | select t.apply_company,t.apply_company applyCompany,t.id_card,t.id_card idCard,t.pass_time,t.pass_time |
| | | passTime,t.car_num,t.car_num carNum,t.remark,t.status_cd,t.status_cd statusCd,t.apply_person,t.apply_person |
| | | applyPerson,t.ir_id,t.ir_id irId,t.apply_tel,t.apply_tel applyTel,t.type_id,t.type_id |
| | | typeId,t.state,t.community_id,t.community_id communityId,irt.type_name typeName,irt.flow_id flowId,irt.flow_name flowName, |
| | | typeId,t.state,t.community_id,t.community_id communityId,irt.type_name typeName,irt.flow_id flowId,irt.flow_name |
| | | flowName, |
| | | td.name stateName,t.create_time createTime,SUM(irr.amount) amount,t.create_user_id createUserId |
| | | from item_release t |
| | | LEFT JOIN item_release_type irt on t.type_id = irt.type_id and irt.status_cd = '0' and irt.community_id = t.community_id |
| | | LEFT JOIN item_release_type irt on t.type_id = irt.type_id and irt.status_cd = '0' and irt.community_id = |
| | | t.community_id |
| | | left join t_dict td on t.state = td.status_cd and td.table_name = 'item_release' and td.table_columns = 'state' |
| | | left join item_release_res irr on t.ir_id = irr.ir_id and t.community_id = irr.community_id and irr.status_cd = '0' |
| | | left join item_release_res irr on t.ir_id = irr.ir_id and t.community_id = irr.community_id and irr.status_cd = |
| | | '0' |
| | | where 1 =1 |
| | | <if test="applyCompany !=null and applyCompany != ''"> |
| | | and t.apply_company= #{applyCompany} |
| | |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="applyPerson !=null and applyPerson != ''"> |
| | | and t.apply_person= #{applyPerson} |
| | | and t.apply_person like concat('%',#{applyPerson},'%') |
| | | </if> |
| | | <if test="irId !=null and irId != ''"> |
| | | and t.ir_id= #{irId} |
| | |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | group by t.create_time,t.apply_company,t.id_card,t.pass_time,t.car_num,t.remark,t.status_cd,t.apply_person,t.ir_id,t.apply_tel,t.type_id,t.state,t.community_id,irt.type_name,irt.flow_id ,irt.flow_name, |
| | | td.name |
| | | group by |
| | | t.create_time,t.apply_company,t.id_card,t.pass_time,t.car_num,t.remark,t.status_cd,t.apply_person,t.ir_id, |
| | | t.apply_tel,t.type_id,t.state,t.community_id,irt.type_name,irt.flow_id,irt.flow_name,td.name |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改放行管理信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateItemReleaseInfo" parameterType="Map"> |
| | |
| | | <if test="state !=null and state != ''"> |
| | | , t.state= #{state} |
| | | </if> |
| | | |
| | | where 1=1 |
| | | <if test="irId !=null and irId != ''"> |
| | | and t.ir_id= #{irId} |
| | |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="applyPerson !=null and applyPerson != ''"> |
| | | and t.apply_person= #{applyPerson} |
| | | and t.apply_person like concat('%',#{applyPerson},'%') |
| | | </if> |
| | | <if test="irId !=null and irId != ''"> |
| | | and t.ir_id= #{irId} |
| | |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="machinePrinterV1ServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存云打印机信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveMachinePrinterInfo" parameterType="Map"> |
| | | insert into machine_printer( |
| | | impl_bean,machine_id,machine_code,community_id,machine_name |
| | | ) values ( |
| | | #{implBean},#{machineId},#{machineCode},#{communityId},#{machineName} |
| | | ) |
| | | insert into machine_printer(impl_bean, machine_id, machine_code, community_id, machine_name) |
| | | values (#{implBean}, #{machineId}, #{machineCode}, #{communityId}, #{machineName}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询云打印机信息 add by wuxw 2018-07-03 --> |
| | | <select id="getMachinePrinterInfo" parameterType="Map" resultType="Map"> |
| | |
| | | machineCode,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id |
| | | communityId,t.machine_name,t.machine_name machineName,td.`name` implBeanName |
| | | from machine_printer t |
| | | left join t_dict td on t.impl_bean = td.status_cd and td.table_name = 'machine_printer' and td.table_columns = 'impl_bean' |
| | | left join t_dict td on t.impl_bean = td.status_cd and td.table_name = 'machine_printer' and td.table_columns = |
| | | 'impl_bean' |
| | | where 1 =1 |
| | | <if test="implBean !=null and implBean != ''"> |
| | | and t.impl_bean= #{implBean} |
| | |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="machineName !=null and machineName != ''"> |
| | | and t.machine_name= #{machineName} |
| | | and t.machine_name like '%${machineName}%' |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改云打印机信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateMachinePrinterInfo" parameterType="Map"> |
| | |
| | | <if test="machineId !=null and machineId != ''"> |
| | | and t.machine_id= #{machineId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询云打印机数量 add by wuxw 2018-07-03 --> |
| | |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="machineName !=null and machineName != ''"> |
| | | and t.machine_name= #{machineName} |
| | | and t.machine_name like '%${machineName}%' |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="meterMachineFactoryV1ServiceDaoImpl"> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 保存电表厂家信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveMeterMachineFactoryInfo" parameterType="Map"> |
| | | insert into meter_machine_factory( |
| | | factory_id,factory_name,remark,bean_impl |
| | | ) values ( |
| | | #{factoryId},#{factoryName},#{remark},#{beanImpl} |
| | | ) |
| | | insert into meter_machine_factory(factory_id, factory_name, remark, bean_impl) |
| | | values (#{factoryId}, #{factoryName}, #{remark}, #{beanImpl}) |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <!-- 查询电表厂家信息 add by wuxw 2018-07-03 --> |
| | | <select id="getMeterMachineFactoryInfo" parameterType="Map" resultType="Map"> |
| | | select t.factory_id,t.factory_id factoryId,t.factory_name,t.factory_name factoryName,t.remark,t.status_cd,t.status_cd statusCd,t.bean_impl,t.bean_impl beanImpl |
| | | from meter_machine_factory t |
| | | where 1 =1 |
| | | <if test="factoryId !=null and factoryId != ''"> |
| | | and t.factory_id= #{factoryId} |
| | | </if> |
| | | <if test="factoryName !=null and factoryName != ''"> |
| | | and t.factory_name= #{factoryName} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="beanImpl !=null and beanImpl != ''"> |
| | | and t.bean_impl= #{beanImpl} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | select t.factory_id,t.factory_id factoryId,t.factory_name,t.factory_name |
| | | factoryName,t.remark,t.status_cd,t.status_cd statusCd,t.bean_impl,t.bean_impl beanImpl |
| | | from meter_machine_factory t |
| | | where 1 =1 |
| | | <if test="factoryId !=null and factoryId != ''"> |
| | | and t.factory_id= #{factoryId} |
| | | </if> |
| | | <if test="factoryName !=null and factoryName != ''"> |
| | | and t.factory_name= #{factoryName} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="beanImpl !=null and beanImpl != ''"> |
| | | and t.bean_impl= #{beanImpl} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 修改电表厂家信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateMeterMachineFactoryInfo" parameterType="Map"> |
| | | update meter_machine_factory t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="factoryName !=null and factoryName != ''"> |
| | | , t.factory_name= #{factoryName} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | , t.remark= #{remark} |
| | | </if> |
| | | <if test="beanImpl !=null and beanImpl != ''"> |
| | | , t.bean_impl= #{beanImpl} |
| | | </if> |
| | | where 1=1 <if test="factoryId !=null and factoryId != ''"> |
| | | and t.factory_id= #{factoryId} |
| | | </if> |
| | | |
| | | update meter_machine_factory t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="factoryName !=null and factoryName != ''"> |
| | | , t.factory_name= #{factoryName} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | , t.remark= #{remark} |
| | | </if> |
| | | <if test="beanImpl !=null and beanImpl != ''"> |
| | | , t.bean_impl= #{beanImpl} |
| | | </if> |
| | | where 1=1 |
| | | <if test="factoryId !=null and factoryId != ''"> |
| | | and t.factory_id= #{factoryId} |
| | | </if> |
| | | </update> |
| | | |
| | | <!-- 查询电表厂家数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryMeterMachineFactorysCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from meter_machine_factory t |
| | | where 1 =1 |
| | | <if test="factoryId !=null and factoryId != ''"> |
| | | and t.factory_id= #{factoryId} |
| | | </if> |
| | | <if test="factoryName !=null and factoryName != ''"> |
| | | and t.factory_name= #{factoryName} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="beanImpl !=null and beanImpl != ''"> |
| | | and t.bean_impl= #{beanImpl} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | <select id="queryMeterMachineFactorysCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from meter_machine_factory t |
| | | where 1 =1 |
| | | <if test="factoryId !=null and factoryId != ''"> |
| | | and t.factory_id= #{factoryId} |
| | | </if> |
| | | <if test="factoryName !=null and factoryName != ''"> |
| | | and t.factory_name= #{factoryName} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="beanImpl !=null and beanImpl != ''"> |
| | | and t.bean_impl= #{beanImpl} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="communitySpaceV1ServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存小区场地信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveCommunitySpaceInfo" parameterType="Map"> |
| | | insert into community_space( |
| | | admin_name,space_id,name,start_time,tel,end_time,state,community_id,fee_money,venue_id |
| | | ) values ( |
| | | #{adminName},#{spaceId},#{name},#{startTime},#{tel},#{endTime},#{state},#{communityId},#{feeMoney},#{venueId} |
| | | ) |
| | | insert into community_space(admin_name, space_id, name, start_time, tel, end_time, state, community_id, |
| | | fee_money, venue_id) |
| | | values (#{adminName}, #{spaceId}, #{name}, #{startTime}, #{tel}, #{endTime}, #{state}, #{communityId}, |
| | | #{feeMoney}, #{venueId}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询小区场地信息 add by wuxw 2018-07-03 --> |
| | | <select id="getCommunitySpaceInfo" parameterType="Map" resultType="Map"> |
| | |
| | | <if test="venueId !=null and venueId != ''"> |
| | | and t.venue_id= #{venueId} |
| | | </if> |
| | | |
| | | <if test="name !=null and name != ''"> |
| | | and t.name= #{name} |
| | | and t.name like concat('%',#{name},'%') |
| | | </if> |
| | | <if test="startTime !=null and startTime != ''"> |
| | | and t.start_time= #{startTime} |
| | |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改小区场地信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateCommunitySpaceInfo" parameterType="Map"> |
| | |
| | | <if test="venueId !=null and venueId != ''"> |
| | | and t.venue_id= #{venueId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询小区场地数量 add by wuxw 2018-07-03 --> |
| | |
| | | and t.venue_id= #{venueId} |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | and t.name= #{name} |
| | | and t.name like concat('%',#{name},'%') |
| | | </if> |
| | | <if test="startTime !=null and startTime != ''"> |
| | | and t.start_time= #{startTime} |
| | |
| | | <if test="feeMoney !=null and feeMoney != ''"> |
| | | and t.fee_money= #{feeMoney} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="floorServiceDaoImpl"> |
| | | |
| | | <!-- 保存小区楼信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessFloorInfo" parameterType="Map"> |
| | | insert into business_floor( |
| | | floor_id,operate,name,remark,b_id,user_id,floor_num,community_id,floor_area |
| | | ) values ( |
| | | #{floorId},#{operate},#{name},#{remark},#{bId},#{userId},#{floorNum},#{communityId},#{floorArea} |
| | | ) |
| | | insert into business_floor(floor_id, operate, name, remark, b_id, user_id, floor_num, community_id, floor_area) |
| | | values (#{floorId}, #{operate}, #{name}, #{remark}, #{bId}, #{userId}, #{floorNum}, #{communityId}, |
| | | #{floorArea}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询小区楼信息(Business) add by wuxw 2018-07-03 --> |
| | | <select id="getBusinessFloorInfo" parameterType="Map" resultType="Map"> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!-- 保存小区楼信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveFloorInfoInstance" parameterType="Map"> |
| | | insert into f_floor( |
| | |
| | | </if> |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询小区楼信息 add by wuxw 2018-07-03 --> |
| | | <select id="getFloorInfo" parameterType="Map" resultType="Map"> |
| | | select t.floor_id,t.floor_id floorId,t.name,t.status_cd, t.status_cd statusCd,t.remark,t.b_id, |
| | | t.b_id bId,t.user_id, t.user_id userId,t.floor_num ,t.floor_num floorNum,t.community_id communityId,t.community_id, |
| | | t.b_id bId,t.user_id, t.user_id userId,t.floor_num ,t.floor_num floorNum,t.community_id |
| | | communityId,t.community_id, |
| | | t.floor_area,t.floor_area floorArea,t.seq |
| | | from f_floor t |
| | | where 1 =1 |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改小区楼信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateFloorInfoInstance" parameterType="Map"> |
| | | update f_floor t set t.status_cd = #{statusCd} |
| | |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <select id="queryFloorsCount" parameterType="Map" resultType="Map"> |
| | |
| | | <if test="bId !=null and bId != ''"> |
| | | and f.b_id= #{bId} |
| | | </if> |
| | | |
| | | <if test="floorNum !=null and floorNum != ''"> |
| | | and f.floor_num= #{floorNum} |
| | | </if> |
| | | AND f.`status_cd` = '0' |
| | | </select> |
| | | |
| | | |
| | | <!-- 查询小区 内的楼 --> |
| | | <select id="queryFloors" parameterType="Map" resultType="Map"> |
| | |
| | | |
| | | <!-- 查询小区单元信息 add by wuxw 2018-07-03 --> |
| | | <select id="queryFloorAndUnits" parameterType="Map" resultType="Map"> |
| | | select t.floor_id,t.floor_id floorId,t.`name` floorName,bu.layer_count,bu.layer_count layerCount,bu.unit_id,bu.unit_id |
| | | unitId,bu.unit_num,bu.unit_num unitNum,bu.lift,bu.remark,bu.unit_area,bu.unit_area unitArea,t.floor_num floorNum,t.seq |
| | | select t.floor_id,t.floor_id floorId,t.`name` floorName,bu.layer_count,bu.layer_count |
| | | layerCount,bu.unit_id,bu.unit_id |
| | | unitId,bu.unit_num,bu.unit_num unitNum,bu.lift,bu.remark,bu.unit_area,bu.unit_area unitArea,t.floor_num |
| | | floorNum,t.seq |
| | | from f_floor t |
| | | left join building_unit bu on t.`floor_id` = bu.`floor_id` and bu.status_cd = '0' |
| | | where 1 =1 |
| | |
| | | <if test="lift !=null and lift != ''"> |
| | | and bu.lift= #{lift} |
| | | </if> |
| | | order by t.floor_num * 1,bu.unit_num * 1 asc |
| | | order by t.floor_num * 1,bu.unit_num * 1 asc |
| | | <!-- <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if>limit 10;--> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="propertyRightRegistrationV1ServiceDaoImpl"> |
| | | <!-- 保存房屋产权信息 add by wuxw 2018-07-03 --> |
| | |
| | | table_columns = 'state' |
| | | where 1 = 1 |
| | | <if test="address !=null and address != ''"> |
| | | and t.address= #{address} |
| | | and t.address like concat('%',#{address},'%') |
| | | </if> |
| | | <if test="prrId !=null and prrId != ''"> |
| | | and t.prr_id= #{prrId} |
| | |
| | | and t.id_card= #{idCard} |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | and t.name= #{name} |
| | | and t.name like concat('%',#{name},'%') |
| | | </if> |
| | | <if test="link !=null and link != ''"> |
| | | and t.link= #{link} |
| | |
| | | limit #{page}, #{row} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改房屋产权信息 add by wuxw 2018-07-03 --> |
| | | <update id="updatePropertyRightRegistrationInfo" parameterType="Map"> |
| | |
| | | left join f_floor fl on bu.floor_id = fl.floor_id and fl.status_cd = '0' |
| | | where 1 = 1 |
| | | <if test="address !=null and address != ''"> |
| | | and t.address= #{address} |
| | | and t.address like concat('%',#{address},'%') |
| | | </if> |
| | | <if test="prrId !=null and prrId != ''"> |
| | | and t.prr_id= #{prrId} |
| | |
| | | and t.id_card= #{idCard} |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | and t.name= #{name} |
| | | and t.name like concat('%',#{name},'%') |
| | | </if> |
| | | <if test="link !=null and link != ''"> |
| | | and t.link= #{link} |
| | |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="applyRoomDiscountTypeServiceDaoImpl"> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 保存优惠申请类型信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveApplyRoomDiscountTypeInfo" parameterType="Map"> |
| | | insert into apply_room_discount_type( |
| | | apply_type,type_desc,type_name,community_id |
| | | ) values ( |
| | | #{applyType},#{typeDesc},#{typeName},#{communityId} |
| | | ) |
| | | insert into apply_room_discount_type(apply_type, type_desc, type_name, community_id) |
| | | values (#{applyType}, #{typeDesc}, #{typeName}, #{communityId}) |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <!-- 查询优惠申请类型信息 add by wuxw 2018-07-03 --> |
| | | <select id="getApplyRoomDiscountTypeInfo" parameterType="Map" resultType="Map"> |
| | | select t.apply_type,t.apply_type applyType,t.type_desc,t.type_desc typeDesc,t.type_name,t.type_name typeName,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId |
| | | from apply_room_discount_type t |
| | | where 1 =1 |
| | | <if test="applyType !=null and applyType != ''"> |
| | | and t.apply_type= #{applyType} |
| | | </if> |
| | | <if test="typeDesc !=null and typeDesc != ''"> |
| | | and t.type_desc= #{typeDesc} |
| | | </if> |
| | | <if test="typeName !=null and typeName != ''"> |
| | | and t.type_name= #{typeName} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | select t.apply_type,t.apply_type applyType,t.type_desc,t.type_desc typeDesc,t.type_name,t.type_name |
| | | typeName,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId |
| | | from apply_room_discount_type t |
| | | where 1 =1 |
| | | <if test="applyType !=null and applyType != ''"> |
| | | and t.apply_type= #{applyType} |
| | | </if> |
| | | <if test="typeDesc !=null and typeDesc != ''"> |
| | | and t.type_desc= #{typeDesc} |
| | | </if> |
| | | <if test="typeName !=null and typeName != ''"> |
| | | and t.type_name like '%${typeName}%' |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 修改优惠申请类型信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateApplyRoomDiscountTypeInfo" parameterType="Map"> |
| | | update apply_room_discount_type t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="typeDesc !=null and typeDesc != ''"> |
| | | , t.type_desc= #{typeDesc} |
| | | </if> |
| | | <if test="typeName !=null and typeName != ''"> |
| | | , t.type_name= #{typeName} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | where 1=1 <if test="applyType !=null and applyType != ''"> |
| | | and t.apply_type= #{applyType} |
| | | </if> |
| | | |
| | | update apply_room_discount_type t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="typeDesc !=null and typeDesc != ''"> |
| | | , t.type_desc= #{typeDesc} |
| | | </if> |
| | | <if test="typeName !=null and typeName != ''"> |
| | | , t.type_name= #{typeName} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | where 1=1 |
| | | <if test="applyType !=null and applyType != ''"> |
| | | and t.apply_type= #{applyType} |
| | | </if> |
| | | </update> |
| | | |
| | | <!-- 查询优惠申请类型数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryApplyRoomDiscountTypesCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from apply_room_discount_type t |
| | | where 1 =1 |
| | | <if test="applyType !=null and applyType != ''"> |
| | | and t.apply_type= #{applyType} |
| | | </if> |
| | | <if test="typeDesc !=null and typeDesc != ''"> |
| | | and t.type_desc= #{typeDesc} |
| | | </if> |
| | | <if test="typeName !=null and typeName != ''"> |
| | | and t.type_name= #{typeName} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | <select id="queryApplyRoomDiscountTypesCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from apply_room_discount_type t |
| | | where 1 =1 |
| | | <if test="applyType !=null and applyType != ''"> |
| | | and t.apply_type= #{applyType} |
| | | </if> |
| | | <if test="typeDesc !=null and typeDesc != ''"> |
| | | and t.type_desc= #{typeDesc} |
| | | </if> |
| | | <if test="typeName !=null and typeName != ''"> |
| | | and t.type_name like '%${typeName}%' |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="feeComboV1ServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存费用套餐信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveFeeComboInfo" parameterType="Map"> |
| | | insert into fee_combo( |
| | | combo_name,combo_id,community_id,remark |
| | | ) values ( |
| | | #{comboName},#{comboId},#{communityId},#{remark} |
| | | ) |
| | | insert into fee_combo(combo_name, combo_id, community_id, remark) |
| | | values (#{comboName}, #{comboId}, #{communityId}, #{remark}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询费用套餐信息 add by wuxw 2018-07-03 --> |
| | | <select id="getFeeComboInfo" parameterType="Map" resultType="Map"> |
| | |
| | | from fee_combo t |
| | | where 1 =1 |
| | | <if test="comboName !=null and comboName != ''"> |
| | | and t.combo_name= #{comboName} |
| | | and t.combo_name like '%${comboName}%' |
| | | </if> |
| | | <if test="comboId !=null and comboId != ''"> |
| | | and t.combo_id= #{comboId} |
| | |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改费用套餐信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateFeeComboInfo" parameterType="Map"> |
| | |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询费用套餐数量 add by wuxw 2018-07-03 --> |
| | |
| | | from fee_combo t |
| | | where 1 =1 |
| | | <if test="comboName !=null and comboName != ''"> |
| | | and t.combo_name= #{comboName} |
| | | and t.combo_name like '%${comboName}%' |
| | | </if> |
| | | <if test="comboId !=null and comboId != ''"> |
| | | and t.combo_id= #{comboId} |
| | |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="payFeeQrcodeV1ServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存支付二维码信息 add by wuxw 2018-07-03 --> |
| | | <insert id="savePayFeeQrcodeInfo" parameterType="Map"> |
| | | insert into pay_fee_qrcode( |
| | | create_staff_name,query_way,create_staff_id,pre_fee,custom_fee,pfq_id,qrcode_name,community_id,sms_validate,content |
| | | ) values ( |
| | | #{createStaffName},#{queryWay},#{createStaffId},#{preFee},#{customFee},#{pfqId},#{qrcodeName},#{communityId},#{smsValidate},#{content} |
| | | ) |
| | | insert into pay_fee_qrcode(create_staff_name, query_way, create_staff_id, pre_fee, custom_fee, pfq_id, |
| | | qrcode_name, community_id, sms_validate, content) |
| | | values (#{createStaffName}, #{queryWay}, #{createStaffId}, #{preFee}, #{customFee}, #{pfqId}, #{qrcodeName}, |
| | | #{communityId}, #{smsValidate}, #{content}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询支付二维码信息 add by wuxw 2018-07-03 --> |
| | | <select id="getPayFeeQrcodeInfo" parameterType="Map" resultType="Map"> |
| | |
| | | and t.pfq_id= #{pfqId} |
| | | </if> |
| | | <if test="qrcodeName !=null and qrcodeName != ''"> |
| | | and t.qrcode_name= #{qrcodeName} |
| | | and t.qrcode_name like concat('%',#{qrcodeName},'%') |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改支付二维码信息 add by wuxw 2018-07-03 --> |
| | | <update id="updatePayFeeQrcodeInfo" parameterType="Map"> |
| | |
| | | <if test="pfqId !=null and pfqId != ''"> |
| | | and t.pfq_id= #{pfqId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询支付二维码数量 add by wuxw 2018-07-03 --> |
| | |
| | | and t.pfq_id= #{pfqId} |
| | | </if> |
| | | <if test="qrcodeName !=null and qrcodeName != ''"> |
| | | and t.qrcode_name= #{qrcodeName} |
| | | and t.qrcode_name like concat('%',#{qrcodeName},'%') |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | |
| | | <if test="content !=null and content != ''"> |
| | | and t.content= #{content} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | <!-- 保存临时车收费标准信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessTempCarFeeConfigInfo" parameterType="Map"> |
| | | insert into business_temp_car_fee_config( |
| | | car_type,operate,config_id,fee_name,pa_id,area_num,start_time,end_time,b_id,rule_id,community_id,fee_config_id |
| | | ) values ( |
| | | #{carType},#{operate},#{configId},#{feeName},#{paId},#{areaNum},#{startTime},#{endTime},#{bId},#{ruleId},#{communityId},#{feeConfigId} |
| | | ) |
| | | insert into business_temp_car_fee_config(car_type, operate, config_id, fee_name, pa_id, area_num, start_time, |
| | | end_time, b_id, rule_id, community_id, fee_config_id) |
| | | values (#{carType}, #{operate}, #{configId}, #{feeName}, #{paId}, #{areaNum}, #{startTime}, #{endTime}, #{bId}, |
| | | #{ruleId}, #{communityId}, #{feeConfigId}) |
| | | </insert> |
| | | |
| | | <!-- 查询临时车收费标准信息(Business) add by wuxw 2018-07-03 --> |
| | |
| | | select t.car_type,t.car_type carType,t.config_id,t.config_id configId,t.fee_name,t.fee_name |
| | | feeName,t.pa_id,t.pa_id paId,t.area_num,t.area_num areaNum,t.status_cd,t.status_cd |
| | | statusCd,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime,t.b_id,t.b_id bId,t.rule_id,t.rule_id |
| | | ruleId,t.community_id,t.community_id communityId,tcfr.rule_name ruleName,td.name carTypeName,t.fee_config_id,t.fee_config_id feeConfigId |
| | | ruleId,t.community_id,t.community_id communityId,tcfr.rule_name ruleName,td.name |
| | | carTypeName,t.fee_config_id,t.fee_config_id feeConfigId |
| | | from temp_car_fee_config t |
| | | left join temp_car_fee_rule tcfr on t.rule_id = tcfr.rule_id and tcfr.status_cd = '0' |
| | | inner join pay_fee_config pfc on t.fee_config_id = pfc.config_id and pfc.status_cd = '0' |
| | | left join t_dict td on t.car_type = td.status_cd and td.table_name = 'temp_car_fee_config' and td.table_columns = 'car_type' |
| | | left join t_dict td on t.car_type = td.status_cd and td.table_name = 'temp_car_fee_config' and td.table_columns |
| | | = 'car_type' |
| | | where 1 = 1 |
| | | <if test="carType !=null and carType != ''"> |
| | | and t.car_type= #{carType} |
| | |
| | | and t.config_id= #{configId} |
| | | </if> |
| | | <if test="feeName !=null and feeName != ''"> |
| | | and t.fee_name= #{feeName} |
| | | and t.fee_name like '%${feeName}%' |
| | | </if> |
| | | <if test="paId !=null and paId != ''"> |
| | | and t.pa_id= #{paId} |
| | | </if> |
| | | <if test="areaNum !=null and areaNum != ''"> |
| | | and t.area_num= #{areaNum} |
| | | </if> |
| | | <if test="areaNumLike !=null and areaNumLike != ''"> |
| | | and t.area_num like '%${areaNumLike}%' |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | |
| | | from temp_car_fee_config t |
| | | left join temp_car_fee_rule tcfr on t.rule_id = tcfr.rule_id and tcfr.status_cd = '0' |
| | | inner join pay_fee_config pfc on t.fee_config_id = pfc.config_id and pfc.status_cd = '0' |
| | | left join t_dict td on t.car_type = td.status_cd and td.table_name = 'temp_car_fee_config' and td.table_columns = 'car_type' |
| | | left join t_dict td on t.car_type = td.status_cd and td.table_name = 'temp_car_fee_config' and td.table_columns |
| | | = 'car_type' |
| | | where 1 = 1 |
| | | <if test="carType !=null and carType != ''"> |
| | | and t.car_type= #{carType} |
| | |
| | | and t.config_id= #{configId} |
| | | </if> |
| | | <if test="feeName !=null and feeName != ''"> |
| | | and t.fee_name= #{feeName} |
| | | and t.fee_name like '%${feeName}%' |
| | | </if> |
| | | <if test="paId !=null and paId != ''"> |
| | | and t.pa_id= #{paId} |
| | |
| | | <if test="areaNum !=null and areaNum != ''"> |
| | | and t.area_num= #{areaNum} |
| | | </if> |
| | | <if test="areaNumLike !=null and areaNumLike != ''"> |
| | | and t.area_num like '%${areaNumLike}%' |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="baseDataStatisticsServiceDaoImpl"> |
| | | |
| | | <!-- 查询房屋数 --> |
| | | <select id="getRoomCount" parameterType="Map" resultType="Map"> |
| | | |
| | | select count(1) count |
| | | from building_room t |
| | | inner join building_unit bu on t.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0' |
| | | <if test="ownerId != null and ownerId != ''"> |
| | | inner join building_owner_room_rel borr on t.room_id = borr.room_id and borr.status_cd = '0' |
| | | left join building_owner bo on borr.owner_id = bo.member_id and bo.status_cd = '0' |
| | | </if> |
| | | inner join building_owner_room_rel borr on t.room_id = borr.room_id and borr.status_cd = '0' |
| | | left join building_owner bo on borr.owner_id = bo.member_id and bo.status_cd = '0' |
| | | where 1=1 |
| | | and t.status_cd = '0' |
| | | <if test="floorId != null and floorId != ''"> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <select id="getReceivedRoomCount" parameterType="Map" resultType="Map"> |
| | | |
| | | select count(1) count |
| | | from |
| | | (select t.room_id |
| | |
| | | </select> |
| | | |
| | | <select id="getOweRoomCount" parameterType="Map" resultType="Map"> |
| | | |
| | | select count(1) count |
| | | from |
| | | (select t.room_id |
| | |
| | | limit #{page},#{row} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | <!-- 查询无效费用 add by wuxw 2018-07-03 --> |
| | | <select id="queryRoomsTree" parameterType="Map" resultType="Map"> |
| | | SELECT t.room_id,t.room_id roomId,t.layer,t.room_num, |
| | | t.room_num roomNum,t.unit_id,u.`unit_num` unitNum, |
| | | u.unit_id unitId,f.floor_id floorId,f.floor_num floorNum,t.`community_id` communityId,bo.owner_id ownerId |
| | | ,bo.`name` ownerName ,bo.link link |
| | | SELECT t.room_id, |
| | | t.room_id roomId, |
| | | t.layer, |
| | | t.room_num, |
| | | t.room_num roomNum, |
| | | t.unit_id, |
| | | u.`unit_num` unitNum, |
| | | u.unit_id unitId, |
| | | f.floor_id floorId, |
| | | f.floor_num floorNum, |
| | | t.`community_id` communityId, |
| | | bo.owner_id ownerId |
| | | , |
| | | bo.`name` ownerName, |
| | | bo.link link |
| | | FROM building_room t |
| | | inner join building_unit u on t.`unit_id` = u.`unit_id` and u.`status_cd` = '0' |
| | | inner JOIN f_floor f on u.`floor_id` = f.`floor_id` AND f.`community_id` = t.`community_id` AND f.`status_cd` = |
| | | '0' |
| | | left join building_owner_room_rel borr on t.room_id = borr.room_id and borr.status_cd = '0' |
| | | left join building_owner bo on borr.owner_id = bo.member_id and bo.status_cd = '0' |
| | | WHERE 1 =1 |
| | | and t.status_cd = '0' |
| | | and u.unit_id = #{unitId} |
| | | and t.community_id= #{communityId} |
| | | order by CONVERT(t.layer,SIGNED),CONVERT(t.room_num,SIGNED) |
| | | inner join building_unit u on t.`unit_id` = u.`unit_id` and u.`status_cd` = '0' |
| | | inner JOIN f_floor f |
| | | on u.`floor_id` = f.`floor_id` AND f.`community_id` = t.`community_id` AND f.`status_cd` = |
| | | '0' |
| | | left join building_owner_room_rel borr on t.room_id = borr.room_id and borr.status_cd = '0' |
| | | left join building_owner bo on borr.owner_id = bo.member_id and bo.status_cd = '0' |
| | | WHERE 1 = 1 |
| | | and t.status_cd = '0' |
| | | and u.unit_id = #{unitId} |
| | | and t.community_id = #{communityId} |
| | | order by CONVERT(t.layer, SIGNED), CONVERT(t.room_num, SIGNED) |
| | | </select> |
| | | |
| | | <select id="queryHisOwnerCarCount" parameterType="Map" resultType="Map"> |
| | |
| | | left join u_user uu on co.user_id = uu.user_id |
| | | left join t_dict t1 on t.car_type=t1.status_cd and t1.table_name='owner_car' and t1.table_columns = 'car_type' |
| | | left join t_dict t2 on t.state=t2.status_cd and t2.table_name='owner_car' and t2.table_columns = 'state' |
| | | left join t_dict t3 on t.lease_type = t3.status_cd and t3.table_name = 'owner_car' and t3.table_columns = 'lease_type' |
| | | left join t_dict t4 on t.car_type_cd=t4.status_cd and t4.table_name='owner_car' and t4.table_columns = 'car_type_cd' |
| | | left join t_dict t3 on t.lease_type = t3.status_cd and t3.table_name = 'owner_car' and t3.table_columns = |
| | | 'lease_type' |
| | | left join t_dict t4 on t.car_type_cd=t4.status_cd and t4.table_name='owner_car' and t4.table_columns = |
| | | 'car_type_cd' |
| | | left join building_owner bo on t.owner_id = bo.member_id and bo.status_cd = '0' |
| | | where 1=1 |
| | | <if test="carNum != null and carNum != ''"> |
| | |
| | | and uu.name like concat('%',#{staffNameLike},'%') |
| | | </if> |
| | | <if test="logStartTime != null and logStartTime != ''"> |
| | | and co.create_time > #{logStartTime} |
| | | and co.create_time < #{logEndTime} |
| | | and t.start_time >= #{logStartTime} |
| | | </if> |
| | | <if test="logEndTime != null and logEndTime != ''"> |
| | | and t.end_time <= #{logEndTime} |
| | | </if> |
| | | and t.community_id= #{communityId} |
| | | </select> |
| | |
| | | left join u_user uu on co.user_id = uu.user_id |
| | | left join t_dict t1 on t.car_type=t1.status_cd and t1.table_name='owner_car' and t1.table_columns = 'car_type' |
| | | left join t_dict t2 on t.state=t2.status_cd and t2.table_name='owner_car' and t2.table_columns = 'state' |
| | | left join t_dict t3 on t.lease_type = t3.status_cd and t3.table_name = 'owner_car' and t3.table_columns = 'lease_type' |
| | | left join t_dict t4 on t.car_type_cd=t4.status_cd and t4.table_name='owner_car' and t4.table_columns = 'car_type_cd' |
| | | left join t_dict t3 on t.lease_type = t3.status_cd and t3.table_name = 'owner_car' and t3.table_columns = |
| | | 'lease_type' |
| | | left join t_dict t4 on t.car_type_cd=t4.status_cd and t4.table_name='owner_car' and t4.table_columns = |
| | | 'car_type_cd' |
| | | left join building_owner bo on t.owner_id = bo.member_id and bo.status_cd = '0' |
| | | where 1=1 |
| | | <if test="carNum != null and carNum != ''"> |
| | |
| | | and uu.name like concat('%',#{staffNameLike},'%') |
| | | </if> |
| | | <if test="logStartTime != null and logStartTime != ''"> |
| | | and co.create_time > #{logStartTime} |
| | | and co.create_time < #{logEndTime} |
| | | and t.start_time >= #{logStartTime} |
| | | </if> |
| | | <if test="logEndTime != null and logEndTime != ''"> |
| | | and t.end_time <= #{logEndTime} |
| | | </if> |
| | | and t.community_id= #{communityId} |
| | | order by t.create_time desc,t.operate |
| | |
| | | and uu.name like concat('%',#{staffNameLike},'%') |
| | | </if> |
| | | <if test="logStartTime != null and logStartTime != ''"> |
| | | and co.create_time > #{logStartTime} |
| | | and co.create_time < #{logEndTime} |
| | | and co.create_time >= #{logStartTime} |
| | | </if> |
| | | <if test="logEndTime != null and logEndTime != ''"> |
| | | and co.create_time <= #{logEndTime} |
| | | </if> |
| | | and t.community_id = #{communityId} |
| | | </select> |
| | |
| | | and uu.name like concat('%',#{staffNameLike},'%') |
| | | </if> |
| | | <if test="logStartTime != null and logStartTime != ''"> |
| | | and co.create_time > #{logStartTime} |
| | | and co.create_time < #{logEndTime} |
| | | and co.create_time >= #{logStartTime} |
| | | </if> |
| | | <if test="logEndTime != null and logEndTime != ''"> |
| | | and co.create_time <= #{logEndTime} |
| | | </if> |
| | | and t.community_id = #{communityId} |
| | | order by t.create_time desc,t.operate |
| | |
| | | <select id="queryHisFeeCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from business_pay_fee t |
| | | left join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0' |
| | | left join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0' |
| | | left join c_business cb on t.b_id = cb.b_id |
| | | left join c_orders co on cb.o_id = co.o_id |
| | | left join u_user uu on co.user_id = uu.user_id |
| | | <if test="payerObjName != null and payerObjName != ''"> |
| | | left join pay_fee_attrs pfa on pfa.fee_id = t.fee_id and pfa.spec_cd = '390012' |
| | | </if> |
| | | <if test="deleteFlag != null and deleteFlag != ''"> |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '1' and pf.b_id = t.b_id |
| | | </if> |
| | | where 1=1 |
| | | <if test="feeId != null and feeId != ''"> |
| | | and t.fee_id = #{feeId} |
| | | and t.fee_id = #{feeId} |
| | | </if> |
| | | <if test="deleteFlag != null and deleteFlag != ''"> |
| | | and t.operate = 'DEL' |
| | |
| | | <if test="staffNameLike != null and staffNameLike != ''"> |
| | | and uu.name like concat('%',#{staffNameLike},'%') |
| | | </if> |
| | | <if test="feeNameLike != null and staffNameLike != ''"> |
| | | <if test="feeNameLike != null and feeNameLike != ''"> |
| | | and pfc.fee_name like concat('%',#{feeNameLike},'%') |
| | | </if> |
| | | <if test="payerObjName != null and payerObjName != ''"> |
| | | and pfa.value = #{payerObjName} |
| | | </if> |
| | | <if test="logStartTime != null and logStartTime != ''"> |
| | | and co.create_time > #{logStartTime} |
| | | and co.create_time < #{logEndTime} |
| | | and t.start_time >= #{logStartTime} |
| | | </if> |
| | | <if test="logEndTime != null and logEndTime != ''"> |
| | | and t.end_time <= #{logEndTime} |
| | | </if> |
| | | and t.community_id = #{communityId} |
| | | </select> |
| | |
| | | t.amount, |
| | | uu.`name` userName,pfa.`value` payerObjName,pfa1.value ownerName,t.b_id bId,co.create_time createTime |
| | | from business_pay_fee t |
| | | left join pay_fee_config pfc on t.config_id = pfc.config_id |
| | | left join pay_fee_config pfc on t.config_id = pfc.config_id |
| | | left join c_business cb on t.b_id = cb.b_id |
| | | left join c_orders co on cb.o_id = co.o_id |
| | | left join u_user uu on co.user_id = uu.user_id |
| | |
| | | and t.operate = 'DEL' |
| | | </if> |
| | | <if test="payerObjName != null and payerObjName != ''"> |
| | | pfa.`value` = #{payerObjName} |
| | | and pfa.value = #{payerObjName} |
| | | </if> |
| | | <if test="staffNameLike != null and staffNameLike != ''"> |
| | | and uu.name like concat('%',#{staffNameLike},'%') |
| | | </if> |
| | | <if test="feeNameLike != null and staffNameLike != ''"> |
| | | <if test="feeNameLike != null and feeNameLike != ''"> |
| | | and pfc.fee_name like concat('%',#{feeNameLike},'%') |
| | | </if> |
| | | <if test="logStartTime != null and logStartTime != ''"> |
| | | and co.create_time > #{logStartTime} |
| | | and co.create_time < #{logEndTime} |
| | | and t.start_time >= #{logStartTime} |
| | | </if> |
| | | <if test="logEndTime != null and logEndTime != ''"> |
| | | and t.end_time <= #{logEndTime} |
| | | </if> |
| | | and t.community_id = #{communityId} |
| | | order by t.create_time desc,t.operate |
| | |
| | | <if test="staffNameLike != null and staffNameLike != ''"> |
| | | and uu.name like concat('%',#{staffNameLike},'%') |
| | | </if> |
| | | <if test="feeNameLike != null and staffNameLike != ''"> |
| | | <if test="feeNameLike != null and feeNameLike != ''"> |
| | | and t.fee_name like concat('%',#{feeNameLike},'%') |
| | | </if> |
| | | <if test="logStartTime != null and logStartTime != ''"> |
| | | and co.create_time > #{logStartTime} |
| | | and co.create_time < #{logEndTime} |
| | | and t.start_time >= #{logStartTime} |
| | | </if> |
| | | <if test="logEndTime != null and logEndTime != ''"> |
| | | and t.end_time <= #{logEndTime} |
| | | </if> |
| | | and t.community_id = #{communityId} |
| | | </select> |
| | |
| | | <select id="queryHisFeeConfigs" parameterType="Map" resultType="Map"> |
| | | select t.operate,t.fee_type_cd feeTypeCd,t.computing_formula |
| | | computingFormula,t.additional_amount additionalAmount,t.bill_type |
| | | billType,t.computing_formula_text computingFormulaText,t.square_price squarePrice,t.payment_cd paymentCd,t.is_default |
| | | billType,t.computing_formula_text computingFormulaText,t.square_price squarePrice,t.payment_cd |
| | | paymentCd,t.is_default |
| | | isDefault,t.config_id configId,t.fee_flag feeFlag,t.fee_name |
| | | feeName,t.payment_cycle paymentCycle,t.start_time startTime,t.end_time |
| | | endTime,t.community_id communityId,t.deduct_from deductFrom, |
| | |
| | | </if> |
| | | where 1=1 |
| | | <if test="configId != null and configId != ''"> |
| | | and t.config_id = #{configId} |
| | | and t.config_id = #{configId} |
| | | </if> |
| | | <if test="deleteFlag != null and deleteFlag != ''"> |
| | | and t.operate = 'DEL' |
| | |
| | | and t.fee_name like concat('%',#{feeNameLike},'%') |
| | | </if> |
| | | <if test="logStartTime != null and logStartTime != ''"> |
| | | and co.create_time > #{logStartTime} |
| | | and co.create_time < #{logEndTime} |
| | | and t.start_time >= #{logStartTime} |
| | | </if> |
| | | <if test="logEndTime != null and logEndTime != ''"> |
| | | and t.end_time <= #{logEndTime} |
| | | </if> |
| | | and t.community_id = #{communityId} |
| | | order by t.create_time desc,t.operate |
| | |
| | | and uu.name like concat('%',#{staffNameLike},'%') |
| | | </if> |
| | | <if test="logStartTime != null and logStartTime != ''"> |
| | | and co.create_time > #{logStartTime} |
| | | and co.create_time < #{logEndTime} |
| | | and co.create_time >= #{logStartTime} |
| | | </if> |
| | | <if test="logEndTime != null and logEndTime != ''"> |
| | | and co.create_time <= #{logEndTime} |
| | | </if> |
| | | and t.community_id = #{communityId} |
| | | </select> |
| | |
| | | roomSubType,td1.name roomSubTypeName, t.room_area roomArea,t.room_id |
| | | roomId,t.layer,t.fee_coefficient feeCoefficient,t.built_up_area |
| | | builtUpArea,t.room_num roomNum,t.unit_id unitId,t.state,td.name stateName,t.community_id |
| | | communityId,t.apartment,t.room_type roomType,t.room_rent roomRent,f.floor_num floorNum,bu.unit_num unitNum,t.b_id bId |
| | | communityId,t.apartment,t.room_type roomType,t.room_rent roomRent,f.floor_num floorNum,bu.unit_num |
| | | unitNum,t.b_id bId |
| | | from business_building_room t |
| | | left join building_unit bu on t.unit_id = bu.unit_id |
| | | left join f_floor f on f.floor_id = bu.floor_id |
| | |
| | | and uu.name like concat('%',#{staffNameLike},'%') |
| | | </if> |
| | | <if test="logStartTime != null and logStartTime != ''"> |
| | | and co.create_time > #{logStartTime} |
| | | and co.create_time < #{logEndTime} |
| | | and co.create_time >= #{logStartTime} |
| | | </if> |
| | | <if test="logEndTime != null and logEndTime != ''"> |
| | | and co.create_time <= #{logEndTime} |
| | | </if> |
| | | and t.community_id = #{communityId} |
| | | order by t.create_time desc,t.operate |
| | |
| | | limit #{page}, #{row} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="reportFeeMonthStatisticsServiceDaoImpl"> |
| | | |
| | | <!-- 保存费用月统计信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveReportFeeMonthStatisticsInfo" parameterType="Map"> |
| | | insert into report_fee_month_statistics(receivable_amount, statistics_id, update_time, remark, obj_name, |
| | | received_amount, fee_year, fee_month, fee_id, config_id, |
| | | obj_id, fee_name, owe_amount, community_id, fee_create_time, obj_type, |
| | | deadline_time, cur_max_time, |
| | | his_owe_amount, cur_receivable_amount, cur_received_amount, |
| | | his_owe_received_amount, pre_received_amount, obj_name_num) |
| | | received_amount, fee_year, fee_month, fee_id, config_id, |
| | | obj_id, fee_name, owe_amount, community_id, fee_create_time, obj_type, |
| | | deadline_time, cur_max_time, |
| | | his_owe_amount, cur_receivable_amount, cur_received_amount, |
| | | his_owe_received_amount, pre_received_amount, obj_name_num) |
| | | values (#{receivableAmount}, #{statisticsId}, #{updateTime}, #{remark}, #{objName}, #{receivedAmount}, |
| | | #{feeYear}, #{feeMonth}, |
| | | #{feeId}, #{configId}, #{objId}, #{feeName}, #{oweAmount}, #{communityId}, #{feeCreateTime}, #{objType}, |
| | | #{deadlineTime}, #{curMaxTime}, |
| | | #{hisOweAmount}, #{curReceivableAmount}, #{curReceivedAmount}, #{hisOweReceivedAmount}, |
| | | #{preReceivedAmount}, #{objNameNum}) |
| | | #{feeYear}, #{feeMonth}, |
| | | #{feeId}, #{configId}, #{objId}, #{feeName}, #{oweAmount}, #{communityId}, #{feeCreateTime}, #{objType}, |
| | | #{deadlineTime}, #{curMaxTime}, |
| | | #{hisOweAmount}, #{curReceivableAmount}, #{curReceivedAmount}, #{hisOweReceivedAmount}, |
| | | #{preReceivedAmount}, #{objNameNum}) |
| | | </insert> |
| | | |
| | | <!-- 查询费用月统计信息 add by wuxw 2018-07-03 --> |
| | |
| | | and t.fee_id= #{feeId} |
| | | </if> |
| | | </update> |
| | | |
| | | |
| | | <!-- 修改费用月统计信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateReportFeeMonthStatisticsInfo" parameterType="Map"> |
| | |
| | | and t.config_id= #{configId} |
| | | </if> |
| | | </update> |
| | | |
| | | |
| | | <!-- 查询费用月统计数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryReportFeeMonthStatisticssCount" parameterType="Map" resultType="Map"> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- |
| | | and t.receivable_amount >= 0 and t.received_amount >= 0 and t.owe_amount >= 0 |
| | | --> |
| | | <!-- and t.receivable_amount >= 0 and t.received_amount >= 0 and t.owe_amount >= 0 --> |
| | | <select id="queryFeeBreakdownCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from ( |
| | |
| | | </select> |
| | | |
| | | <!-- 查询费用月统计信息 add by wuxw 2018-07-03 |
| | | and t.receivable_amount >= 0 and t.received_amount >= 0 and t.owe_amount >= 0 |
| | | --> |
| | | and t.receivable_amount >= 0 and t.received_amount >= 0 and t.owe_amount >= 0--> |
| | | <select id="queryFeeBreakdown" parameterType="Map" resultType="Map"> |
| | | select t.fee_name feeName,td.name feeTypeCd,pfc.fee_type_cd,t.config_id configId,SUM(t.his_owe_amount) |
| | | hisOweAmount,SUM(t.cur_receivable_amount) curReceivableAmount, |
| | |
| | | </select> |
| | | |
| | | <!-- 查询费用月统计信息 add by wuxw 2018-07-03 |
| | | and t.receivable_amount >= 0 and t.received_amount >= 0 and t.owe_amount >= 0 |
| | | --> |
| | | and t.receivable_amount >= 0 and t.received_amount >= 0 and t.owe_amount >= 0--> |
| | | <select id="queryFeeBreakdownDetail" parameterType="Map" resultType="Map"> |
| | | select t.obj_name objName,t.fee_name feeName,t.fee_year feeYear,t.fee_month feeMonth,t.create_time createTime |
| | | ,t.config_id configId,t.his_owe_amount hisOweAmount,t.obj_name_num objNameNum,t.cur_receivable_amount |
| | |
| | | limit #{page}, #{row} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 查询费用月统计信息 add by wuxw 2018-07-03 --> |
| | | <select id="queryOweFeeDetailMajor" parameterType="Map" resultType="Map"> |
| | | select SUM(t.amount_owed) oweAmount |
| | |
| | | pf.payer_obj_type payerObjType,t.start_time startTime,t.end_time endTime,t.create_time createTime, |
| | | t.receivable_amount receivableAmount,t.received_amount receivedAmount,pfa.`value` |
| | | importFeeName,t.prime_rate,d.name primeRate,fdr.discount_small_type discountSmallType,fdr.rule_name |
| | | ruleName,pfdd.discount_price discountPrice,co.contract_code contractCode,pfo.`value` ownerName,t.pay_order_id oId, |
| | | ruleName,pfdd.discount_price discountPrice,co.contract_code contractCode,pfo.`value` ownerName,t.pay_order_id |
| | | oId, |
| | | d2.name feeTypeCdName,pfc.fee_type_cd feeTypeCd,t.state,d3.name stateName,t.fee_id feeId,pft.`value` repairId, |
| | | t.detail_id,t.detail_id detailId,pf.payer_obj_id,pfb.value ownerId,concat(pa.num,'停车场',ps.num,'车位') psName, |
| | | fad.amount withholdAmount,t.cashier_id cashierId,t.cashier_name cashierName,t.payable_amount payableAmount,pfc.fee_flag feeFlag |
| | | fad.amount withholdAmount,t.cashier_id cashierId,t.cashier_name cashierName,t.payable_amount |
| | | payableAmount,pfc.fee_flag feeFlag |
| | | from pay_fee_detail t |
| | | left JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | left join pay_fee_config pfc on pf.config_id = pfc.config_id and pfc.status_cd = '0' |
| | |
| | | |
| | | <!-- 查询费用月统计信息 add by wuxw 2018-07-03 --> |
| | | <select id="queryDeadlineFee" parameterType="Map" resultType="Map"> |
| | | |
| | | select |
| | | t.obj_name objName, |
| | | pf.payer_obj_type objType, |
| | |
| | | <select id="queryPrePaymentCount" parameterType="Map" resultType="Map"> |
| | | select pfc.fee_name feeName, count(t.payer_obj_id) objCount |
| | | from pay_fee t |
| | | inner join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0' |
| | | inner join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0' |
| | | where t.state = '2008001' |
| | | and t.status_cd = '0' |
| | | and t.end_time > #{startTime} |
| | | and t.end_time < #{endTime} |
| | | and t.community_id = #{communityId} |
| | | and t.status_cd = '0' |
| | | and t.end_time > #{startTime} |
| | | and t.end_time < #{endTime} |
| | | and t.community_id = #{communityId} |
| | | group by pfc.fee_name, pfc.config_id |
| | | order by objCount |
| | | </select> |
| | |
| | | <select id="queryDeadlinePaymentCount" parameterType="Map" resultType="Map"> |
| | | SELECT t.fee_name feeName, count(t.obj_id) objCount |
| | | FROM report_fee_month_statistics t |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id |
| | | and pf.community_id = t.community_id and pf.status_cd = '0' |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id |
| | | and pf.community_id = t.community_id and pf.status_cd = '0' |
| | | WHERE 1 = 1 |
| | | AND t.status_cd = '0' |
| | | and t.community_id = #{communityId} |
| | | AND t.deadline_time > #{startTime} |
| | | AND t.deadline_time < #{endTime} |
| | | AND t.status_cd = '0' |
| | | and t.community_id = #{communityId} |
| | | AND t.deadline_time > #{startTime} |
| | | AND t.deadline_time < #{endTime} |
| | | group by t.config_id, t.fee_name |
| | | order by objCount desc |
| | | </select> |
| | |
| | | <select id="queryOwePaymentCount" parameterType="Map" resultType="Map"> |
| | | select t.fee_name feeName, count(distinct t.obj_id) objCount |
| | | from report_fee_month_statistics t |
| | | inner join pay_fee pf |
| | | on t.fee_id = pf.fee_id and pf.community_id = t.community_id and pf.status_cd = '0' |
| | | inner join pay_fee pf |
| | | on t.fee_id = pf.fee_id and pf.community_id = t.community_id and pf.status_cd = '0' |
| | | where t.community_id = #{communityId} |
| | | and t.owe_amount > 0 |
| | | and t.owe_amount > 0 |
| | | group by t.config_id, t.fee_name |
| | | order by objCount desc |
| | | </select> |
| | |
| | | <select id="queryAllPaymentCount" parameterType="Map" resultType="Map"> |
| | | select t.fee_name feeName, count(distinct t.obj_id) objCount |
| | | from report_fee_month_statistics t |
| | | inner join pay_fee pf |
| | | on t.fee_id = pf.fee_id and pf.community_id = t.community_id and pf.status_cd = '0' |
| | | inner join pay_fee pf |
| | | on t.fee_id = pf.fee_id and pf.community_id = t.community_id and pf.status_cd = '0' |
| | | where t.community_id = #{communityId} |
| | | group by t.config_id, t.fee_name |
| | | order by objCount desc |
| | | </select> |
| | | |
| | | <select id="queryFinishOweFee" parameterType="Map" resultType="Map"> |
| | | select t.config_id configId, |
| | | t.fee_id feeId, |
| | | t.statistics_id statisticsId, |
| | | t.fee_year feeYear, |
| | | fee_month feeMonth |
| | | select t.config_id configId, |
| | | t.fee_id feeId, |
| | | t.statistics_id statisticsId, |
| | | t.fee_year feeYear, |
| | | fee_month feeMonth |
| | | from report_fee_month_statistics t |
| | | inner join pay_fee pf |
| | | on t.fee_id = pf.fee_id and pf.state = '2009001' and pf.community_id = #{communityId} and |
| | | pf.status_cd = '0' |
| | | inner join pay_fee pf |
| | | on t.fee_id = pf.fee_id and pf.state = '2009001' and pf.community_id = #{communityId} and |
| | | pf.status_cd = '0' |
| | | where t.owe_amount > 0 |
| | | and t.status_cd = '0' |
| | | and t.community_id = #{communityId} limit 100 |
| | | and t.status_cd = '0' |
| | | and t.community_id = #{communityId} limit 100 |
| | | </select> |
| | | |
| | | <!-- 查询费用配置信息 add by wuxw 2018-07-03 --> |
| | |
| | | </select> |
| | | |
| | | <select id="queryRepairForStaff" parameterType="Map" resultType="Map"> |
| | | SELECT r.staff_id staffId,u.name staffName FROM r_repair_user r |
| | | SELECT r.staff_id staffId,u.name staffName,r.state,td.name stateName FROM r_repair_user r |
| | | inner join u_user u on u.user_id = r.staff_id and u.status_cd = '0' |
| | | left join t_dict td on r.state = td.status_cd and td.table_name = 'r_repair_user' and td.table_columns = 'state' |
| | | WHERE r.state!='10005' AND r.state!='10009' AND r.state!='11000' AND |
| | | r.state!='12000' AND r.state != '10007' AND r.status_cd = '0' AND |
| | | r.repair_event != 'payUser' AND r.repair_event != 'startUser' AND r.staff_id != '-1' |
| | |
| | | </if> |
| | | <if test="staffId != null and staffId != ''"> |
| | | and r.staff_id = #{staffId} |
| | | </if> |
| | | <if test="state != null and state != ''"> |
| | | and r.state = #{state} |
| | | </if> |
| | | <if test="beginStartTime != null and beginStartTime !=''"> |
| | | and r.start_time >= #{beginStartTime} |
| | | </if> |
| | | <if test="beginEndTime != null and beginEndTime !=''"> |
| | | and r.start_time <= #{beginEndTime} |
| | | </if> |
| | | <if test="finishStartTime != null and finishStartTime !=''"> |
| | | and r.end_time >= #{finishStartTime} |
| | | </if> |
| | | <if test="finishEndTime != null and finishEndTime !=''"> |
| | | and r.end_time <= #{finishEndTime} |
| | | </if> |
| | | group by r.staff_id |
| | | <if test="page != -1 and page != null "> |
| | |
| | | <select id="queryNoFeeRoomsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from building_room t |
| | | inner join building_unit bu |
| | | inner join building_unit bu |
| | | on t.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0' |
| | | inner join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0' |
| | | where t.status_cd = '0' |
| | | and not exists ( |
| | | select 1 from pay_fee pf where t.room_id = pf.payer_obj_id |
| | | and pf.status_cd = '0' |
| | | and pf.state = '2008001' |
| | | ) |
| | | and t.community_id = #{communityId} |
| | | and not exists ( |
| | | select 1 from pay_fee pf where t.room_id = pf.payer_obj_id |
| | | and pf.status_cd = '0' |
| | | and pf.state = '2008001' |
| | | ) |
| | | and t.community_id = #{communityId} |
| | | </select> |
| | | |
| | | <!-- 查询费用月统计信息 add by wuxw 2018-07-03 --> |
| | |
| | | group by pfd.state |
| | | </select> |
| | | |
| | | |
| | | <select id="queryHuaningOweFeeCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from f_floor f |
| | | where 1=1 |
| | | and f.community_id = #{communityId} |
| | | and f.status_cd = '0' |
| | | |
| | | and f.community_id = #{communityId} |
| | | and f.status_cd = '0' |
| | | </select> |
| | | |
| | | <!-- 查询费用月统计信息 add by wuxw 2018-07-03 --> |
| | |
| | | inner join building_room br on t.obj_id = br.room_id and br.status_cd = '0' |
| | | inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | where |
| | | 1=1 |
| | | where 1=1 |
| | | and bu.floor_id = f.floor_id |
| | | and t.community_id = f.community_id |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | |
| | | inner join building_room br on t.obj_id = br.room_id and br.status_cd = '0' |
| | | inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | where |
| | | 1=1 |
| | | where 1=1 |
| | | and bu.floor_id = f.floor_id |
| | | and t.community_id = f.community_id |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | |
| | | inner join building_room br on t.obj_id = br.room_id and br.status_cd = '0' |
| | | inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | where |
| | | 1=1 |
| | | where 1=1 |
| | | and bu.floor_id = f.floor_id |
| | | and t.community_id = f.community_id |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | |
| | | from f_floor f |
| | | where 1=1 |
| | | and f.community_id = #{communityId} |
| | | <if test="floorNum != null and floorNum != ''"> |
| | | and f.floor_num = #{floorNum} |
| | | </if> |
| | | and f.status_cd = '0' |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <select id="queryHuaningPayFeeCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from ( |
| | | select t.floor_num |
| | | from f_floor t |
| | | where 1=1 |
| | | and t.community_id= #{communityId} |
| | | GROUP BY t.floor_num |
| | | ) tt |
| | | </select> |
| | | |
| | | <!-- 查询费用月统计信息 add by wuxw 2018-07-03 --> |
| | | <select id="queryHuaningPayFee" parameterType="Map" resultType="Map"> |
| | | |
| | | <select id="queryHuaningOweFeeCounts" parameterType="Map" resultType="Map"> |
| | | select count(1) count from ( |
| | | select |
| | | f.floor_num floorNum, |
| | | ( |
| | |
| | | inner join building_room br on t.obj_id = br.room_id and br.status_cd = '0' |
| | | inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | where |
| | | 1=1 |
| | | where 1=1 |
| | | and bu.floor_id = f.floor_id |
| | | and t.community_id = f.community_id |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | | and pf.fee_type_cd = #{feeTypeCd} |
| | | </if> |
| | | and t.detail_id = '-1' |
| | | and t.cur_month_time <= #{endTime} |
| | | ) oweAmount, |
| | | ( |
| | | select ifnull(SUM(t.receivable_amount),0) |
| | | from pay_fee_detail_month t |
| | | inner join building_room br on t.obj_id = br.room_id and br.status_cd = '0' |
| | | inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | where 1=1 |
| | | and bu.floor_id = f.floor_id |
| | | and t.community_id = f.community_id |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | | and pf.fee_type_cd = #{feeTypeCd} |
| | | </if> |
| | | and t.detail_id = '-1' |
| | | and t.cur_month_time <= #{endTime} |
| | | and t.cur_month_time >= #{startTime} |
| | | ) curOweAmount, |
| | | ( |
| | | select ifnull(SUM(t.receivable_amount),0) |
| | | from pay_fee_detail_month t |
| | | inner join building_room br on t.obj_id = br.room_id and br.status_cd = '0' |
| | | inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | where 1=1 |
| | | and bu.floor_id = f.floor_id |
| | | and t.community_id = f.community_id |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | | and pf.fee_type_cd = #{feeTypeCd} |
| | | </if> |
| | | and t.detail_id = '-1' |
| | | and t.cur_month_time < #{startTime} |
| | | ) preOweAmount |
| | | from f_floor f |
| | | where 1=1 |
| | | and f.community_id = #{communityId} |
| | | <if test="floorNum != null and floorNum != ''"> |
| | | and f.floor_num = #{floorNum} |
| | | </if> |
| | | and f.status_cd = '0' |
| | | ) st |
| | | </select> |
| | | |
| | | <select id="queryHuaningPayFeeCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from ( |
| | | select t.floor_num |
| | | from f_floor t |
| | | where 1=1 |
| | | and t.community_id= #{communityId} |
| | | GROUP BY t.floor_num |
| | | ) tt |
| | | </select> |
| | | |
| | | <!-- 查询费用月统计信息 add by wuxw 2018-07-03 --> |
| | | <select id="queryHuaningPayFee" parameterType="Map" resultType="Map"> |
| | | select |
| | | f.floor_num floorNum, |
| | | ( |
| | | select ifnull(SUM(t.receivable_amount),0) |
| | | from pay_fee_detail_month t |
| | | inner join building_room br on t.obj_id = br.room_id and br.status_cd = '0' |
| | | inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | where 1=1 |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | | and pf.fee_type_cd = #{feeTypeCd} |
| | | </if> |
| | |
| | | inner join building_room br on t.obj_id = br.room_id and br.status_cd = '0' |
| | | inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | where |
| | | 1=1 |
| | | where 1=1 |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | | and pf.fee_type_cd = #{feeTypeCd} |
| | | </if> |
| | |
| | | inner join building_room br on t.obj_id = br.room_id and br.status_cd = '0' |
| | | inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | where |
| | | 1=1 |
| | | where 1=1 |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | | and pf.fee_type_cd = #{feeTypeCd} |
| | | </if> |
| | |
| | | inner join building_room br on t.obj_id = br.room_id and br.status_cd = '0' |
| | | inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | where |
| | | 1=1 |
| | | where 1=1 |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | | and pf.fee_type_cd = #{feeTypeCd} |
| | | </if> |
| | |
| | | inner join building_room br on t.obj_id = br.room_id and br.status_cd = '0' |
| | | inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | where |
| | | 1=1 |
| | | where 1=1 |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | | and pf.fee_type_cd = #{feeTypeCd} |
| | | </if> |
| | |
| | | inner join building_room br on t.obj_id = br.room_id and br.status_cd = '0' |
| | | inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | where |
| | | 1=1 |
| | | where 1=1 |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | | and pf.fee_type_cd = #{feeTypeCd} |
| | | </if> |
| | |
| | | from f_floor f |
| | | where 1=1 |
| | | and f.community_id = #{communityId} |
| | | <if test="floorNum != null and floorNum != ''"> |
| | | and f.floor_num = #{floorNum} |
| | | </if> |
| | | and f.status_cd = '0' |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="queryHuaningPayFeeCounts" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from ( |
| | | select |
| | | f.floor_num floorNum, |
| | | ( |
| | | select ifnull(SUM(t.receivable_amount),0) |
| | | from pay_fee_detail_month t |
| | | inner join building_room br on t.obj_id = br.room_id and br.status_cd = '0' |
| | | inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | where 1=1 |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | | and pf.fee_type_cd = #{feeTypeCd} |
| | | </if> |
| | | and bu.floor_id = f.floor_id |
| | | and t.community_id = f.community_id |
| | | and t.cur_month_time = #{endTime} |
| | | ) receivableAmount, |
| | | ( |
| | | select ifnull(SUM(t.received_amount),0) |
| | | from pay_fee_detail_month t |
| | | inner join building_room br on t.obj_id = br.room_id and br.status_cd = '0' |
| | | inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | where 1=1 |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | | and pf.fee_type_cd = #{feeTypeCd} |
| | | </if> |
| | | and bu.floor_id = f.floor_id |
| | | and t.community_id = f.community_id |
| | | and t.pay_fee_time >= #{endTime} |
| | | and t.pay_fee_time < #{nextMonthTime} |
| | | and t.detail_id != '-1' |
| | | ) receivedAmount, |
| | | ( |
| | | select ifnull(SUM(t.received_amount),0) |
| | | from pay_fee_detail_month t |
| | | inner join building_room br on t.obj_id = br.room_id and br.status_cd = '0' |
| | | inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | where 1=1 |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | | and pf.fee_type_cd = #{feeTypeCd} |
| | | </if> |
| | | and bu.floor_id = f.floor_id |
| | | and t.community_id = f.community_id |
| | | and t.pay_fee_time >= #{endTime} |
| | | and t.pay_fee_time < #{nextMonthTime} |
| | | and t.cur_month_time < #{endTime} |
| | | and t.cur_month_time >= #{startTime} |
| | | and t.detail_id != '-1' |
| | | ) receivedAmount1, |
| | | ( |
| | | select ifnull(SUM(t.received_amount),0) |
| | | from pay_fee_detail_month t |
| | | inner join building_room br on t.obj_id = br.room_id and br.status_cd = '0' |
| | | inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | where 1=1 |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | | and pf.fee_type_cd = #{feeTypeCd} |
| | | </if> |
| | | and bu.floor_id = f.floor_id |
| | | and t.community_id = f.community_id |
| | | and t.pay_fee_time >= #{endTime} |
| | | and t.pay_fee_time < #{nextMonthTime} |
| | | and t.cur_month_time = #{endTime} |
| | | and t.detail_id != '-1' |
| | | ) receivedAmount2, |
| | | ( |
| | | select ifnull(SUM(t.received_amount),0) |
| | | from pay_fee_detail_month t |
| | | inner join building_room br on t.obj_id = br.room_id and br.status_cd = '0' |
| | | inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | where 1=1 |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | | and pf.fee_type_cd = #{feeTypeCd} |
| | | </if> |
| | | and bu.floor_id = f.floor_id |
| | | and t.community_id = f.community_id |
| | | and t.pay_fee_time >= #{endTime} |
| | | and t.pay_fee_time < #{nextMonthTime} |
| | | and t.cur_month_time >= #{nextMonthTime} |
| | | and t.detail_id != '-1' |
| | | ) receivedAmount3, |
| | | ( |
| | | select ifnull(SUM(t.received_amount),0) |
| | | from pay_fee_detail_month t |
| | | inner join building_room br on t.obj_id = br.room_id and br.status_cd = '0' |
| | | inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | where 1=1 |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | | and pf.fee_type_cd = #{feeTypeCd} |
| | | </if> |
| | | and bu.floor_id = f.floor_id |
| | | and t.community_id = f.community_id |
| | | and t.pay_fee_time >= #{endTime} |
| | | and t.pay_fee_time < #{nextMonthTime} |
| | | and t.cur_month_time < #{startTime} |
| | | and t.detail_id != '-1' |
| | | ) receivedAmount4 |
| | | from f_floor f |
| | | where 1=1 |
| | | and f.community_id = #{communityId} |
| | | <if test="floorNum != null and floorNum != ''"> |
| | | and f.floor_num = #{floorNum} |
| | | </if> |
| | | and f.status_cd = '0' |
| | | ) st |
| | | </select> |
| | | |
| | | <select id="queryHuaningPayFeeTwoCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from ( |
| | | select a.floorNum, d.receivableAmount, |
| | | a.receivedAmount, b.receivedAmount1, |
| | | c.receivedAmount2 |
| | | from |
| | | (select t.floor_num floorNum, sum (pfd.received_amount) receivedAmount |
| | | from f_floor t |
| | | inner JOIN building_unit bu on t.floor_id = bu.floor_id and bu.status_cd = '0' |
| | | inner JOIN building_room br on br.unit_id = bu.unit_id and br.status_cd = '0' |
| | | inner JOIN pay_fee pf on pf.payer_obj_id = br.room_id and pf.status_cd = '0' |
| | | inner join pay_fee_detail pfd on pf.fee_id = pfd.fee_id and pfd.status_cd = '0' |
| | | where 1=1 |
| | | and t.status_cd = '0' |
| | | and DATE_FORMAT(pfd.create_time, '%Y-%m') = #{yearMonth} |
| | | and t.community_id= #{communityId} |
| | | GROUP BY floor_num |
| | | ) a, |
| | | (select t.floor_num floorNum, SUM (pfdm1.discount_amount) receivedAmount1 |
| | | from f_floor t |
| | | inner JOIN building_unit bu on t.floor_id = bu.floor_id and bu.status_cd = '0' |
| | | inner JOIN building_room br on br.unit_id = bu.unit_id and br.status_cd = '0' |
| | | inner JOIN pay_fee pf on pf.payer_obj_id = br.room_id and pf.status_cd = '0' |
| | | inner join pay_fee_detail pfd on pf.fee_id = pfd.fee_id and pfd.status_cd = '0' |
| | | LEFT JOIN pay_fee_detail_month pfdm1 on pf.fee_id = pfdm1.fee_id and pfd.detail_id = pfdm1.detail_id and |
| | | pfdm1.status_cd = '0' and pfdm1.detail_year = #{year} and pfdm1.detail_month < #{month} |
| | | where 1=1 |
| | | and t.status_cd = '0' |
| | | and DATE_FORMAT(pfd.create_time, '%Y-%m') = #{yearMonth} |
| | | and t.community_id= #{communityId} |
| | | GROUP BY floor_num |
| | | ) b, |
| | | (select t.floor_num floorNum, SUM (pfdm2.received_amount) receivedAmount2 |
| | | from f_floor t |
| | | inner JOIN building_unit bu on t.floor_id = bu.floor_id and bu.status_cd = '0' |
| | | inner JOIN building_room br on br.unit_id = bu.unit_id and br.status_cd = '0' |
| | | inner JOIN pay_fee pf on pf.payer_obj_id = br.room_id and pf.status_cd = '0' |
| | | inner join pay_fee_detail pfd on pf.fee_id = pfd.fee_id and pfd.status_cd = '0' |
| | | LEFT JOIN pay_fee_detail_month pfdm2 on pf.fee_id = pfdm2.fee_id and pfd.detail_id = pfdm2.detail_id and |
| | | pfdm2.status_cd = '0' and pfdm2.detail_year = #{year} and pfdm2.detail_month > #{month} |
| | | where 1=1 |
| | | and t.status_cd = '0' |
| | | and DATE_FORMAT(pfd.create_time, '%Y-%m') = #{yearMonth} |
| | | and t.community_id= #{communityId} |
| | | GROUP BY floor_num |
| | | ) c, |
| | | (select t.floor_num floorNum, SUM (rfms.owe_amount) receivableAmount |
| | | from f_floor t |
| | | inner JOIN building_unit bu on t.floor_id = bu.floor_id and bu.status_cd = '0' |
| | | inner JOIN building_room br on br.unit_id = bu.unit_id and br.status_cd = '0' |
| | | inner JOIN report_fee_month_statistics rfms on rfms.obj_id = br.room_id and rfms.status_cd = '0' |
| | | where t.community_id= #{communityId} |
| | | group by t.floor_num |
| | | ) d |
| | | where a.floorNum = b.floorNum |
| | | and b.floorNum = c.floorNum |
| | | and c.floorNum = d.floorNum |
| | | ) tt |
| | | select a.floorNum, d.receivableAmount, |
| | | a.receivedAmount, b.receivedAmount1, |
| | | c.receivedAmount2 |
| | | from |
| | | (select t.floor_num floorNum, sum (pfd.received_amount) receivedAmount |
| | | from f_floor t |
| | | inner JOIN building_unit bu on t.floor_id = bu.floor_id and bu.status_cd = '0' |
| | | inner JOIN building_room br on br.unit_id = bu.unit_id and br.status_cd = '0' |
| | | inner JOIN pay_fee pf on pf.payer_obj_id = br.room_id and pf.status_cd = '0' |
| | | inner join pay_fee_detail pfd on pf.fee_id = pfd.fee_id and pfd.status_cd = '0' |
| | | where 1=1 |
| | | and t.status_cd = '0' |
| | | and DATE_FORMAT(pfd.create_time, '%Y-%m') = #{yearMonth} |
| | | and t.community_id= #{communityId} |
| | | GROUP BY floor_num |
| | | ) a, |
| | | (select t.floor_num floorNum, SUM (pfdm1.discount_amount) receivedAmount1 |
| | | from f_floor t |
| | | inner JOIN building_unit bu on t.floor_id = bu.floor_id and bu.status_cd = '0' |
| | | inner JOIN building_room br on br.unit_id = bu.unit_id and br.status_cd = '0' |
| | | inner JOIN pay_fee pf on pf.payer_obj_id = br.room_id and pf.status_cd = '0' |
| | | inner join pay_fee_detail pfd on pf.fee_id = pfd.fee_id and pfd.status_cd = '0' |
| | | LEFT JOIN pay_fee_detail_month pfdm1 on pf.fee_id = pfdm1.fee_id and pfd.detail_id = pfdm1.detail_id and |
| | | pfdm1.status_cd = '0' and pfdm1.detail_year = #{year} and pfdm1.detail_month < #{month} |
| | | where 1=1 |
| | | and t.status_cd = '0' |
| | | and DATE_FORMAT(pfd.create_time, '%Y-%m') = #{yearMonth} |
| | | and t.community_id= #{communityId} |
| | | GROUP BY floor_num |
| | | ) b, |
| | | (select t.floor_num floorNum, SUM (pfdm2.received_amount) receivedAmount2 |
| | | from f_floor t |
| | | inner JOIN building_unit bu on t.floor_id = bu.floor_id and bu.status_cd = '0' |
| | | inner JOIN building_room br on br.unit_id = bu.unit_id and br.status_cd = '0' |
| | | inner JOIN pay_fee pf on pf.payer_obj_id = br.room_id and pf.status_cd = '0' |
| | | inner join pay_fee_detail pfd on pf.fee_id = pfd.fee_id and pfd.status_cd = '0' |
| | | LEFT JOIN pay_fee_detail_month pfdm2 on pf.fee_id = pfdm2.fee_id and pfd.detail_id = pfdm2.detail_id and |
| | | pfdm2.status_cd = '0' and pfdm2.detail_year = #{year} and pfdm2.detail_month > #{month} |
| | | where 1=1 |
| | | and t.status_cd = '0' |
| | | and DATE_FORMAT(pfd.create_time, '%Y-%m') = #{yearMonth} |
| | | and t.community_id= #{communityId} |
| | | GROUP BY floor_num |
| | | ) c, |
| | | (select t.floor_num floorNum, SUM (rfms.owe_amount) receivableAmount |
| | | from f_floor t |
| | | inner JOIN building_unit bu on t.floor_id = bu.floor_id and bu.status_cd = '0' |
| | | inner JOIN building_room br on br.unit_id = bu.unit_id and br.status_cd = '0' |
| | | inner JOIN report_fee_month_statistics rfms on rfms.obj_id = br.room_id and rfms.status_cd = '0' |
| | | where t.community_id= #{communityId} |
| | | group by t.floor_num |
| | | ) d |
| | | where a.floorNum = b.floorNum |
| | | and b.floorNum = c.floorNum |
| | | and c.floorNum = d.floorNum |
| | | ) tt |
| | | </select> |
| | | |
| | | <!-- 查询费用月统计信息 add by wuxw 2018-07-03 --> |
| | |
| | | limit #{page}, #{row} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="queryHuaningOweFeeDetailCount" parameterType="Map" resultType="Map"> |
| | | select |
| | | count(1) count |
| | |
| | | <if test="floorId != null and floorId != ''"> |
| | | and f.floor_id = #{floorId} |
| | | </if> |
| | | |
| | | <if test="floorNum != null and floorNum != ''"> |
| | | and f.floor_num = #{floorNum} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 查询费用月统计信息 add by wuxw 2018-07-03 --> |
| | | <select id="queryHuaningOweFeeDetail" parameterType="Map" resultType="Map"> |
| | | select |
| | | f.floor_num floorNum, |
| | | concat(f.floor_num,'-',bu.unit_num,'-',br.room_num) roomName, |
| | | br.built_up_area builtUpArea, |
| | | rof.fee_name feeName, |
| | |
| | | ( |
| | | select ifnull(SUM(t.receivable_amount),0) |
| | | from pay_fee_detail_month t |
| | | where |
| | | 1=1 |
| | | where 1=1 |
| | | and t.fee_id = rof.fee_id |
| | | and t.community_id = f.community_id |
| | | and t.detail_id = '-1' |
| | |
| | | ( |
| | | select ifnull(SUM(t.receivable_amount),0) |
| | | from pay_fee_detail_month t |
| | | where |
| | | 1=1 |
| | | where 1=1 |
| | | and t.fee_id = rof.fee_id |
| | | and t.community_id = f.community_id |
| | | and t.detail_id = '-1' |
| | |
| | | ( |
| | | select ifnull(SUM(t.receivable_amount),0) |
| | | from pay_fee_detail_month t |
| | | where |
| | | 1=1 |
| | | where 1=1 |
| | | and t.fee_id = rof.fee_id |
| | | and t.community_id = f.community_id |
| | | and t.detail_id = '-1' |
| | |
| | | <if test="floorId != null and floorId != ''"> |
| | | and f.floor_id = #{floorId} |
| | | </if> |
| | | <if test="floorNum != null and floorNum != ''"> |
| | | and f.floor_num = #{floorNum} |
| | | </if> |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 查询费用月统计信息 add by wuxw 2018-07-03 --> |
| | | <select id="getReceivedAmountByMonth" parameterType="Map" resultType="Map"> |
| | | select ifnull(sum(t.received_amount),0) total |
| | |
| | | <select id="queryInvalidFeeMonthStatistics" parameterType="Map" resultType="Map"> |
| | | select t.fee_id feeId |
| | | from pay_fee t |
| | | inner join pay_fee_config pfc on t.config_id = pfc.config_id |
| | | inner join report_fee_month_statistics rfms on t.fee_id = rfms.fee_id and rfms.status_cd = '0' |
| | | inner join pay_fee_config pfc on t.config_id = pfc.config_id |
| | | inner join report_fee_month_statistics rfms on t.fee_id = rfms.fee_id and rfms.status_cd = '0' |
| | | where (t.status_cd = '1' or pfc.status_cd = '1') |
| | | and t.community_id = #{communityId} |
| | | and t.community_id = #{communityId} |
| | | </select> |
| | | |
| | | <!--清理报表 无效数据--> |
| | |
| | | |
| | | <!-- 保存欠费统计信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveReportOweFeeInfo" parameterType="Map"> |
| | | insert into report_owe_fee( |
| | | config_name,deadline_time,owner_tel,update_time,owe_id,owner_id,fee_id,amount_owed,payer_obj_name,owner_name,config_id,fee_name,end_time,community_id,payer_obj_type,payer_obj_id |
| | | ) values ( |
| | | #{configName},#{deadlineTime},#{ownerTel},#{updateTime},#{oweId},#{ownerId},#{feeId},#{amountOwed},#{payerObjName},#{ownerName},#{configId},#{feeName},#{endTime},#{communityId},#{payerObjType},#{payerObjId} |
| | | ) |
| | | insert into report_owe_fee(config_name, deadline_time, owner_tel, update_time, owe_id, owner_id, fee_id, |
| | | amount_owed, payer_obj_name, owner_name, config_id, fee_name, end_time, community_id, |
| | | payer_obj_type, payer_obj_id) |
| | | values (#{configName}, #{deadlineTime}, #{ownerTel}, #{updateTime}, #{oweId}, #{ownerId}, #{feeId}, |
| | | #{amountOwed}, #{payerObjName}, #{ownerName}, #{configId}, #{feeName}, #{endTime}, #{communityId}, |
| | | #{payerObjType}, #{payerObjId}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询欠费统计信息 add by wuxw 2018-07-03 --> |
| | | <select id="getReportOweFeeInfo" parameterType="Map" resultType="Map"> |
| | |
| | | and t.payer_obj_name= #{payerObjName} |
| | | </if> |
| | | <if test="ownerName !=null and ownerName != ''"> |
| | | and t.owner_name= #{ownerName} |
| | | and t.owner_name like '%${ownerName}%' |
| | | </if> |
| | | <if test="configId !=null and configId != ''"> |
| | | and t.config_id= #{configId} |
| | |
| | | limit #{page}, #{row} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改欠费统计信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateReportOweFeeInfo" parameterType="Map"> |
| | |
| | | </if> |
| | | </update> |
| | | |
| | | |
| | | <!-- 修改欠费统计信息 add by wuxw 2018-07-03 --> |
| | | <delete id="deleteReportOweFeeInfo" parameterType="Map"> |
| | | delete from report_owe_fee |
| | |
| | | and community_id= #{communityId} |
| | | </if> |
| | | </delete> |
| | | |
| | | |
| | | <!-- 查询欠费统计数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryReportOweFeesCount" parameterType="Map" resultType="Map"> |
| | |
| | | and t.payer_obj_name= #{payerObjName} |
| | | </if> |
| | | <if test="ownerName !=null and ownerName != ''"> |
| | | and t.owner_name= #{ownerName} |
| | | and t.owner_name like '%${ownerName}%' |
| | | </if> |
| | | <if test="configId !=null and configId != ''"> |
| | | and t.config_id= #{configId} |
| | |
| | | <if test="updateTime !=null and updateTime != ''"> |
| | | and t.update_time= #{updateTime} |
| | | </if> |
| | | |
| | | <if test="oweId !=null and oweId != ''"> |
| | | and t.owe_id= #{oweId} |
| | | </if> |
| | |
| | | and t.payer_obj_name= #{payerObjName} |
| | | </if> |
| | | <if test="ownerName !=null and ownerName != ''"> |
| | | and t.owner_name= #{ownerName} |
| | | and t.owner_name like '%${ownerName}%' |
| | | </if> |
| | | <if test="configId !=null and configId != ''"> |
| | | and t.config_id= #{configId} |
| | |
| | | and t.payer_obj_id= #{payerObjId} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="computeReportOweFeeItemAmount" parameterType="Map" resultType="Map"> |
| | | select t.config_name configName,sum(t.amount_owed) totalOweAmount |
| | | from report_owe_fee t |
| | |
| | | and t.payer_obj_name= #{payerObjName} |
| | | </if> |
| | | <if test="ownerName !=null and ownerName != ''"> |
| | | and t.owner_name= #{ownerName} |
| | | and t.owner_name like '%${ownerName}%' |
| | | </if> |
| | | <if test="configId !=null and configId != ''"> |
| | | and t.config_id= #{configId} |
| | |
| | | GROUP BY t.config_id,t.config_name |
| | | </select> |
| | | |
| | | |
| | | <!-- 查询无效费用 add by wuxw 2018-07-03 --> |
| | | <select id="queryInvalidOweFee" parameterType="Map" resultType="Map"> |
| | | select t.fee_id feeId from pay_fee t |
| | | inner join pay_fee_config pfc on t.config_id = pfc.config_id |
| | | inner join report_owe_fee rof on t.fee_id = rof.fee_id |
| | | select t.fee_id feeId |
| | | from pay_fee t |
| | | inner join pay_fee_config pfc on t.config_id = pfc.config_id |
| | | inner join report_owe_fee rof on t.fee_id = rof.fee_id |
| | | where (t.status_cd = '1' or pfc.status_cd = '1') |
| | | and t.community_id= #{communityId} |
| | | and t.community_id = #{communityId} |
| | | </select> |
| | | |
| | | |
| | | <update id="deleteInvalidFee" parameterType="Map"> |
| | | delete from report_owe_fee where fee_id in |
| | |
| | | and community_id = #{communityId} |
| | | </update> |
| | | |
| | | |
| | | <select id="queryOweFeesByOwnerIds" parameterType="Map" resultType="Map"> |
| | | select t.owner_id ownerId,SUM(t.amount_owed) oweFee |
| | | select t.owner_id ownerId,SUM(t.amount_owed) oweFee |
| | | from report_owe_fee t |
| | | where t.community_id = #{communityId} |
| | | and t.owner_id in |
| | |
| | | </foreach> |
| | | group by t.owner_id |
| | | </select> |
| | | |
| | | <select id="queryOweFeesByRoomIds" parameterType="Map" resultType="Map"> |
| | | select t.payer_obj_id roomId,SUM(t.amount_owed) oweFee |
| | | select t.payer_obj_id roomId,SUM(t.amount_owed) oweFee |
| | | from report_owe_fee t |
| | | where t.community_id = #{communityId} |
| | | where t.community_id = #{communityId} |
| | | and t.payer_obj_type = '3333' |
| | | and t.payer_obj_id in |
| | | <foreach collection="roomIds" item="item" open="(" close=")" separator=","> |
| | |
| | | </foreach> |
| | | group by t.payer_obj_id |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="allocationStorehouseServiceDaoImpl"> |
| | | |
| | | <!-- 保存仓库调拨信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessAllocationStorehouseInfo" parameterType="Map"> |
| | | insert into business_allocation_storehouse( |
| | | as_id,store_id,res_id,sh_id_z,res_name,start_user_id,operate,sh_id_a,start_user_name,b_id,stock,original_stock,remark,apply_id |
| | | ) values ( |
| | | #{asId},#{storeId},#{resId},#{shIdz},#{resName},#{startUserId},#{operate},#{shIda},#{startUserName},#{bId},#{stock},#{originalStock},#{remark},#{applyId} |
| | | ) |
| | | insert into business_allocation_storehouse(as_id, store_id, res_id, sh_id_z, res_name, start_user_id, operate, |
| | | sh_id_a, start_user_name, b_id, stock, original_stock, remark, |
| | | apply_id) |
| | | values (#{asId}, #{storeId}, #{resId}, #{shIdz}, #{resName}, #{startUserId}, #{operate}, #{shIda}, |
| | | #{startUserName}, #{bId}, #{stock}, #{originalStock}, #{remark}, #{applyId}) |
| | | </insert> |
| | | |
| | | <!-- 保存仓库调拨信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveAllocationStorehouseInfo" parameterType="Map"> |
| | | insert into allocation_storehouse( |
| | | as_id,b_id,sh_id_a,sh_id_z,res_id,res_name,store_id,stock,start_user_id,start_user_name,create_time,remark,apply_id,original_stock |
| | | ) values ( |
| | | #{asId},#{bId},#{shIda},#{shIdz},#{resId},#{resName},#{storeId},#{stock},#{startUserId},#{startUserName},#{createTime},#{remark},#{applyId},#{originalStock} |
| | | ) |
| | | insert into allocation_storehouse(as_id, b_id, sh_id_a, sh_id_z, res_id, res_name, store_id, stock, |
| | | start_user_id, start_user_name, create_time, remark, apply_id, original_stock) |
| | | values (#{asId}, #{bId}, #{shIda}, #{shIdz}, #{resId}, #{resName}, #{storeId}, #{stock}, #{startUserId}, |
| | | #{startUserName}, #{createTime}, #{remark}, #{applyId}, #{originalStock}) |
| | | </insert> |
| | | |
| | | <!-- 查询仓库调拨信息(Business) add by wuxw 2018-07-03 --> |
| | | <select id="getBusinessAllocationStorehouseInfo" parameterType="Map" resultType="Map"> |
| | | select t.as_id,t.as_id asId,t.store_id,t.store_id storeId,t.res_id,t.res_id resId,t.sh_id_z,t.sh_id_z |
| | | shIdz,t.res_name,t.res_name resName,t.start_user_id,t.start_user_id startUserId,t.operate,t.sh_id_a,t.sh_id_a |
| | | shIda,t.start_user_name,t.start_user_name startUserName,t.b_id,t.b_id bId,t.stock,t.original_stock,t.original_stock originalStock,t.remark,t.apply_id,t.apply_id applyId |
| | | shIda,t.start_user_name,t.start_user_name startUserName,t.b_id,t.b_id |
| | | bId,t.stock,t.original_stock,t.original_stock originalStock,t.remark,t.apply_id,t.apply_id applyId |
| | | from business_allocation_storehouse t |
| | | where 1 =1 |
| | | <if test="asId !=null and asId != ''"> |
| | |
| | | select t.as_id,t.as_id asId,t.status_cd,t.status_cd statusCd,t.store_id,t.store_id storeId,t.res_id,t.res_id |
| | | resId,t.sh_id_z,t.sh_id_z shIdz,t.res_name,t.res_name resName,t.start_user_id,t.start_user_id |
| | | startUserId,t.sh_id_a,t.sh_id_a shIda,t.start_user_name,t.start_user_name startUserName,asa.state,t.b_id,t.b_id |
| | | bId,t.stock,t.original_stock,t.original_stock originalStock,t.remark,t.create_time createTime,td.name stateName,a.sh_name shaName,z.sh_name shzName, |
| | | rs.res_code,rs.res_code resCode,t.apply_id,t.apply_id applyId,rst.name rstName,rst1.name parentRstName,rss.spec_name specName,asa.apply_type, |
| | | asa.apply_type applyType,td1.name applyTypeName,td2.name unitCodeName,td3.name miniUnitCodeName,rs.is_fixed isFixed,td4.name isFixedName, |
| | | bId,t.stock,t.original_stock,t.original_stock originalStock,t.remark,t.create_time createTime,td.name |
| | | stateName,a.sh_name shaName,z.sh_name shzName, |
| | | rs.res_code,rs.res_code resCode,t.apply_id,t.apply_id applyId,rst.name rstName,rst1.name |
| | | parentRstName,rss.spec_name specName,asa.apply_type, |
| | | asa.apply_type applyType,td1.name applyTypeName,td2.name unitCodeName,td3.name miniUnitCodeName,rs.is_fixed |
| | | isFixed,td4.name isFixedName, |
| | | t.times_id,t.times_id timesId |
| | | from allocation_storehouse t |
| | | left join allocation_storehouse_apply asa on asa.apply_id = t.apply_id and asa.status_cd = '0' |
| | | left join t_dict td on asa.state = td.status_cd and td.table_name = 'allocation_storehouse_apply' and td.table_columns = 'state' |
| | | left join t_dict td1 on asa.apply_type = td1.status_cd and td.table_name = 'allocation_storehouse_apply' and td1.table_columns = 'apply_type' |
| | | left join t_dict td on asa.state = td.status_cd and td.table_name = 'allocation_storehouse_apply' and |
| | | td.table_columns = 'state' |
| | | left join t_dict td1 on asa.apply_type = td1.status_cd and td.table_name = 'allocation_storehouse_apply' and |
| | | td1.table_columns = 'apply_type' |
| | | left join storehouse a on t.sh_id_a = a.sh_id and a.store_id = t.store_id and a.status_cd = '0' |
| | | left join storehouse z on t.sh_id_z = z.sh_id and z.store_id = t.store_id and z.status_cd = '0' |
| | | left join resource_store rs on t.res_id = rs.res_id and rs.status_cd = '0' |
| | | left join t_dict td2 on rs.unit_code = td2.status_cd and td2.table_name = 'resource_store' and td2.table_columns = 'unit_code' |
| | | left join t_dict td3 on rs.mini_unit_code = td3.status_cd and td3.table_name = 'resource_store' and td3.table_columns = 'unit_code' |
| | | left join t_dict td4 on rs.is_fixed = td4.status_cd and td4.table_name = 'resource_store' and td4.table_columns = 'is_fixed' |
| | | left join t_dict td2 on rs.unit_code = td2.status_cd and td2.table_name = 'resource_store' and td2.table_columns |
| | | = 'unit_code' |
| | | left join t_dict td3 on rs.mini_unit_code = td3.status_cd and td3.table_name = 'resource_store' and |
| | | td3.table_columns = 'unit_code' |
| | | left join t_dict td4 on rs.is_fixed = td4.status_cd and td4.table_name = 'resource_store' and td4.table_columns |
| | | = 'is_fixed' |
| | | left join resource_store_type rst on rs.rst_id = rst.rst_id and rst.status_cd = '0' |
| | | left join resource_store_type rst1 on rs.parent_rst_id = rst1.rst_id and rst1.status_cd = '0' |
| | | left join resource_store_specification rss on rs.rss_id = rss.rss_id and rss.status_cd = '0' |
| | |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="applyId !=null and applyId != ''"> |
| | | and t.apply_id= #{applyId} |
| | | and t.apply_id like '%${applyId}%' |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | |
| | | and asa.community_id= #{communityId} |
| | | </if> |
| | | <if test="resId !=null and resId != ''"> |
| | | and t.res_id= #{resId} |
| | | and t.res_id like '%${resId}%' |
| | | </if> |
| | | <if test="shIdz !=null and shIdz != ''"> |
| | | and t.sh_id_z= #{shIdz} |
| | |
| | | select count(1) count |
| | | from allocation_storehouse t |
| | | left join allocation_storehouse_apply asa on asa.apply_id = t.apply_id and asa.status_cd = '0' |
| | | left join t_dict td on asa.state = td.status_cd and td.table_name = 'allocation_storehouse_apply' and td.table_columns ='state' |
| | | left join t_dict td1 on asa.apply_type = td1.status_cd and td.table_name = 'allocation_storehouse_apply' and td.table_columns = 'apply_type' |
| | | left join t_dict td on asa.state = td.status_cd and td.table_name = 'allocation_storehouse_apply' and |
| | | td.table_columns ='state' |
| | | left join t_dict td1 on asa.apply_type = td1.status_cd and td.table_name = 'allocation_storehouse_apply' and |
| | | td.table_columns = 'apply_type' |
| | | left join storehouse a on t.sh_id_a = a.sh_id and a.store_id = t.store_id and a.status_cd = '0' |
| | | left join storehouse z on t.sh_id_z = z.sh_id and z.store_id = t.store_id and z.status_cd = '0' |
| | | left join resource_store rs on t.res_id = rs.res_id and rs.status_cd = '0' |
| | |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="applyId !=null and applyId != ''"> |
| | | and t.apply_id= #{applyId} |
| | | and t.apply_id like '%${applyId}%' |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and asa.community_id= #{communityId} |
| | | </if> |
| | | |
| | | <if test="resId !=null and resId != ''"> |
| | | and t.res_id= #{resId} |
| | | and t.res_id like '%${resId}%' |
| | | </if> |
| | | <if test="shIdz !=null and shIdz != ''"> |
| | | and t.sh_id_z= #{shIdz} |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="allocationUserStorehouseServiceDaoImpl"> |
| | | |
| | | <!-- 保存物品供应商信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessAllocationUserStorehouseInfo" parameterType="Map"> |
| | | insert into business_allocation_user_storehouse( |
| | | accept_user_id,accept_user_name,remark,store_id,res_id,res_name,start_user_id,operate,start_user_name,aus_id,b_id,stock,give_quantity |
| | | ) values ( |
| | | #{acceptUserId},#{acceptUserName},#{remark},#{storeId},#{resId},#{resName},#{startUserId},#{operate},#{startUserName},#{ausId},#{bId}, |
| | | #{stock},#{giveQuantity} |
| | | ) |
| | | insert into business_allocation_user_storehouse(accept_user_id, accept_user_name, remark, store_id, res_id, |
| | | res_name, start_user_id, operate, start_user_name, aus_id, b_id, |
| | | stock, give_quantity) |
| | | values (#{acceptUserId}, #{acceptUserName}, #{remark}, #{storeId}, #{resId}, #{resName}, #{startUserId}, |
| | | #{operate}, #{startUserName}, #{ausId}, #{bId}, |
| | | #{stock}, #{giveQuantity}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询物品供应商信息(Business) add by wuxw 2018-07-03 --> |
| | | <select id="getBusinessAllocationUserStorehouseInfo" parameterType="Map" resultType="Map"> |
| | |
| | | and t.give_quantity= #{giveQuantity} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!-- 保存物品供应商信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveAllocationUserStorehouseInfoInstance" parameterType="Map"> |
| | |
| | | resId,t.res_name,t.res_name resName,t.start_user_id,t.start_user_id startUserId,t.start_user_name, |
| | | t.start_user_name startUserName,t.aus_id,t.aus_id ausId,t.b_id,t.b_id |
| | | bId,t.stock,t.give_quantity,t.give_quantity giveQuantity,t.create_time createTime,rst.name rstName,rss.spec_name |
| | | specName,td1.name unitCodeName,td2.name miniUnitCodeName,rst1.name parentRstName,rs.is_fixed isFixed,rs.res_code resCode,td3.name isFixedName |
| | | specName,td1.name unitCodeName,td2.name miniUnitCodeName,rst1.name parentRstName,rs.is_fixed isFixed,rs.res_code |
| | | resCode,td3.name isFixedName |
| | | from allocation_user_storehouse t |
| | | left join resource_store rs on t.res_id = rs.res_id and rs.status_cd = '0' |
| | | left join resource_store_type rst on rs.rst_id = rst.rst_id and rst.status_cd = '0' |
| | | left join resource_store_type rst1 on rs.parent_rst_id = rst1.rst_id and rst1.status_cd = '0' |
| | | left join resource_store_specification rss on rs.rss_id=rss.rss_id and rss.status_cd = '0' |
| | | left join t_dict td1 on rs.unit_code = td1.status_cd and td1.table_name = 'resource_store' and td1.table_columns = 'unit_code' |
| | | left join t_dict td2 on rs.mini_unit_code = td2.status_cd and td2.table_name = 'resource_store' and td2.table_columns = 'unit_code' |
| | | left join t_dict td3 on rs.is_fixed = td3.status_cd and td3.table_name = 'resource_store' and td3.table_columns = 'is_fixed' |
| | | left join t_dict td1 on rs.unit_code = td1.status_cd and td1.table_name = 'resource_store' and td1.table_columns |
| | | = 'unit_code' |
| | | left join t_dict td2 on rs.mini_unit_code = td2.status_cd and td2.table_name = 'resource_store' and |
| | | td2.table_columns = 'unit_code' |
| | | left join t_dict td3 on rs.is_fixed = td3.status_cd and td3.table_name = 'resource_store' and td3.table_columns |
| | | = 'is_fixed' |
| | | where 1 = 1 |
| | | <if test="acceptUserId !=null and acceptUserId != ''"> |
| | | and t.accept_user_id= #{acceptUserId} |
| | | and t.accept_user_id like '%${acceptUserId}%' |
| | | </if> |
| | | <if test="acceptUserName !=null and acceptUserName != ''"> |
| | | and t.accept_user_name like '%${acceptUserName}%' |
| | |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="resId !=null and resId != ''"> |
| | | and t.res_id= #{resId} |
| | | and t.res_id like '%${resId}%' |
| | | </if> |
| | | <if test="resName !=null and resName != ''"> |
| | | and t.res_name like '%${resName}%' |
| | | </if> |
| | | <if test="startUserId !=null and startUserId != ''"> |
| | | and t.start_user_id= #{startUserId} |
| | | and t.start_user_id like '%${startUserId}%' |
| | | </if> |
| | | <if test="startUserName !=null and startUserName != ''"> |
| | | and t.start_user_name like '%${startUserName}%' |
| | | </if> |
| | | <if test="ausId !=null and ausId != ''"> |
| | | and t.aus_id= #{ausId} |
| | | and t.aus_id like '%${ausId}%' |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询物品供应商数量 add by wuxw 2018-07-03 --> |
| | |
| | | left join resource_store rs on t.res_id = rs.res_id and rs.status_cd = '0' |
| | | left join resource_store_type rst on rs.rst_id = rst.rst_id and rst.status_cd = '0' |
| | | left join resource_store_specification rss on rs.rss_id=rss.rss_id and rss.status_cd = '0' |
| | | left join t_dict td1 on rs.unit_code = td1.status_cd and td1.table_name = 'resource_store' and td1.table_columns = 'unit_code' |
| | | left join t_dict td2 on rs.mini_unit_code = td2.status_cd and td2.table_name = 'resource_store' and td2.table_columns = 'unit_code' |
| | | left join t_dict td1 on rs.unit_code = td1.status_cd and td1.table_name = 'resource_store' and td1.table_columns |
| | | = 'unit_code' |
| | | left join t_dict td2 on rs.mini_unit_code = td2.status_cd and td2.table_name = 'resource_store' and |
| | | td2.table_columns = 'unit_code' |
| | | where 1 =1 |
| | | <if test="acceptUserId !=null and acceptUserId != ''"> |
| | | and t.accept_user_id= #{acceptUserId} |
| | | and t.accept_user_id like '%${acceptUserId}%' |
| | | </if> |
| | | <if test="acceptUserName !=null and acceptUserName != ''"> |
| | | and t.accept_user_name like '%${acceptUserName}%' |
| | |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="resId !=null and resId != ''"> |
| | | and t.res_id= #{resId} |
| | | and t.res_id like '%${resId}%' |
| | | </if> |
| | | <if test="resName !=null and resName != ''"> |
| | | and t.res_name like '%${resName}%' |
| | | </if> |
| | | <if test="startUserId !=null and startUserId != ''"> |
| | | and t.start_user_id= #{startUserId} |
| | | and t.start_user_id like '%${startUserId}%' |
| | | </if> |
| | | <if test="startUserName !=null and startUserName != ''"> |
| | | and t.start_user_name like '%${startUserName}%' |
| | | </if> |
| | | <if test="ausId !=null and ausId != ''"> |
| | | and t.aus_id= #{ausId} |
| | | and t.aus_id like '%${ausId}%' |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="contractChangePlanServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存合同变更计划信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveContractChangePlanInfo" parameterType="Map"> |
| | | insert into contract_change_plan( |
| | | plan_type,contract_id,plan_id,remark,change_person,state,store_id |
| | | ) values ( |
| | | #{planType},#{contractId},#{planId},#{remark},#{changePerson},#{state},#{storeId} |
| | | ) |
| | | insert into contract_change_plan(plan_type, contract_id, plan_id, remark, change_person, state, store_id) |
| | | values (#{planType}, #{contractId}, #{planId}, #{remark}, #{changePerson}, #{state}, #{storeId}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询合同变更计划信息 add by wuxw 2018-07-03 --> |
| | | <select id="getContractChangePlanInfo" parameterType="Map" resultType="Map"> |
| | |
| | | partyB,c.contract_id,c.contract_id contractId,c.obj_id,c.obj_id objId,c.contract_name,c.contract_name |
| | | contractName,c.start_time,c.start_time startTime,c.end_time,c.end_time |
| | | endTime,c.contract_code,c.contract_code contractCode,c.obj_type,c.obj_type |
| | | objType,c.operator_link,c.operator_link operatorLink,ct.type_name contractTypeName,td.`name` stateName,td1.name planTypeName, |
| | | objType,c.operator_link,c.operator_link operatorLink,ct.type_name contractTypeName,td.`name` stateName,td1.name |
| | | planTypeName,u.name changePersonName, |
| | | t.create_time createTime |
| | | from contract_change_plan t |
| | | inner join contract_change_plan_detail c on t.contract_id = c.contract_id and t.plan_id = c.plan_id and c.store_id = t.store_id and c.operate = 'ADD' |
| | | inner JOIN contract_type ct on c.contract_type = ct.contract_type_id and ct.status_cd = '0' and ct.store_id = c.store_id |
| | | left JOIN t_dict td on td.status_cd = t.state and td.table_name = 'contract_change_plan' and td.table_columns = 'state' |
| | | left JOIN t_dict td1 on td1.status_cd = t.plan_type and td1.table_name = 'contract_change_plan' and td1.table_columns = 'plan_type' |
| | | left join contract_change_plan_detail c on t.contract_id = c.contract_id and t.plan_id = c.plan_id and |
| | | c.store_id = t.store_id and c.operate = 'ADD' |
| | | left JOIN contract_type ct on c.contract_type = ct.contract_type_id and ct.status_cd = '0' and ct.store_id = |
| | | c.store_id |
| | | left join u_user u on t.change_person = u.user_id and u.status_cd = '0' |
| | | left JOIN t_dict td on td.status_cd = t.state and td.table_name = 'contract_change_plan' and td.table_columns = |
| | | 'state' |
| | | left JOIN t_dict td1 on td1.status_cd = t.plan_type and td1.table_name = 'contract_change_plan' and |
| | | td1.table_columns = 'plan_type' |
| | | where 1 =1 |
| | | <if test="planType !=null and planType != ''"> |
| | | and t.plan_type= #{planType} |
| | |
| | | and t.contract_id= #{contractId} |
| | | </if> |
| | | <if test="contractName !=null and contractName != ''"> |
| | | and c.contract_name= #{contractName} |
| | | and c.contract_name like '%${contractName}%' |
| | | </if> |
| | | <if test="contractCode !=null and contractCode != ''"> |
| | | and c.contract_code= #{contractCode} |
| | |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="startTime != null and startTime != ''"> |
| | | <!--<if test="startTime != null and startTime != ''"> |
| | | and t.create_time > #{startTime} |
| | | and t.create_time < #{endTime} |
| | | </if>--> |
| | | <if test="logStartTime != null and logStartTime != ''"> |
| | | and t.create_time >= #{logStartTime} |
| | | </if> |
| | | <if test="logEndTime != null and logEndTime != ''"> |
| | | and t.create_time <= #{logEndTime} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改合同变更计划信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateContractChangePlanInfo" parameterType="Map"> |
| | |
| | | <if test="planId !=null and planId != ''"> |
| | | and t.plan_id= #{planId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询合同变更计划数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryContractChangePlansCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from contract_change_plan t |
| | | inner join contract c on t.contract_id = c.contract_id and c.status_cd = '0' and c.store_id = t.store_id |
| | | inner JOIN contract_type ct on c.contract_type = ct.contract_type_id and ct.status_cd = '0' and ct.store_id = c.store_id |
| | | left JOIN t_dict td on td.status_cd = t.state and td.table_name = 'contract_change_plan' and td.table_columns = 'state' |
| | | left join contract_change_plan_detail c on t.contract_id = c.contract_id and t.plan_id = c.plan_id and |
| | | c.store_id = t.store_id and c.operate = 'ADD' |
| | | left JOIN contract_type ct on c.contract_type = ct.contract_type_id and ct.status_cd = '0' and ct.store_id = |
| | | c.store_id |
| | | left join u_user u on t.change_person = u.user_id and u.status_cd = '0' |
| | | left JOIN t_dict td on td.status_cd = t.state and td.table_name = 'contract_change_plan' and td.table_columns = |
| | | 'state' |
| | | left JOIN t_dict td1 on td1.status_cd = t.plan_type and td1.table_name = 'contract_change_plan' and |
| | | td1.table_columns = 'plan_type' |
| | | where 1 =1 |
| | | <if test="planType !=null and planType != ''"> |
| | | and t.plan_type= #{planType} |
| | |
| | | and t.contract_id= #{contractId} |
| | | </if> |
| | | <if test="contractName !=null and contractName != ''"> |
| | | and c.contract_name= #{contractName} |
| | | and c.contract_name like '%${contractName}%' |
| | | </if> |
| | | <if test="contractCode !=null and contractCode != ''"> |
| | | and c.contract_code= #{contractCode} |
| | |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | |
| | | |
| | | <if test="logStartTime != null and logStartTime != ''"> |
| | | and t.create_time >= #{logStartTime} |
| | | </if> |
| | | <if test="logEndTime != null and logEndTime != ''"> |
| | | and t.create_time <= #{logEndTime} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="contractPartyaServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存合同房屋信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveContractPartyaInfo" parameterType="Map"> |
| | | insert into contract_partya( |
| | | party_a,a_link,a_contacts,partya_id,store_id |
| | | ) values ( |
| | | #{partyA},#{aLink},#{aContacts},#{partyaId},#{storeId} |
| | | ) |
| | | insert into contract_partya(party_a, a_link, a_contacts, partya_id, store_id) |
| | | values (#{partyA}, #{aLink}, #{aContacts}, #{partyaId}, #{storeId}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询合同房屋信息 add by wuxw 2018-07-03 --> |
| | | <select id="getContractPartyaInfo" parameterType="Map" resultType="Map"> |
| | |
| | | from contract_partya t |
| | | where 1 =1 |
| | | <if test="partyA !=null and partyA != ''"> |
| | | and t.party_a= #{partyA} |
| | | and t.party_a like concat('%',#{partyA},'%') |
| | | </if> |
| | | <if test="aLink !=null and aLink != ''"> |
| | | and t.a_link= #{aLink} |
| | | </if> |
| | | <if test="aContacts !=null and aContacts != ''"> |
| | | and t.a_contacts= #{aContacts} |
| | | and t.a_contacts like concat('%',#{aContacts},'%') |
| | | </if> |
| | | <if test="partyaId !=null and partyaId != ''"> |
| | | and t.partya_id= #{partyaId} |
| | |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改合同房屋信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateContractPartyaInfo" parameterType="Map"> |
| | |
| | | <if test="partyaId !=null and partyaId != ''"> |
| | | and t.partya_id= #{partyaId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询合同房屋数量 add by wuxw 2018-07-03 --> |
| | |
| | | from contract_partya t |
| | | where 1 =1 |
| | | <if test="partyA !=null and partyA != ''"> |
| | | and t.party_a= #{partyA} |
| | | and t.party_a like concat('%',#{partyA},'%') |
| | | </if> |
| | | <if test="aLink !=null and aLink != ''"> |
| | | and t.a_link= #{aLink} |
| | | </if> |
| | | <if test="aContacts !=null and aContacts != ''"> |
| | | and t.a_contacts= #{aContacts} |
| | | and t.a_contacts like concat('%',#{aContacts},'%') |
| | | </if> |
| | | <if test="partyaId !=null and partyaId != ''"> |
| | | and t.partya_id= #{partyaId} |
| | |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="contractServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存合同管理信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveContractInfo" parameterType="Map"> |
| | | insert into contract( |
| | | a_link,a_contacts,amount,contract_type,store_id,operator,signing_time,b_contacts,party_a,b_link,party_b, |
| | | contract_id,obj_id,contract_name,start_time,end_time,state,contract_code,obj_type,operator_link,contract_parent_id, |
| | | obj_name, obj_person_name, obj_person_id,start_user_id |
| | | ) values ( |
| | | #{aLink},#{aContacts},#{amount},#{contractType},#{storeId},#{operator},#{signingTime},#{bContacts},#{partyA},#{bLink},#{partyB}, |
| | | #{contractId},#{objId},#{contractName},#{startTime},#{endTime},#{state},#{contractCode},#{objType},#{operatorLink},#{contractParentId}, |
| | | #{objName}, #{objPersonName}, #{objPersonId},#{startUserId} |
| | | ) |
| | | insert into contract(a_link, a_contacts, amount, contract_type, store_id, operator, signing_time, b_contacts, |
| | | party_a, b_link, party_b, |
| | | contract_id, obj_id, contract_name, start_time, end_time, state, contract_code, obj_type, |
| | | operator_link, contract_parent_id, |
| | | obj_name, obj_person_name, obj_person_id, start_user_id) |
| | | values (#{aLink}, #{aContacts}, #{amount}, #{contractType}, #{storeId}, #{operator}, #{signingTime}, |
| | | #{bContacts}, #{partyA}, #{bLink}, #{partyB}, |
| | | #{contractId}, #{objId}, #{contractName}, #{startTime}, #{endTime}, #{state}, #{contractCode}, |
| | | #{objType}, #{operatorLink}, #{contractParentId}, |
| | | #{objName}, #{objPersonName}, #{objPersonId}, #{startUserId}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询合同管理信息 add by wuxw 2018-07-03 --> |
| | | <select id="getContractInfo" parameterType="Map" resultType="Map"> |
| | |
| | | endTime,t.state,t.contract_code,t.contract_code contractCode,t.obj_type,t.obj_type |
| | | objType,t.operator_link,t.operator_link operatorLink,ct.type_name contractTypeName,ct.audit,td.`name` |
| | | stateName,t.state_desc stateDesc,t.contract_parent_id contractParentId,tt.contract_code parentContractCode, |
| | | tt.contract_name parentContractName,t.obj_name objName, t.obj_person_name objPersonName, t.obj_person_id objPersonId, |
| | | t.start_user_id startUserId,t.create_time createTime |
| | | tt.contract_name parentContractName,t.obj_name objName, t.obj_person_name objPersonName, t.obj_person_id |
| | | objPersonId,t.start_user_id startUserId,t.create_time createTime |
| | | from contract t |
| | | LEFT JOIN contract_type ct on t.contract_type = ct.contract_type_id and ct.status_cd = '0' and ct.store_id = |
| | | t.store_id |
| | | LEFT JOIN t_dict td on td.status_cd = t.state and td.table_name = 'contract' and td.table_columns = 'state' |
| | | left join contract tt on t.contract_parent_id = tt.contract_id and tt.status_cd = '0' and tt.store_id = t.store_id |
| | | left join contract tt on t.contract_parent_id = tt.contract_id and tt.status_cd = '0' and tt.store_id = |
| | | t.store_id |
| | | where 1 =1 |
| | | <if test="aLink !=null and aLink != ''"> |
| | | and t.a_link= #{aLink} |
| | |
| | | and t.party_b= #{partyB} |
| | | </if> |
| | | <if test="partyBLike !=null and partyBLike != ''"> |
| | | and t.party_b like concat('%',#{partyBLike},'%') |
| | | and t.party_b like concat('%',#{partyBLike},'%') |
| | | </if> |
| | | <if test="contractId !=null and contractId != ''"> |
| | | and t.contract_id= #{contractId} |
| | |
| | | and t.contract_name= #{contractName} |
| | | </if> |
| | | <if test="contractNameLike !=null and contractNameLike != ''"> |
| | | and t.contract_name like concat('%',#{contractNameLike},'%') |
| | | and t.contract_name like concat('%',#{contractNameLike},'%') |
| | | </if> |
| | | <if test="startTime !=null"> |
| | | and t.start_time= #{startTime} |
| | |
| | | and t.contract_code= #{contractCode} |
| | | </if> |
| | | <if test="contractCodeLike !=null and contractCodeLike != ''"> |
| | | and t.contract_code like concat('%',#{contractCodeLike},'%') |
| | | and t.contract_code like concat('%',#{contractCodeLike},'%') |
| | | </if> |
| | | <if test="objType !=null and objType != ''"> |
| | | and t.obj_type= #{objType} |
| | |
| | | and t.contract_parent_id= #{contractParentId} |
| | | </if> |
| | | <if test="parentContractCodeLike !=null and parentContractCodeLike != ''"> |
| | | and tt.contract_code like concat('%',#{parentContractCodeLike},'%') |
| | | and tt.contract_code like concat('%',#{parentContractCodeLike},'%') |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改合同管理信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateContractInfo" parameterType="Map"> |
| | |
| | | <if test="contractId !=null and contractId != ''"> |
| | | and t.contract_id= #{contractId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询合同管理数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryContractsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from contract t |
| | | left join contract tt on t.contract_parent_id = tt.contract_id and tt.status_cd = '0' and tt.store_id = t.store_id |
| | | left join contract tt on t.contract_parent_id = tt.contract_id and tt.status_cd = '0' and tt.store_id = |
| | | t.store_id |
| | | where 1 =1 |
| | | <if test="aLink !=null and aLink != ''"> |
| | | and t.a_link= #{aLink} |
| | |
| | | and t.party_b= #{partyB} |
| | | </if> |
| | | <if test="partyBLike !=null and partyBLike != ''"> |
| | | and t.party_b like concat('%',#{partyBLike},'%') |
| | | and t.party_b like concat('%',#{partyBLike},'%') |
| | | </if> |
| | | <if test="contractId !=null and contractId != ''"> |
| | | and t.contract_id= #{contractId} |
| | |
| | | and t.contract_name= #{contractName} |
| | | </if> |
| | | <if test="contractNameLike !=null and contractNameLike != ''"> |
| | | and t.contract_name like concat('%',#{contractNameLike},'%') |
| | | and t.contract_name like concat('%',#{contractNameLike},'%') |
| | | </if> |
| | | |
| | | |
| | | <if test="startTime !=null"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | |
| | | and t.contract_code= #{contractCode} |
| | | </if> |
| | | <if test="contractCodeLike !=null and contractCodeLike != ''"> |
| | | and t.contract_code like concat('%',#{contractCodeLike},'%') |
| | | and t.contract_code like concat('%',#{contractCodeLike},'%') |
| | | </if> |
| | | <if test="objType !=null and objType != ''"> |
| | | and t.obj_type= #{objType} |
| | |
| | | and t.contract_parent_id= #{contractParentId} |
| | | </if> |
| | | <if test="parentContractCodeLike !=null and parentContractCodeLike != ''"> |
| | | and tt.contract_code like concat('%',#{parentContractCodeLike},'%') |
| | | and tt.contract_code like concat('%',#{parentContractCodeLike},'%') |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <select id="queryContractsByOwnerIds" parameterType="Map" resultType="Map"> |
| | | select t.obj_id ownerId,count(t.contract_id) contractCount |
| | |
| | | </foreach> |
| | | group by t.obj_id |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="contractTypeServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存合同类型信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveContractTypeInfo" parameterType="Map"> |
| | | insert into contract_type( |
| | | audit,type_name,remark,store_id,contract_type_id |
| | | ) values ( |
| | | #{audit},#{typeName},#{remark},#{storeId},#{contractTypeId} |
| | | ) |
| | | insert into contract_type(audit, type_name, remark, store_id, contract_type_id) |
| | | values (#{audit}, #{typeName}, #{remark}, #{storeId}, #{contractTypeId}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询合同类型信息 add by wuxw 2018-07-03 --> |
| | | <select id="getContractTypeInfo" parameterType="Map" resultType="Map"> |
| | |
| | | and t.audit= #{audit} |
| | | </if> |
| | | <if test="typeName !=null and typeName != ''"> |
| | | and t.type_name= #{typeName} |
| | | and t.type_name like concat('%',#{typeName},'%') |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改合同类型信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateContractTypeInfo" parameterType="Map"> |
| | |
| | | <if test="contractTypeId !=null and contractTypeId != ''"> |
| | | and t.contract_type_id= #{contractTypeId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询合同类型数量 add by wuxw 2018-07-03 --> |
| | |
| | | and t.audit= #{audit} |
| | | </if> |
| | | <if test="typeName !=null and typeName != ''"> |
| | | and t.type_name= #{typeName} |
| | | and t.type_name like concat('%',#{typeName},'%') |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | |
| | | <if test="contractTypeId !=null and contractTypeId != ''"> |
| | | and t.contract_type_id= #{contractTypeId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="contractTypeSpecServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存合同类型规格信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveContractTypeSpecInfo" parameterType="Map"> |
| | | insert into contract_type_spec( |
| | | spec_type,spec_name,spec_holdplace,spec_value_type,spec_cd,store_id,spec_show,contract_type_id,required,list_show |
| | | ) values ( |
| | | #{specType},#{specName},#{specHoldplace},#{specValueType},#{specCd},#{storeId},#{specShow},#{contractTypeId},#{required},#{listShow} |
| | | ) |
| | | insert into contract_type_spec(spec_type, spec_name, spec_holdplace, spec_value_type, spec_cd, store_id, |
| | | spec_show, contract_type_id, required, list_show) |
| | | values (#{specType}, #{specName}, #{specHoldplace}, #{specValueType}, #{specCd}, #{storeId}, #{specShow}, |
| | | #{contractTypeId}, #{required}, #{listShow}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询合同类型规格信息 add by wuxw 2018-07-03 --> |
| | | <select id="getContractTypeSpecInfo" parameterType="Map" resultType="Map"> |
| | |
| | | and t.spec_type= #{specType} |
| | | </if> |
| | | <if test="specName !=null and specName != ''"> |
| | | and t.spec_name= #{specName} |
| | | and t.spec_name like concat('%',#{specName},'%') |
| | | </if> |
| | | <if test="specHoldplace !=null and specHoldplace != ''"> |
| | | and t.spec_holdplace= #{specHoldplace} |
| | |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改合同类型规格信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateContractTypeSpecInfo" parameterType="Map"> |
| | |
| | | <if test="specCd !=null and specCd != ''"> |
| | | and t.spec_cd= #{specCd} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询合同类型规格数量 add by wuxw 2018-07-03 --> |
| | |
| | | and t.spec_type= #{specType} |
| | | </if> |
| | | <if test="specName !=null and specName != ''"> |
| | | and t.spec_name= #{specName} |
| | | and t.spec_name like concat('%',#{specName},'%') |
| | | </if> |
| | | <if test="specHoldplace !=null and specHoldplace != ''"> |
| | | and t.spec_holdplace= #{specHoldplace} |
| | |
| | | <if test="listShow !=null and listShow != ''"> |
| | | and t.list_show= #{listShow} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | left join t_dict td6 on rs.is_fixed = td6.status_cd and td6.table_name = 'resource_store' and td6.table_columns = 'is_fixed' |
| | | where 1 = 1 |
| | | <if test="applyOrderId !=null and applyOrderId != ''"> |
| | | and t.apply_order_id= #{applyOrderId} |
| | | and t.apply_order_id like concat('%',#{applyOrderId},'%') |
| | | </if> |
| | | <if test="resName !=null and resName != ''"> |
| | | and rs.res_name like '%${resName}%' |
| | |
| | | LEFT JOIN resource_store_specification rss on rs.rss_id=rss.rss_id and rss.status_cd = '0' |
| | | where 1 = 1 |
| | | <if test="applyOrderId !=null and applyOrderId != ''"> |
| | | and t.apply_order_id= #{applyOrderId} |
| | | and t.apply_order_id like concat('%',#{applyOrderId},'%') |
| | | </if> |
| | | <if test="resName !=null and resName != ''"> |
| | | and rs.res_name like '%${resName}%' |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="purchaseApplyDetailV1ServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存采购申请明细信息 add by wuxw 2018-07-03 --> |
| | | <insert id="savePurchaseApplyDetailInfo" parameterType="Map"> |
| | | insert into purchase_apply_detail( |
| | | original_stock,quantity,operate,price,purchase_remark,purchase_quantity,rs_id,apply_order_id,remark,id,res_id, |
| | | times_id,consult_price |
| | | ) values ( |
| | | #{originalStock},#{quantity},'ADD',#{price},#{purchaseRemark},#{purchaseQuantity},#{rsId},#{applyOrderId},#{remark},#{id}, |
| | | #{resId},#{timesId},#{consultPrice} |
| | | ) |
| | | insert into purchase_apply_detail(original_stock, quantity, operate, price, purchase_remark, purchase_quantity, |
| | | rs_id, apply_order_id, remark, id, res_id, |
| | | times_id, consult_price, b_id) |
| | | values (#{originalStock}, #{quantity}, 'ADD', #{price}, #{purchaseRemark}, #{purchaseQuantity}, #{rsId}, |
| | | #{applyOrderId}, #{remark}, #{id}, |
| | | #{resId}, #{timesId}, #{consultPrice}, #{bId}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询采购申请明细信息 add by wuxw 2018-07-03 --> |
| | | <select id="getPurchaseApplyDetailInfo" parameterType="Map" resultType="Map"> |
| | |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改采购申请明细信息 add by wuxw 2018-07-03 --> |
| | | <update id="updatePurchaseApplyDetailInfo" parameterType="Map"> |
| | |
| | | <if test="rsId !=null and rsId != ''"> |
| | | , t.rs_id= #{rsId} |
| | | </if> |
| | | |
| | | <if test="remark !=null and remark != ''"> |
| | | , t.remark= #{remark} |
| | | </if> |
| | |
| | | <if test="applyOrderId !=null and applyOrderId != ''"> |
| | | and t.apply_order_id= #{applyOrderId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询采购申请明细数量 add by wuxw 2018-07-03 --> |
| | |
| | | <if test="resId !=null and resId != ''"> |
| | | and t.res_id= #{resId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="purchaseApplyServiceDaoImpl"> |
| | | <resultMap type="com.java110.dto.purchase.PurchaseApplyDto" id="applyMap"> |
| | | <id column="applyOrderId" property="applyOrderId"/> |
| | |
| | | <!-- 保存采购申请信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessPurchaseApplyInfo" parameterType="Map"> |
| | | insert into business_purchase_apply |
| | | (operate,res_order_type,description,apply_order_id,state,store_id,user_id,user_name,b_id,end_user_name,end_user_tel,community_id) |
| | | values |
| | | (#{operate},#{resOrderType},#{description},#{applyOrderId},#{state},#{storeId},#{userId},#{userName},#{bId},#{endUserName},#{endUserTel},#{communityId}) |
| | | (operate, res_order_type, description, apply_order_id, state, store_id, user_id, user_name, b_id, end_user_name, |
| | | end_user_tel, community_id) |
| | | values (#{operate}, #{resOrderType}, #{description}, #{applyOrderId}, #{state}, #{storeId}, #{userId}, |
| | | #{userName}, #{bId}, #{endUserName}, #{endUserTel}, #{communityId}) |
| | | </insert> |
| | | |
| | | <!-- 保存采购明细表备份表 --> |
| | |
| | | t.warehousing_way warehousingWay, |
| | | t.community_id communityId |
| | | from purchase_apply t |
| | | <if test="resName != null and resName != ''" > |
| | | left join purchase_apply_detail pad on t.apply_order_id = pad.apply_order_id and pad.status_cd = '0' |
| | | left join resource_store rs on pad.res_id = rs.res_id and rs.status_cd = '0' |
| | | </if> |
| | | <if test="resName != null and resName != ''"> |
| | | left join purchase_apply_detail pad on t.apply_order_id = pad.apply_order_id and pad.status_cd = '0' |
| | | left join resource_store rs on pad.res_id = rs.res_id and rs.status_cd = '0' |
| | | </if> |
| | | inner join t_dict d on t.state = d.status_cd and d.table_name = 'purchase_apply' and d.table_columns = 'state' |
| | | where 1 = 1 |
| | | <if test="resName != null and resName != ''" > |
| | | and rs.res_name like concat('%','','%') |
| | | <if test="resName != null and resName != ''"> |
| | | and rs.res_name like concat('%',#{resName},'%') |
| | | </if> |
| | | <if test="resOrderType !=null and resOrderType != ''"> |
| | | and t.res_order_type= #{resOrderType} |
| | |
| | | and t.description= #{description} |
| | | </if> |
| | | <if test="applyOrderId !=null and applyOrderId != ''"> |
| | | and t.apply_order_id= #{applyOrderId} |
| | | and t.apply_order_id like concat('%',#{applyOrderId},'%') |
| | | </if> |
| | | <if test="applyOrderIds !=null "> |
| | | and t.apply_order_id in |
| | |
| | | and t.create_time >= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null and endTime != ''"> |
| | | and t.create_time <= #{startTime} |
| | | and t.create_time <= #{endTime} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | |
| | | p.res_id resId,p.quantity,p.remark,p.purchase_quantity purchaseQuantity,p.purchase_remark purchaseRemark,p.price |
| | | purchasePrice,p.original_stock originalStock,p.consult_price consultPrice,p.times_id timesId, |
| | | r.res_name resName,r.res_code resCode, |
| | | r.price,r.price standardPrice,rstime.stock,rst.name rstName,rst1.name parentRstName,rss.spec_name specName,rs.supplier_name supplierName, |
| | | r.price,r.price standardPrice,rstime.stock,rst.name rstName,rst1.name parentRstName,rss.spec_name |
| | | specName,rs.supplier_name supplierName, |
| | | td1.name unitCodeName, |
| | | td2.name miniUnitCodeName |
| | | from |
| | | purchase_apply_detail p |
| | | inner join resource_store r on p.res_id = r.res_id and r.status_cd = '0' |
| | | left join t_dict td1 on r.unit_code = td1.status_cd and td1.table_name = 'resource_store' and td1.table_columns = 'unit_code' |
| | | left join t_dict td2 on r.mini_unit_code = td2.status_cd and td2.table_name = 'resource_store' and td2.table_columns = 'unit_code' |
| | | left join t_dict td1 on r.unit_code = td1.status_cd and td1.table_name = 'resource_store' and td1.table_columns |
| | | = 'unit_code' |
| | | left join t_dict td2 on r.mini_unit_code = td2.status_cd and td2.table_name = 'resource_store' and |
| | | td2.table_columns = 'unit_code' |
| | | LEFT JOIN resource_supplier rs on p.rs_id=rs.rs_id |
| | | LEFT JOIN resource_store_type rst on r.rst_id=rst.rst_id |
| | | LEFT JOIN resource_store_type rst1 on r.parent_rst_id=rst1.rst_id |
| | |
| | | <select id="queryPurchaseApplysCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from purchase_apply t |
| | | <if test="resName != null and resName != ''" > |
| | | <if test="resName != null and resName != ''"> |
| | | left join purchase_apply_detail pad on t.apply_order_id = pad.apply_order_id and pad.status_cd = '0' |
| | | left join resource_store rs on pad.res_id = rs.res_id and rs.status_cd = '0' |
| | | </if> |
| | | where 1 = 1 |
| | | <if test="resName != null and resName != ''" > |
| | | and rs.res_name like concat('%','','%') |
| | | <if test="resName != null and resName != ''"> |
| | | and rs.res_name like concat('%',#{resName},'%') |
| | | </if> |
| | | <if test="resOrderType !=null and resOrderType != ''"> |
| | | and t.res_order_type= #{resOrderType} |
| | |
| | | and t.description= #{description} |
| | | </if> |
| | | <if test="applyOrderId !=null and applyOrderId != ''"> |
| | | and t.apply_order_id= #{applyOrderId} |
| | | and t.apply_order_id like concat('%',#{applyOrderId},'%') |
| | | </if> |
| | | <if test="applyOrderIds !=null "> |
| | | and t.apply_order_id in |
| | |
| | | and t.create_time >= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null and endTime != ''"> |
| | | and t.create_time <= #{startTime} |
| | | and t.create_time <= #{endTime} |
| | | </if> |
| | | <if test='urgentFlag !=null and urgentFlag == "1"'> |
| | | and date_format(t.create_time,'%Y-%m') = date_format(now(),'%Y-%m') |
| | |
| | | <!-- 保存采购申请信息 add by wuxw 2018-07-03 --> |
| | | <insert id="savePurchaseApply" parameterType="Map"> |
| | | insert into purchase_apply |
| | | (status_cd,res_order_type,description,apply_order_id,state,store_id,user_id,user_name,b_id,end_user_name,end_user_tel, |
| | | create_time,create_user_id,create_user_name,warehousing_way,community_id) |
| | | values |
| | | ('0',#{resOrderType},#{description},#{applyOrderId},#{state},#{storeId},#{userId},#{userName},'-1',#{endUserName},#{endUserTel}, |
| | | #{createTime},#{createUserId},#{createUserName},#{warehousingWay},#{communityId}) |
| | | (status_cd, res_order_type, description, apply_order_id, state, store_id, user_id, user_name, b_id, |
| | | end_user_name, end_user_tel, |
| | | create_time, create_user_id, create_user_name, warehousing_way, community_id) |
| | | values ('0', #{resOrderType}, #{description}, #{applyOrderId}, #{state}, #{storeId}, #{userId}, #{userName}, |
| | | '-1', #{endUserName}, #{endUserTel}, |
| | | #{createTime}, #{createUserId}, #{createUserName}, #{warehousingWay}, #{communityId}) |
| | | </insert> |
| | | |
| | | <!--查询下级用户id--> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="resourceResourceStoreServiceDaoImpl"> |
| | | |
| | |
| | | insert into resource_store(res_id, b_id, store_id, res_name, res_code, unit_code, remark, out_low_price, |
| | | out_high_price, show_mobile, description, |
| | | price, stock, create_time, sh_id, warning_stock, average_price, rss_id, rst_id, |
| | | mini_unit_code, mini_unit_stock, mini_stock, parent_rst_id, is_fixed,community_id) |
| | | mini_unit_code, mini_unit_stock, mini_stock, parent_rst_id, is_fixed, community_id) |
| | | values (#{resId}, #{bId}, #{storeId}, #{resName}, #{resCode}, #{unitCode}, #{remark}, #{outLowPrice}, |
| | | #{outHighPrice}, |
| | | #{showMobile}, #{description}, #{price}, #{stock}, #{createTime}, #{shId}, #{warningStock}, |
| | | #{averagePrice}, #{rssId}, #{rstId}, #{miniUnitCode}, #{miniUnitStock}, #{miniStock}, #{parentRstId}, |
| | | #{isFixed},#{communityId}) |
| | | #{isFixed}, #{communityId}) |
| | | </insert> |
| | | |
| | | <!-- 查询资源信息(Business) add by wuxw 2018-07-03 --> |
| | |
| | | averagePrice,rss.spec_name rssName,t.mini_unit_code,t.mini_unit_code miniUnitCode,t.mini_stock,t.mini_stock |
| | | miniStock,t.mini_unit_stock,t.mini_unit_stock miniUnitStock,td.name unitCodeName,td1.name |
| | | miniUnitCodeName,t.parent_rst_id parentRstId,t.rst_id rstId,rst1.name parentRstName,rst.name |
| | | rstName, |
| | | rstName,rstm.times_id timesId, |
| | | t.is_fixed,t.is_fixed isFixed,td2.name isFixedName,t.community_id communityId |
| | | from resource_store t |
| | | left join resource_store_type rst on t.rst_id = rst.rst_id and rst.status_cd = '0' |
| | | left join resource_store_type rst1 on t.parent_rst_id = rst1.rst_id and rst1.status_cd = '0' |
| | | left join resource_store_specification rss on t.rss_id = rss.rss_id and rss.status_cd = '0' |
| | | left join storehouse sh on t.sh_id = sh.sh_id and t.store_id = sh.store_id and sh.status_cd = '0' |
| | | left join resource_store_times rstm on t.res_code = rstm.res_code and rstm.status_cd = '0' |
| | | left join t_dict td on t.unit_code = td.status_cd and td.table_name = 'resource_store' and td.table_columns = |
| | | 'unit_code' |
| | | left join t_dict td1 on t.mini_unit_code = td1.status_cd and td1.table_name = 'resource_store' and |
| | |
| | | <if test="shId !=null and shId != ''"> |
| | | and t.sh_id= #{shId} |
| | | </if> |
| | | |
| | | <if test="shObjId !=null and shObjId != ''"> |
| | | and sh.sh_obj_id= #{shObjId} |
| | | </if> |
| | |
| | | <if test="description !=null and description != ''"> |
| | | , t.description= #{description} |
| | | </if> |
| | | |
| | | , t.stock= #{stock} |
| | | <if test="warningStock !=null and warningStock != ''"> |
| | | , t.warning_stock= #{warningStock} |
| | |
| | | <select id="queryResourceStoresCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from resource_store t |
| | | left join resource_store_type rst on t.rst_id = rst.rst_id and rst.status_cd = '0' |
| | | left join resource_store_type rst1 on t.parent_rst_id = rst1.rst_id and rst1.status_cd = '0' |
| | | left join resource_store_specification rss on t.rss_id = rss.rss_id and rss.status_cd = '0' |
| | | left join storehouse sh on t.sh_id = sh.sh_id and t.store_id = sh.store_id and sh.status_cd = '0' |
| | | left join resource_store_times rstm on t.res_code = rstm.res_code and rstm.status_cd = '0' |
| | | left join t_dict td on t.unit_code = td.status_cd and td.table_name = 'resource_store' and td.table_columns = |
| | | 'unit_code' |
| | | left join t_dict td1 on t.mini_unit_code = td1.status_cd and td1.table_name = 'resource_store' and |
| | | td1.table_columns = 'unit_code' |
| | | left join t_dict td2 on t.is_fixed = td2.status_cd and td2.table_name='resource_store' and td2.table_columns = |
| | | 'is_fixed' |
| | | where 1 =1 |
| | | <if test="resName !=null and resName != ''"> |
| | | and t.res_name like concat('%',#{resName},'%') |
| | |
| | | and t.stock > 0 |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 查询资源信息 add by wuxw 2018-07-03 --> |
| | | <select id="queryResourceStoresTotalPrice" parameterType="Map" resultType="Map"> |
| | | select IFNULL(sum(total_price),0) as totalPrice from( |
| | |
| | | and t.unit_price= #{unitPrice} |
| | | </if> |
| | | <if test="createUserId !=null and createUserId != ''"> |
| | | and t.create_user_id= #{createUserId} |
| | | and t.create_user_id like '%${createUserId}%' |
| | | </if> |
| | | <if test="quantity !=null and quantity != ''"> |
| | | and t.quantity= #{quantity} |
| | | </if> |
| | | <if test="rsurId !=null and rsurId != ''"> |
| | | and t.rsur_id= #{rsurId} |
| | | and t.rsur_id like '%${rsurId}%' |
| | | </if> |
| | | <if test="repairId !=null and repairId != ''"> |
| | | and t.repair_id= #{repairId} |
| | |
| | | and t.unit_price= #{unitPrice} |
| | | </if> |
| | | <if test="createUserId !=null and createUserId != ''"> |
| | | and t.create_user_id= #{createUserId} |
| | | and t.create_user_id like '%${createUserId}%' |
| | | </if> |
| | | <if test="quantity !=null and quantity != ''"> |
| | | and t.quantity= #{quantity} |
| | | </if> |
| | | <if test="rsurId !=null and rsurId != ''"> |
| | | and t.rsur_id= #{rsurId} |
| | | and t.rsur_id like '%${rsurId}%' |
| | | </if> |
| | | <if test="repairId !=null and repairId != ''"> |
| | | and t.repair_id= #{repairId} |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="resourceSupplierServiceDaoImpl"> |
| | | |
| | |
| | | values (#{supplierName}, #{createUserId}, #{address}, #{contactName}, #{rsId}, #{createUserName}, #{remark}, |
| | | #{storeId}, #{accountBank}, #{operate}, #{tel}, #{bankAccountNumber}, #{bId}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询物品供应商信息(Business) add by wuxw 2018-07-03 --> |
| | | <select id="getBusinessResourceSupplierInfo" parameterType="Map" resultType="Map"> |
| | |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 保存物品供应商信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveResourceSupplierInfoInstance" parameterType="Map"> |
| | | insert into resource_supplier( |
| | |
| | | </if> |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询物品供应商信息 add by wuxw 2018-07-03 --> |
| | | <select id="getResourceSupplierInfo" parameterType="Map" resultType="Map"> |
| | | select t.supplier_name,t.supplier_name supplierName,t.create_user_id,t.create_user_id |
| | |
| | | and t.contact_name= #{contactName} |
| | | </if> |
| | | <if test="rsId !=null and rsId != ''"> |
| | | and t.rs_id= #{rsId} |
| | | and t.rs_id like '%${rsId}%' |
| | | </if> |
| | | <if test="createUserName !=null and createUserName != ''"> |
| | | and t.create_user_name= #{createUserName} |
| | |
| | | limit #{page}, #{row} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改物品供应商信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateResourceSupplierInfoInstance" parameterType="Map"> |
| | |
| | | and t.contact_name= #{contactName} |
| | | </if> |
| | | <if test="rsId !=null and rsId != ''"> |
| | | and t.rs_id= #{rsId} |
| | | and t.rs_id like '%${rsId}%' |
| | | </if> |
| | | <if test="createUserName !=null and createUserName != ''"> |
| | | and t.create_user_name= #{createUserName} |
| | |
| | | |
| | | <!-- 保存个人物品信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessUserStorehouseInfo" parameterType="Map"> |
| | | insert into business_user_storehouse( |
| | | res_name,operate,b_id,store_id,stock,res_id,res_code,user_id,us_id,mini_stock,times_id |
| | | ) values ( |
| | | #{resName},#{operate},#{bId},#{storeId},#{stock},#{resId},#{resCode},#{userId},#{usId},#{miniStock},#{timesId} |
| | | ) |
| | | insert into business_user_storehouse(res_name, operate, b_id, store_id, stock, res_id, res_code, user_id, us_id, |
| | | mini_stock, times_id) |
| | | values (#{resName}, #{operate}, #{bId}, #{storeId}, #{stock}, #{resId}, #{resCode}, #{userId}, #{usId}, |
| | | #{miniStock}, #{timesId}) |
| | | </insert> |
| | | |
| | | <insert id="saveUserStorehouses" parameterType="Map"> |
| | | insert into user_storehouse( |
| | | res_name,b_id,store_id,stock,res_id,res_code,user_id,us_id,mini_stock,times_id |
| | | ) values ( |
| | | #{resName},'-1',#{storeId},#{stock},#{resId},#{resCode},#{userId},#{usId},#{miniStock},#{timesId} |
| | | ) |
| | | insert into user_storehouse(res_name, b_id, store_id, stock, res_id, res_code, user_id, us_id, mini_stock, |
| | | times_id) |
| | | values (#{resName}, '-1', #{storeId}, #{stock}, #{resId}, #{resCode}, #{userId}, #{usId}, #{miniStock}, |
| | | #{timesId}) |
| | | </insert> |
| | | |
| | | <!-- 查询个人物品信息(Business) add by wuxw 2018-07-03 --> |
| | | <select id="getBusinessUserStorehouseInfo" parameterType="Map" resultType="Map"> |
| | | select t.res_name,t.res_name resName,t.operate,t.b_id,t.b_id bId,t.store_id,t.store_id |
| | | storeId,t.stock,t.res_id,t.res_id resId,t.res_code,t.res_code resCode,t.user_id,t.user_id userId,t.us_id,t.us_id usId, |
| | | storeId,t.stock,t.res_id,t.res_id resId,t.res_code,t.res_code resCode,t.user_id,t.user_id userId,t.us_id,t.us_id |
| | | usId, |
| | | t.mini_stock,t.mini_stock miniStock,t.times_id,t.times_id timesId |
| | | from business_user_storehouse t |
| | | where 1 =1 |
| | |
| | | <insert id="saveUserStorehouseInfoInstance" parameterType="Map"> |
| | | insert into user_storehouse( |
| | | res_name,status_cd,b_id,store_id,stock,res_id,res_code,user_id,us_id,mini_stock |
| | | ) select t.res_name,'0',t.b_id,t.store_id,t.stock,t.res_id,t.res_code,t.user_id,t.us_id,t.mini_stock from business_user_storehouse t |
| | | ) select t.res_name,'0',t.b_id,t.store_id,t.stock,t.res_id,t.res_code,t.user_id,t.us_id,t.mini_stock from |
| | | business_user_storehouse t |
| | | where 1=1 |
| | | <if test="resName !=null and resName != ''"> |
| | | and t.res_name= #{resName} |
| | |
| | | <select id="getUserStorehouseInfo" parameterType="Map" resultType="Map"> |
| | | select t.res_name,t.res_name resName,t.status_cd,t.status_cd statusCd,t.b_id,t.b_id bId,t.store_id,t.store_id |
| | | storeId,t.stock,t.res_id,t.res_id resId,t.user_id,t.user_id userId,t.us_id,t.us_id usId,rs.res_code resCode, |
| | | rs.out_low_price outLowPrice,rs.out_high_price outHighPrice,rst.name rstName,rst1.name parentRstName,rss.spec_name specName,t.mini_stock miniStock, |
| | | rs.unit_code unitCode,rs.mini_unit_code miniUnitCode,rs.mini_unit_stock miniUnitStock,t.times_id,t.times_id timesId, |
| | | rs.out_low_price outLowPrice,rs.out_high_price outHighPrice,rst.name rstName,rst1.name |
| | | parentRstName,rss.spec_name specName,t.mini_stock miniStock, |
| | | rs.unit_code unitCode,rs.mini_unit_code miniUnitCode,rs.mini_unit_stock miniUnitStock,t.times_id,t.times_id |
| | | timesId, |
| | | td.name unitCodeName,td1.name miniUnitCodeName,u.name userName,rs.is_fixed isFixed,td2.name isFixedName |
| | | from user_storehouse t |
| | | left join resource_store rs on t.res_code = rs.res_code and rs.status_cd = '0' and t.res_id = rs.res_id |
| | | left join resource_store_type rst on rs.rst_id = rst.rst_id |
| | | left join resource_store_type rst1 on rs.parent_rst_id = rst1.rst_id |
| | | left join resource_store_specification rss on rs.rss_id = rss.rss_id |
| | | left join t_dict td on rs.unit_code = td.status_cd and td.table_name = 'resource_store' and td.table_columns = 'unit_code' |
| | | left join t_dict td1 on rs.mini_unit_code = td1.status_cd and td1.table_name = 'resource_store' and td1.table_columns = 'unit_code' |
| | | left join t_dict td2 on rs.is_fixed = td2.status_cd and td2.table_name = 'resource_store' and td2.table_columns = 'is_fixed' |
| | | left join t_dict td on rs.unit_code = td.status_cd and td.table_name = 'resource_store' and td.table_columns = |
| | | 'unit_code' |
| | | left join t_dict td1 on rs.mini_unit_code = td1.status_cd and td1.table_name = 'resource_store' and |
| | | td1.table_columns = 'unit_code' |
| | | left join t_dict td2 on rs.is_fixed = td2.status_cd and td2.table_name = 'resource_store' and td2.table_columns |
| | | = 'is_fixed' |
| | | left join u_user u on t.user_id = u.user_id |
| | | where 1 = 1 |
| | | <if test='lagerStockZero !=null and lagerStockZero == "1"'> |
| | |
| | | and t.stock= #{stock} |
| | | </if> |
| | | <if test="resId !=null and resId != ''"> |
| | | and t.res_id= #{resId} |
| | | and t.res_id like '%${resId}%' |
| | | </if> |
| | | <if test="resCode !=null and resCode != ''"> |
| | | and rs.res_code= #{resCode} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | <!--<if test="userId !=null and userId != ''"> |
| | | and t.user_id like '%${userId}%' |
| | | </if>--> |
| | | <if test="rstId !=null and rstId != ''"> |
| | | and rs.rst_id= #{rstId} |
| | | </if> |
| | |
| | | and t.us_id= #{usId} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | and t.user_id like '%${userId}%' |
| | | </if> |
| | | <if test="userName !=null and userName != ''"> |
| | | and u.name= #{userName} |
| | | </if> |
| | | <!-- 这里先注释 因为 mysql 8.0 有问题 后面遇到问题 分析 为啥重复 优化 sql--> |
| | | <!-- GROUP BY t.us_id--> |
| | | <!-- 这里先注释 因为 mysql 8.0 有问题 后面遇到问题 分析 为啥重复 优化 sql--> |
| | | <!-- GROUP BY t.us_id--> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | |
| | | and t.stock= #{stock} |
| | | </if> |
| | | <if test="resId !=null and resId != ''"> |
| | | and t.res_id= #{resId} |
| | | and t.res_id like '%${resId}%' |
| | | </if> |
| | | <if test="resCode !=null and resCode != ''"> |
| | | and t.res_code= #{resCode} |
| | |
| | | and rs.res_code= #{resCode} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | and t.user_id like '%${userId}%' |
| | | </if> |
| | | <if test="rstId !=null and rstId != ''"> |
| | | and rs.rst_id= #{rstId} |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="ownerAppUserServiceDaoImpl"> |
| | | |
| | | <!-- 保存绑定业主信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessOwnerAppUserInfo" parameterType="Map"> |
| | | insert into business_owner_app_user( |
| | | id_card,open_id,link,remark,operate,app_user_name,community_name,state,app_user_id,community_id,app_type_cd,b_id,member_id,user_id,app_type,nickname,headimgurl |
| | | ) values ( |
| | | #{idCard},#{openId},#{link},#{remark},#{operate},#{appUserName},#{communityName},#{state},#{appUserId},#{communityId}, |
| | | #{appTypeCd},#{bId},#{memberId},#{userId},#{appType},#{nickName},#{headImgUrl} |
| | | ) |
| | | insert into business_owner_app_user(id_card, open_id, link, remark, operate, app_user_name, community_name, |
| | | state, app_user_id, community_id, app_type_cd, b_id, member_id, user_id, |
| | | app_type, nickname, headimgurl) |
| | | values (#{idCard}, #{openId}, #{link}, #{remark}, #{operate}, #{appUserName}, #{communityName}, #{state}, |
| | | #{appUserId}, #{communityId}, |
| | | #{appTypeCd}, #{bId}, #{memberId}, #{userId}, #{appType}, #{nickName}, #{headImgUrl}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询绑定业主信息(Business) add by wuxw 2018-07-03 --> |
| | | <select id="getBusinessOwnerAppUserInfo" parameterType="Map" resultType="Map"> |
| | |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 保存绑定业主信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveOwnerAppUserInfoInstance" parameterType="Map"> |
| | |
| | | <if test="headImgUrl !=null and headImgUrl != ''"> |
| | | and t.headimgurl= #{headImgUrl} |
| | | </if> |
| | | |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询绑定业主信息 add by wuxw 2018-07-03 --> |
| | | <select id="getOwnerAppUserInfo" parameterType="Map" resultType="Map"> |
| | |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="appUserName !=null and appUserName != ''"> |
| | | and t.app_user_name= #{appUserName} |
| | | and t.app_user_name like concat('%',#{appUserName},'%') |
| | | </if> |
| | | <if test="communityName !=null and communityName != ''"> |
| | | and t.community_name= #{communityName} |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | |
| | | <if test="appUserId !=null and appUserId != ''"> |
| | | and t.app_user_id= #{appUserId} |
| | | </if> |
| | |
| | | <if test="userIds !=null"> |
| | | and t.user_id in |
| | | <foreach collection="userIds" open="(" close=")" |
| | | separator="," item="item"> |
| | | #{item} |
| | | separator="," item="item">#{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改绑定业主信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateOwnerAppUserInfoInstance" parameterType="Map"> |
| | |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询绑定业主数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryOwnerAppUsersCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from owner_app_user t |
| | | left join t_dict td1 on t.state = td1.status_cd and td1.table_name = 'owner_app_user' and td1.table_columns = 'state' |
| | | left join t_dict td1 on t.state = td1.status_cd and td1.table_name = 'owner_app_user' and td1.table_columns = |
| | | 'state' |
| | | left join building_owner bo on t.member_id = bo.member_id and t.community_id = bo.community_id and bo.status_cd |
| | | = '0' |
| | | where 1 =1 |
| | | and t.status_cd = '0' |
| | | <if test="idCard !=null and idCard != ''"> |
| | |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="appUserName !=null and appUserName != ''"> |
| | | and t.app_user_name= #{appUserName} |
| | | and t.app_user_name like concat('%',#{appUserName},'%') |
| | | </if> |
| | | <if test="communityName !=null and communityName != ''"> |
| | | and t.community_name= #{communityName} |
| | |
| | | <if test="userIds !=null"> |
| | | and t.user_id in |
| | | <foreach collection="userIds" open="(" close=")" |
| | | separator="," item="item"> |
| | | #{item} |
| | | separator="," item="item">#{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | <!-- 保存车辆管理信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessOwnerCarInfo" parameterType="Map"> |
| | | insert into business_owner_car( |
| | | car_color,car_brand,car_type,operate,car_num,ps_id,remark,owner_id,b_id,user_id,car_id,community_id,start_time, |
| | | end_time,state,car_type_cd,member_id |
| | | ) values ( |
| | | #{carColor},#{carBrand},#{carType},#{operate},#{carNum},#{psId},#{remark},#{ownerId},#{bId},#{userId},#{carId},#{communityId}, |
| | | #{startTime},#{endTime},#{state},#{carTypeCd},#{memberId} |
| | | ) |
| | | insert into business_owner_car(car_color, car_brand, car_type, operate, car_num, ps_id, remark, owner_id, b_id, |
| | | user_id, car_id, community_id, start_time, |
| | | end_time, state, car_type_cd, member_id) |
| | | values (#{carColor}, #{carBrand}, #{carType}, #{operate}, #{carNum}, #{psId}, #{remark}, #{ownerId}, #{bId}, |
| | | #{userId}, #{carId}, #{communityId}, |
| | | #{startTime}, #{endTime}, #{state}, #{carTypeCd}, #{memberId}) |
| | | </insert> |
| | | |
| | | <!-- 查询车辆管理信息(Business) add by wuxw 2018-07-03 --> |
| | |
| | | start_time,end_time,state,car_type_cd,member_id |
| | | ) select |
| | | t.car_color,t.car_brand,t.car_type,t.car_num,t.ps_id,t.remark,'0',t.owner_id,t.b_id,t.user_id,t.car_id,t.community_id, |
| | | t.start_time,t.end_time,t.state, t.car_type_cd,t.member_id |
| | | t.start_time,t.end_time,t.state, t.car_type_cd,t.member_id |
| | | from business_owner_car t where 1=1 |
| | | <if test="carColor !=null and carColor != ''"> |
| | | and t.car_color= #{carColor} |
| | |
| | | t.owner_id ownerId,t.b_id,t.b_id bId,t.user_id,t.user_id userId,t.car_id,t.car_id carId ,t.create_time |
| | | createTime,t.community_id communityId,bow.name ownerName,bow.id_card idCard,bow.link,t2.name stateName, |
| | | t.start_time,t.start_time startTime,t.end_time,t.end_time endTime,t.state, |
| | | t.car_type_cd,t.car_type_cd carTypeCd,t.member_id,t.member_id memberId,ps.num,pa.num areaNum,t.lease_type leaseType, |
| | | t.car_type_cd,t.car_type_cd carTypeCd,t.member_id,t.member_id memberId,ps.num,pa.num areaNum,t.lease_type |
| | | leaseType, |
| | | t3.name leaseTypeName,t4.name carTypeCdName |
| | | <if test="carTypeCd != '1003'"> |
| | | ,count(moc.member_id) memberCarCount |
| | | ,count(moc.member_id) memberCarCount |
| | | </if> |
| | | from owner_car t |
| | | left join t_dict t1 on t.car_type=t1.status_cd and t1.table_name='owner_car' and t1.table_columns = 'car_type' |
| | | left join t_dict t2 on t.state=t2.status_cd and t2.table_name='owner_car' and t2.table_columns = 'state' |
| | | left join t_dict t4 on t.car_type_cd=t4.status_cd and t4.table_name='owner_car' and t4.table_columns = 'car_type_cd' |
| | | left join t_dict t4 on t.car_type_cd=t4.status_cd and t4.table_name='owner_car' and t4.table_columns = |
| | | 'car_type_cd' |
| | | left join building_owner bow on t.owner_id = bow.member_id and bow.status_cd = '0' and bow.community_id = |
| | | t.community_id |
| | | left join parking_space ps on t.ps_id = ps.ps_id and ps.status_cd = '0' |
| | | left join parking_area pa on ps.pa_id = pa.pa_id and pa.status_cd = '0' |
| | | left join t_dict t3 on t.lease_type = t3.status_cd and t3.table_name = 'owner_car' and t3.table_columns = 'lease_type' |
| | | left join t_dict t3 on t.lease_type = t3.status_cd and t3.table_name = 'owner_car' and t3.table_columns = |
| | | 'lease_type' |
| | | <if test="carTypeCd != '1003'"> |
| | | left join owner_car moc on t.car_id = moc.car_id and moc.car_type_cd != t.car_type_cd and moc.car_type_cd = '1002' and moc.status_cd = '0' |
| | | left join owner_car moc on t.car_id = moc.car_id and moc.car_type_cd != t.car_type_cd and moc.car_type_cd = |
| | | '1002' and moc.status_cd = '0' |
| | | </if> |
| | | where 1=1 |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | |
| | | and t.car_num= #{carNum} |
| | | </if> |
| | | <if test="carNumLike !=null and carNumLike != ''"> |
| | | and t.car_num like concat('%',#{carNumLike},'%') |
| | | and t.car_num like concat('%',#{carNumLike},'%') |
| | | </if> |
| | | <if test="memberCarNum !=null and memberCarNum != '' and carTypeCd != '1003'"> |
| | | and moc.car_num= #{memberCarNum} |
| | | </if> |
| | | <if test="memberCarNumLike !=null and memberCarNumLike != '' and carTypeCd != '1003' "> |
| | | and moc.car_num like concat('%',#{memberCarNumLike},'%') |
| | | and moc.car_num like concat('%',#{memberCarNumLike},'%') |
| | | </if> |
| | | <if test="carNums !=null"> |
| | | and t.car_num in |
| | |
| | | </if> |
| | | <if test="valid == 1"> |
| | | and t.end_time > now() |
| | | and t.state != '3003' |
| | | </if> |
| | | <if test="valid == 3"> |
| | | and t.end_time < now() |
| | | and (t.end_time < now() or t.state = '3003') |
| | | </if> |
| | | <if test="valid == 2"> |
| | | and t.ps_id= '-1' |
| | | </if> |
| | | <if test="carTypeCd != '1003'"> |
| | | GROUP BY t.car_color,t.car_brand,t.car_type,t1.name, |
| | | t.car_num,t.ps_id,t.remark,t.status_cd,t.owner_id, |
| | | t.b_id,t.user_id,t.car_id,t.create_time |
| | | ,t.community_id ,bow.name,bow.id_card ,bow.link,t2.name,t.start_time,t.end_time,t.state, |
| | | t.car_type_cd,t.member_id,ps.num,t.lease_type , |
| | | t3.name ,t4.name |
| | | GROUP BY t.car_color,t.car_brand,t.car_type,t1.name, |
| | | t.car_num,t.ps_id,t.remark,t.status_cd,t.owner_id, |
| | | t.b_id,t.user_id,t.car_id,t.create_time |
| | | ,t.community_id ,bow.name,bow.id_card ,bow.link,t2.name,t.start_time,t.end_time,t.state, |
| | | t.car_type_cd,t.member_id,ps.num,t.lease_type , |
| | | t3.name ,t4.name |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | |
| | | left join parking_space ps on t.ps_id = ps.ps_id and ps.status_cd = '0' |
| | | left join parking_area pa on ps.pa_id = pa.pa_id and pa.status_cd = '0' |
| | | <if test="memberCarNumLike !=null and memberCarNumLike != ''"> |
| | | left join owner_car moc on t.car_id = moc.car_id and moc.car_type_cd != t.car_type_cd and moc.car_type_cd = '1002' |
| | | left join owner_car moc on t.car_id = moc.car_id and moc.car_type_cd != t.car_type_cd and moc.car_type_cd = |
| | | '1002' |
| | | </if> |
| | | where 1=1 |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | |
| | | and t.car_num= #{carNum} |
| | | </if> |
| | | <if test="carNumLike !=null and carNumLike != ''"> |
| | | and t.car_num like concat('%',#{carNumLike},'%') |
| | | and t.car_num like concat('%',#{carNumLike},'%') |
| | | </if> |
| | | <if test="memberCarNum !=null and memberCarNum != ''"> |
| | | and moc.car_num= #{memberCarNum} |
| | | </if> |
| | | <if test="memberCarNumLike !=null and memberCarNumLike != ''"> |
| | | and moc.car_num like concat('%',#{memberCarNumLike},'%') |
| | | and moc.car_num like concat('%',#{memberCarNumLike},'%') |
| | | </if> |
| | | <if test="carNums !=null"> |
| | | and t.car_num in |
| | |
| | | </if> |
| | | <if test="valid == 1"> |
| | | and t.end_time > now() |
| | | and t.state != '3003' |
| | | </if> |
| | | <if test="valid == 3"> |
| | | and t.end_time < now() |
| | | and (t.end_time < now() or t.state = '3003') |
| | | </if> |
| | | <if test="valid == 2"> |
| | | and t.ps_id= '-1' |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | <select id="queryOwnerParkingSpaceCount" parameterType="Map" resultType="Map"> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="ownerCommitteeV1ServiceDaoImpl"> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 保存业主委员会信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveOwnerCommitteeInfo" parameterType="Map"> |
| | | insert into owner_committee( |
| | | address,appoint_time,id_card,post_desc,sex,link,remark,cur_time,post,name,position,state,oc_id,community_id |
| | | ) values ( |
| | | #{address},#{appointTime},#{idCard},#{postDesc},#{sex},#{link},#{remark},#{curTime},#{post},#{name},#{position},#{state},#{ocId},#{communityId} |
| | | ) |
| | | insert into owner_committee(address, appoint_time, id_card, post_desc, sex, link, remark, cur_time, post, name, |
| | | position, state, oc_id, community_id) |
| | | values (#{address}, #{appointTime}, #{idCard}, #{postDesc}, #{sex}, #{link}, #{remark}, #{curTime}, #{post}, |
| | | #{name}, #{position}, #{state}, #{ocId}, #{communityId}) |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <!-- 查询业主委员会信息 add by wuxw 2018-07-03 --> |
| | | <select id="getOwnerCommitteeInfo" parameterType="Map" resultType="Map"> |
| | | select t.address,t.appoint_time,t.appoint_time appointTime,t.id_card,t.id_card idCard,t.post_desc,t.post_desc postDesc,t.sex,t.link,t.remark,t.status_cd,t.status_cd statusCd,t.cur_time,t.cur_time curTime,t.post,t.name,t.position,t.state,t.oc_id,t.oc_id ocId,t.community_id,t.community_id communityId |
| | | from owner_committee t |
| | | where 1 =1 |
| | | <if test="address !=null and address != ''"> |
| | | and t.address= #{address} |
| | | </if> |
| | | <if test="appointTime !=null and appointTime != ''"> |
| | | and t.appoint_time= #{appointTime} |
| | | </if> |
| | | <if test="idCard !=null and idCard != ''"> |
| | | and t.id_card= #{idCard} |
| | | </if> |
| | | <if test="postDesc !=null and postDesc != ''"> |
| | | and t.post_desc= #{postDesc} |
| | | </if> |
| | | <if test="sex !=null and sex != ''"> |
| | | and t.sex= #{sex} |
| | | </if> |
| | | <if test="link !=null and link != ''"> |
| | | and t.link= #{link} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="curTime !=null and curTime != ''"> |
| | | and t.cur_time= #{curTime} |
| | | </if> |
| | | <if test="post !=null and post != ''"> |
| | | and t.post= #{post} |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | and t.name= #{name} |
| | | </if> |
| | | <if test="position !=null and position != ''"> |
| | | and t.position= #{position} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="ocId !=null and ocId != ''"> |
| | | and t.oc_id= #{ocId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | select t.address,t.appoint_time,t.appoint_time appointTime,t.id_card,t.id_card idCard,t.post_desc,t.post_desc |
| | | postDesc,t.sex,t.link,t.remark,t.status_cd,t.status_cd statusCd,t.cur_time,t.cur_time |
| | | curTime,t.post,t.name,t.position,t.state,t.oc_id,t.oc_id ocId,t.community_id,t.community_id communityId |
| | | from owner_committee t |
| | | where 1 =1 |
| | | <if test="address !=null and address != ''"> |
| | | and t.address= #{address} |
| | | </if> |
| | | <if test="appointTime !=null and appointTime != ''"> |
| | | and t.appoint_time= #{appointTime} |
| | | </if> |
| | | <if test="idCard !=null and idCard != ''"> |
| | | and t.id_card= #{idCard} |
| | | </if> |
| | | <if test="postDesc !=null and postDesc != ''"> |
| | | and t.post_desc= #{postDesc} |
| | | </if> |
| | | <if test="sex !=null and sex != ''"> |
| | | and t.sex= #{sex} |
| | | </if> |
| | | <if test="link !=null and link != ''"> |
| | | and t.link= #{link} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="curTime !=null and curTime != ''"> |
| | | and t.cur_time= #{curTime} |
| | | </if> |
| | | <if test="post !=null and post != ''"> |
| | | and t.post= #{post} |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | and t.name like concat('%',#{name},'%') |
| | | </if> |
| | | <if test="position !=null and position != ''"> |
| | | and t.position= #{position} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="ocId !=null and ocId != ''"> |
| | | and t.oc_id= #{ocId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 修改业主委员会信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateOwnerCommitteeInfo" parameterType="Map"> |
| | | update owner_committee t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="address !=null and address != ''"> |
| | | , t.address= #{address} |
| | | </if> |
| | | <if test="appointTime !=null and appointTime != ''"> |
| | | , t.appoint_time= #{appointTime} |
| | | </if> |
| | | <if test="idCard !=null and idCard != ''"> |
| | | , t.id_card= #{idCard} |
| | | </if> |
| | | <if test="postDesc !=null and postDesc != ''"> |
| | | , t.post_desc= #{postDesc} |
| | | </if> |
| | | <if test="sex !=null and sex != ''"> |
| | | , t.sex= #{sex} |
| | | </if> |
| | | <if test="link !=null and link != ''"> |
| | | , t.link= #{link} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | , t.remark= #{remark} |
| | | </if> |
| | | <if test="curTime !=null and curTime != ''"> |
| | | , t.cur_time= #{curTime} |
| | | </if> |
| | | <if test="post !=null and post != ''"> |
| | | , t.post= #{post} |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | , t.name= #{name} |
| | | </if> |
| | | <if test="position !=null and position != ''"> |
| | | , t.position= #{position} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | , t.state= #{state} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | where 1=1 <if test="ocId !=null and ocId != ''"> |
| | | and t.oc_id= #{ocId} |
| | | </if> |
| | | |
| | | update owner_committee t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="address !=null and address != ''"> |
| | | , t.address= #{address} |
| | | </if> |
| | | <if test="appointTime !=null and appointTime != ''"> |
| | | , t.appoint_time= #{appointTime} |
| | | </if> |
| | | <if test="idCard !=null and idCard != ''"> |
| | | , t.id_card= #{idCard} |
| | | </if> |
| | | <if test="postDesc !=null and postDesc != ''"> |
| | | , t.post_desc= #{postDesc} |
| | | </if> |
| | | <if test="sex !=null and sex != ''"> |
| | | , t.sex= #{sex} |
| | | </if> |
| | | <if test="link !=null and link != ''"> |
| | | , t.link= #{link} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | , t.remark= #{remark} |
| | | </if> |
| | | <if test="curTime !=null and curTime != ''"> |
| | | , t.cur_time= #{curTime} |
| | | </if> |
| | | <if test="post !=null and post != ''"> |
| | | , t.post= #{post} |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | , t.name= #{name} |
| | | </if> |
| | | <if test="position !=null and position != ''"> |
| | | , t.position= #{position} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | , t.state= #{state} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | where 1=1 |
| | | <if test="ocId !=null and ocId != ''"> |
| | | and t.oc_id= #{ocId} |
| | | </if> |
| | | </update> |
| | | |
| | | <!-- 查询业主委员会数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryOwnerCommitteesCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from owner_committee t |
| | | where 1 =1 |
| | | <if test="address !=null and address != ''"> |
| | | and t.address= #{address} |
| | | </if> |
| | | <if test="appointTime !=null and appointTime != ''"> |
| | | and t.appoint_time= #{appointTime} |
| | | </if> |
| | | <if test="idCard !=null and idCard != ''"> |
| | | and t.id_card= #{idCard} |
| | | </if> |
| | | <if test="postDesc !=null and postDesc != ''"> |
| | | and t.post_desc= #{postDesc} |
| | | </if> |
| | | <if test="sex !=null and sex != ''"> |
| | | and t.sex= #{sex} |
| | | </if> |
| | | <if test="link !=null and link != ''"> |
| | | and t.link= #{link} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="curTime !=null and curTime != ''"> |
| | | and t.cur_time= #{curTime} |
| | | </if> |
| | | <if test="post !=null and post != ''"> |
| | | and t.post= #{post} |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | and t.name= #{name} |
| | | </if> |
| | | <if test="position !=null and position != ''"> |
| | | and t.position= #{position} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="ocId !=null and ocId != ''"> |
| | | and t.oc_id= #{ocId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | <select id="queryOwnerCommitteesCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from owner_committee t |
| | | where 1 =1 |
| | | <if test="address !=null and address != ''"> |
| | | and t.address= #{address} |
| | | </if> |
| | | <if test="appointTime !=null and appointTime != ''"> |
| | | and t.appoint_time= #{appointTime} |
| | | </if> |
| | | <if test="idCard !=null and idCard != ''"> |
| | | and t.id_card= #{idCard} |
| | | </if> |
| | | <if test="postDesc !=null and postDesc != ''"> |
| | | and t.post_desc= #{postDesc} |
| | | </if> |
| | | <if test="sex !=null and sex != ''"> |
| | | and t.sex= #{sex} |
| | | </if> |
| | | <if test="link !=null and link != ''"> |
| | | and t.link= #{link} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="curTime !=null and curTime != ''"> |
| | | and t.cur_time= #{curTime} |
| | | </if> |
| | | <if test="post !=null and post != ''"> |
| | | and t.post= #{post} |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | and t.name like concat('%',#{name},'%') |
| | | </if> |
| | | <if test="position !=null and position != ''"> |
| | | and t.position= #{position} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="ocId !=null and ocId != ''"> |
| | | and t.oc_id= #{ocId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | startTime,t.state,t.end_time,t.end_time endTime,t.owner_id,t.owner_id ownerId,t.user_id,t.user_id |
| | | userId,t.room_id,t.room_id roomId,bo.name ownerName,bo.link |
| | | from building_owner_room_rel t |
| | | left join building_owner bo on t.owner_id = bo.member_id and bo.status_cd = '0' |
| | | where 1 =1 |
| | | inner join building_owner bo on t.owner_id = bo.member_id and bo.status_cd = '0' |
| | | inner join building_room br on t.room_id = br.room_id and br.status_cd = '0' |
| | | inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join f_floor fl on bu.floor_id = fl.floor_id and fl.status_cd = '0' |
| | | <if test="ownerNameLike !=null and ownerNameLike != ''"> |
| | | and bo.`name` like concat('%',#{ownerNameLike},'%') |
| | | </if> |
| | |
| | | <if test="ownerId !=null and ownerId != ''"> |
| | | and t.owner_id= #{ownerId} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | <!--<if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | </if>--> |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | |
| | | <select id="queryOwnerRoomRelsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from building_owner_room_rel t |
| | | inner join building_owner bo on t.owner_id = bo.member_id and bo.status_cd = '0' |
| | | inner join building_room br on t.room_id = br.room_id and br.status_cd = '0' |
| | | inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join f_floor fl on bu.floor_id = fl.floor_id and fl.status_cd = '0' |
| | | where 1 =1 |
| | | <if test="relId !=null and relId != ''"> |
| | | and t.rel_id= #{relId} |
| | |
| | | <if test="ownerId !=null and ownerId != ''"> |
| | | and t.owner_id= #{ownerId} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | <!--<if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | </if>--> |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | |
| | | and t.sex= #{sex} |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | and t.name = #{name} |
| | | and t.name like concat('%',#{name},'%') |
| | | </if> |
| | | |
| | | <if test="nameLike !=null and nameLike != ''"> |
| | | and t.name like concat('%',#{nameLike},'%') |
| | | </if> |
| | |
| | | and t.name like concat('%',#{name},'%') |
| | | </if> |
| | | <if test="nameLike !=null and nameLike != ''"> |
| | | and t.name like concat('%',#{name},'%') |
| | | and t.name like concat('%',#{nameLike},'%') |
| | | </if> |
| | | <if test="link !=null and link != ''"> |
| | | and t.link= #{link} |
| | |
| | | </if> |
| | | <if test="ownerTypeCd !=null and ownerTypeCd != ''"> |
| | | and t.owner_type_cd= #{ownerTypeCd} |
| | | </if> |
| | | <if test="ownerTypeCds != null"> |
| | | and t.owner_type_cd in |
| | | <foreach collection="ownerTypeCds" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | <select id="queryNoEnterRoomOwnerCount" parameterType="Map" resultType="Map"> |
| | | select COUNT(1) count |
| | | from building_owner o |
| | | left join building_owner_room_rel orr |
| | | left join building_owner_room_rel orr |
| | | on o.owner_id = orr.owner_id and orr.status_cd = '0' |
| | | where o.status_cd = '0' |
| | | and o.owner_type_cd = '1001' |
| | | and o.community_id = #{communityId} |
| | | and orr.rel_id is null |
| | | and o.owner_type_cd = '1001' |
| | | and o.community_id = #{communityId} |
| | | and orr.rel_id is null |
| | | </select> |
| | | |
| | | <!-- queryOwnersByRoom --> |
| | | <!-- 根据房屋查询业主信息 --> |
| | | <select id="queryOwnersByRoom" parameterType="Map" resultType="Map"> |
| | | SELECT t.sex,t.name,t.link,t.status_cd,t.status_cd statusCd,t.remark,t.owner_id,t.owner_id ownerId,t.b_id,t.b_id |
| | | bId,t.user_id,t.user_id userId,t.age,t.member_id,t.member_id memberId,t.owner_type_cd,t.owner_type_cd ownerTypeCd, |
| | | bId,t.user_id,t.user_id userId,t.age,t.member_id,t.member_id memberId,t.owner_type_cd,t.owner_type_cd |
| | | ownerTypeCd, |
| | | r.`room_id` roomId,r.`room_num` roomNum,t.community_id,t.community_id communityId,t.id_card, t.id_card |
| | | idCard,orr.start_time startTime ,orr.end_time endTime,t.address |
| | | FROM building_room r,building_owner_room_rel orr,building_owner t |
| | |
| | | <select id="queryOwnerLogsCountByRoom" parameterType="Map" resultType="Map"> |
| | | select COUNT(1) count |
| | | from building_owner_room_rel t |
| | | inner join building_owner bo |
| | | inner join building_owner bo |
| | | on t.owner_id = bo.owner_id and bo.status_cd = '0' and bo.community_id = #{communityId} |
| | | where bo.owner_type_cd = '1001' |
| | | and t.room_id = #{roomId} |
| | | and t.room_id = #{roomId} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="questionAnswerV1ServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存问卷投票信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveQuestionAnswerInfo" parameterType="Map"> |
| | | insert into question_answer( |
| | | qa_name,qa_type,start_time,remark,end_time,community_id,content,qa_id,state |
| | | ) values ( |
| | | #{qaName},#{qaType},#{startTime},#{remark},#{endTime},#{communityId},#{content},#{qaId},#{state} |
| | | ) |
| | | insert into question_answer(qa_name, qa_type, start_time, remark, end_time, community_id, content, qa_id, state, |
| | | obj_type, obj_id) |
| | | values (#{qaName}, #{qaType}, #{startTime}, #{remark}, #{endTime}, #{communityId}, #{content}, #{qaId}, |
| | | #{state}, #{objType}, #{objId}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询问卷投票信息 add by wuxw 2018-07-03 --> |
| | | <select id="getQuestionAnswerInfo" parameterType="Map" resultType="Map"> |
| | | select t.qa_name,t.qa_name qaName,t.qa_type,t.qa_type qaType,t.start_time,t.start_time |
| | | startTime,t.remark,t.status_cd,t.status_cd statusCd,t.end_time,t.end_time endTime,t.community_id,t.community_id |
| | | communityId,t.content,t.qa_id,t.qa_id qaId,t.create_time createTime,t.state,count(uqa1.user_qa_id) voteCount |
| | | communityId,t.content,t.qa_id,t.qa_id qaId,t.create_time createTime,t.state,t.obj_type,t.obj_type objType, |
| | | t.obj_id,t.obj_id objId, count(uqa1.user_qa_id) voteCount,td.name qaTypeName |
| | | from question_answer t |
| | | left join user_question_answer uqa1 on t.qa_id = uqa1.qa_id and uqa1.status_cd = '0' |
| | | left join t_dict td on t.qa_type = td.status_cd and td.table_name = 'question_answer' and td.table_columns = |
| | | 'qa_type' |
| | | where 1 =1 |
| | | <if test="qaName !=null and qaName != ''"> |
| | | and t.qa_name= #{qaName} |
| | |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | group by t.qa_name,t.qa_type,t.start_time,t.remark,t.status_cd,t.end_time,t.community_id,t.content,t.qa_id,t.create_time,t.state |
| | | <if test="objType !=null and objType != ''"> |
| | | and t.obj_type= #{objType} |
| | | </if> |
| | | <if test="objId !=null and objId != ''"> |
| | | and t.obj_id= #{objId} |
| | | </if> |
| | | group by |
| | | t.qa_name,t.qa_type,t.start_time,t.remark,t.status_cd,t.end_time,t.community_id,t.content,t.qa_id,t.create_time,t.state |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改问卷投票信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateQuestionAnswerInfo" parameterType="Map"> |
| | |
| | | <if test="content !=null and content != ''"> |
| | | , t.content= #{content} |
| | | </if> |
| | | <if test="objType !=null and objType != ''"> |
| | | , t.obj_type= #{objType} |
| | | </if> |
| | | <if test="objId !=null and objId != ''"> |
| | | , t.obj_id= #{objId} |
| | | </if> |
| | | where 1=1 |
| | | <if test="qaId !=null and qaId != ''"> |
| | | and t.qa_id= #{qaId} |
| | |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询问卷投票数量 add by wuxw 2018-07-03 --> |
| | |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | |
| | | |
| | | <if test="objType !=null and objType != ''"> |
| | | and t.obj_type= #{objType} |
| | | </if> |
| | | <if test="objId !=null and objId != ''"> |
| | | and t.obj_id= #{objId} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <select id="queryVotedCountAndScore" parameterType="Map" resultType="Map"> |
| | | select qa_id qaId, count(1) votedCount,SUM(t.score) score |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="questionTitleV1ServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存问卷题目信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveQuestionTitleInfo" parameterType="Map"> |
| | | insert into question_title( |
| | | title_type,title_id,community_id,qa_title |
| | | ) values ( |
| | | #{titleType},#{titleId},#{communityId},#{qaTitle} |
| | | ) |
| | | insert into question_title(title_type, title_id, community_id, qa_title) |
| | | values (#{titleType}, #{titleId}, #{communityId}, #{qaTitle}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询问卷题目信息 add by wuxw 2018-07-03 --> |
| | | <select id="getQuestionTitleInfo" parameterType="Map" resultType="Map"> |
| | |
| | | statusCd,t.community_id,t.community_id communityId,t.qa_title,t.qa_title qaTitle,t.create_time createTime |
| | | from question_title t |
| | | <if test="qaId !=null and qaId != ''"> |
| | | left join question_answer_title_rel qatr on t.title_id = qatr.title_id and qatr.status_cd = '0' |
| | | left join question_answer_title_rel qatr on t.title_id = qatr.title_id and qatr.status_cd = '0' |
| | | </if> |
| | | where 1 =1 |
| | | <if test="qaId !=null and qaId != ''"> |
| | | and qatr.qa_id = #{qaId} |
| | | and qatr.qa_id = #{qaId} |
| | | </if> |
| | | <if test="titleType !=null and titleType != ''"> |
| | | and t.title_type= #{titleType} |
| | |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="qaTitle !=null and qaTitle != ''"> |
| | | and t.qa_title= #{qaTitle} |
| | | and t.qa_title like concat('%',#{qaTitle},'%') |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改问卷题目信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateQuestionTitleInfo" parameterType="Map"> |
| | |
| | | <if test="titleId !=null and titleId != ''"> |
| | | and t.title_id= #{titleId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询问卷题目数量 add by wuxw 2018-07-03 --> |
| | |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="qaTitle !=null and qaTitle != ''"> |
| | | and t.qa_title= #{qaTitle} |
| | | and t.qa_title like concat('%',#{qaTitle},'%') |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | @RequestMapping(value = "/queryHuaningOweFee", method = RequestMethod.POST) |
| | | List<ReportFeeMonthStatisticsDto> queryHuaningOweFee(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto); |
| | | |
| | | @RequestMapping(value = "/queryHuaningOweFeeCounts", method = RequestMethod.POST) |
| | | int queryHuaningOweFeeCounts(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto); |
| | | |
| | | @RequestMapping(value = "/queryHuaningPayFeeCount", method = RequestMethod.POST) |
| | | int queryHuaningPayFeeCount(@RequestBody Map paramInfo); |
| | | |
| | | @RequestMapping(value = "/queryHuaningPayFee", method = RequestMethod.POST) |
| | | List<Map> queryHuaningPayFee(@RequestBody Map paramInfo); |
| | | |
| | | @RequestMapping(value = "/queryHuaningPayFeeCounts", method = RequestMethod.POST) |
| | | int queryHuaningPayFeeCounts(@RequestBody Map paramInfo); |
| | | |
| | | @RequestMapping(value = "/queryHuaningPayFeeTwoCount", method = RequestMethod.POST) |
| | | int queryHuaningPayFeeTwoCount(@RequestBody Map paramInfo); |
| | | |
| | |
| | | |
| | | /** |
| | | * 计算总欠费 |
| | | * |
| | | * @param reportOweFeeDto |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/computeReportOweFeeTotalAmount", method = RequestMethod.POST) |
| | | double computeReportOweFeeTotalAmount(@RequestBody ReportOweFeeDto reportOweFeeDto); |
| | | |
| | | @RequestMapping(value = "/computeReportOweFeeItemAmount", method = RequestMethod.POST) |
| | | List<ReportOweFeeItemDto> computeReportOweFeeItemAmount(@RequestBody ReportOweFeeDto reportOweFeeDto); |
| | | |
| | |
| | | * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下 |
| | | * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行 |
| | | */ |
| | | @Java110Cmd(serviceCode = "itemRelease.saveItemRelease") |
| | | @Java110Cmd(serviceCode = " itemRelease.saveItemRelease") |
| | | public class SaveItemReleaseCmd extends Cmd { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(SaveItemReleaseCmd.class); |
| | |
| | | ) |
| | | |
| | | @Java110ParamsDoc(params = { |
| | | @Java110ParamDoc(name = "page", type = "int",length = 11, remark = "页数"), |
| | | @Java110ParamDoc(name = "row", type = "int",length = 11, remark = "行数"), |
| | | @Java110ParamDoc(name = "page", type = "int", length = 11, remark = "页数"), |
| | | @Java110ParamDoc(name = "row", type = "int", length = 11, remark = "行数"), |
| | | @Java110ParamDoc(name = "communityId", length = 30, remark = "小区ID"), |
| | | @Java110ParamDoc(name = "ownerId", length = 30, remark = "业主ID"), |
| | | }) |
| | | |
| | | @Java110ResponseDoc( |
| | | params = { |
| | | @Java110ParamDoc(name = "records", type = "int", length = 11, remark = "总页数"), |
| | | @Java110ParamDoc(name = "records", type = "int", length = 11, remark = "总页数"), |
| | | @Java110ParamDoc(name = "total", type = "int", length = 11, remark = "总数据"), |
| | | @Java110ParamDoc(name = "rooms", type = "Object", remark = "有效数据"), |
| | | @Java110ParamDoc(parentNodeName = "rooms",name = "roomName", type = "String", remark = "房屋名称"), |
| | | @Java110ParamDoc(parentNodeName = "rooms",name = "roomId", type = "String", remark = "房屋编号"), |
| | | @Java110ParamDoc(parentNodeName = "rooms", name = "roomName", type = "String", remark = "房屋名称"), |
| | | @Java110ParamDoc(parentNodeName = "rooms", name = "roomId", type = "String", remark = "房屋编号"), |
| | | } |
| | | ) |
| | | |
| | | @Java110ExampleDoc( |
| | | reqBody="http://{ip}:{port}/app/room.queryRoomsByOwner?ownerId=123123&page=1&row=10&communityId=2022081539020475", |
| | | resBody="{\"page\":0,\"records\":1,\"rooms\":[{\"apartment\":\"10101\",\"apartmentName\":\"一室一厅\",\"builtUpArea\":\"11.00\",\"endTime\":\"2037-01-01 00:00:00\",\"feeCoefficient\":\"1.00\",\"floorId\":\"732022081690440002\",\"floorNum\":\"D\",\"idCard\":\"\",\"layer\":\"1\",\"link\":\"18909711447\",\"ownerId\":\"772022082070860017\",\"ownerName\":\"张杰\",\"remark\":\"11\",\"roomArea\":\"11.00\",\"roomAttrDto\":[{\"attrId\":\"112022082081600012\",\"listShow\":\"Y\",\"page\":-1,\"records\":0,\"roomId\":\"752022082030880010\",\"row\":0,\"specCd\":\"9035007248\",\"specName\":\"精装修\",\"statusCd\":\"0\",\"total\":0,\"value\":\"20\",\"valueName\":\"20\"}],\"roomId\":\"752022082030880010\",\"roomName\":\"D-1-1001\",\"roomNum\":\"1001\",\"roomRent\":\"0.00\",\"roomSubType\":\"110\",\"roomSubTypeName\":\"住宅\",\"roomType\":\"1010301\",\"section\":\"1\",\"startTime\":\"2022-09-03 18:50:53\",\"state\":\"2001\",\"stateName\":\"已入住\",\"unitId\":\"742022082058950007\",\"unitNum\":\"1\"}],\"rows\":0,\"total\":2}" |
| | | reqBody = "http://{ip}:{port}/app/room.queryRoomsByOwner?ownerId=123123&page=1&row=10&communityId=2022081539020475", |
| | | resBody = "{\"page\":0,\"records\":1,\"rooms\":[{\"apartment\":\"10101\",\"apartmentName\":\"一室一厅\",\"builtUpArea\":\"11.00\",\"endTime\":\"2037-01-01 00:00:00\",\"feeCoefficient\":\"1.00\",\"floorId\":\"732022081690440002\",\"floorNum\":\"D\",\"idCard\":\"\",\"layer\":\"1\",\"link\":\"18909711447\",\"ownerId\":\"772022082070860017\",\"ownerName\":\"张杰\",\"remark\":\"11\",\"roomArea\":\"11.00\",\"roomAttrDto\":[{\"attrId\":\"112022082081600012\",\"listShow\":\"Y\",\"page\":-1,\"records\":0,\"roomId\":\"752022082030880010\",\"row\":0,\"specCd\":\"9035007248\",\"specName\":\"精装修\",\"statusCd\":\"0\",\"total\":0,\"value\":\"20\",\"valueName\":\"20\"}],\"roomId\":\"752022082030880010\",\"roomName\":\"D-1-1001\",\"roomNum\":\"1001\",\"roomRent\":\"0.00\",\"roomSubType\":\"110\",\"roomSubTypeName\":\"住宅\",\"roomType\":\"1010301\",\"section\":\"1\",\"startTime\":\"2022-09-03 18:50:53\",\"state\":\"2001\",\"stateName\":\"已入住\",\"unitId\":\"742022082058950007\",\"unitNum\":\"1\"}],\"rows\":0,\"total\":2}" |
| | | ) |
| | | @Java110Cmd(serviceCode = "room.queryRoomsByOwner") |
| | | public class QueryRoomsByOwnerCmd extends Cmd { |
| | |
| | | @Autowired |
| | | private IRoomInnerServiceSMO roomInnerServiceSMOImpl; |
| | | |
| | | |
| | | @Autowired |
| | | private IQueryRoomStatisticsBMO queryRoomStatisticsBMOImpl; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求中未包含communityId信息"); |
| | | //Assert.jsonObjectHaveKey(reqJson, "ownerId", "请求中未包含ownerId信息"); |
| | | |
| | | Assert.hasLength(reqJson.getString("communityId"), "小区ID不能为空"); |
| | | //Assert.hasLength(reqJson.getString("ownerId"), "业主ID不能为空"); |
| | | |
| | | String ownerId = reqJson.getString("ownerId"); |
| | | |
| | | String ownerNameLike = reqJson.getString("ownerNameLike"); |
| | | |
| | | if(StringUtil.isEmpty(ownerId) && StringUtil.isEmpty(ownerNameLike)){ |
| | | if (StringUtil.isEmpty(ownerId) && StringUtil.isEmpty(ownerNameLike)) { |
| | | throw new IllegalArgumentException("未包含业主信息"); |
| | | } |
| | | } |
| | |
| | | |
| | | RoomDto roomDto = BeanConvertUtil.covertBean(reqJson, RoomDto.class); |
| | | |
| | | if (reqJson.containsKey("roomNum") && !StringUtil.isEmpty(reqJson.getString("roomNum"))) { |
| | | String[] roomNums = reqJson.getString("roomNum").split("-"); |
| | | if (roomNums != null && roomNums.length == 3) { |
| | | roomDto.setFloorNum(roomNums[0]); |
| | | roomDto.setUnitNum(roomNums[1]); |
| | | roomDto.setRoomNum(roomNums[2]); |
| | | } |
| | | } |
| | | ApiRoomVo apiRoomVo = new ApiRoomVo(); |
| | | List<RoomDto> roomDtoList = roomInnerServiceSMOImpl.queryRoomsByOwner(roomDto); |
| | | roomDtoList = queryRoomStatisticsBMOImpl.queryRoomOweFee(roomDtoList); |
| | |
| | | import com.java110.dto.repair.RepairUserDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.fee.smo.impl.FeeReceiptInnerServiceSMOImpl; |
| | | import com.java110.intf.acct.IAccountDetailInnerServiceSMO; |
| | | import com.java110.intf.acct.IAccountInnerServiceSMO; |
| | | import com.java110.intf.acct.ICouponUserDetailV1InnerServiceSMO; |
| | | import com.java110.intf.acct.ICouponUserV1InnerServiceSMO; |
| | | import com.java110.intf.community.*; |
| | | import com.java110.intf.fee.*; |
| | | import com.java110.intf.fee.IFeeAccountDetailServiceSMO; |
| | |
| | | import com.java110.po.owner.RepairUserPo; |
| | | import com.java110.po.payFee.PayFeeDetailDiscountPo; |
| | | import com.java110.utils.cache.CommonCache; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.constant.FeeFlagTypeConstant; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.CmdException; |
| | |
| | | private IFeeAttrInnerServiceSMO feeAttrInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IRoomInnerServiceSMO roomInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeConfigInnerServiceSMO feeConfigInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeReceiptDetailInnerServiceSMO feeReceiptDetailInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IRepairUserInnerServiceSMO repairUserInnerServiceSMO; |
| | |
| | | |
| | | @Autowired |
| | | private IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IAccountDetailInnerServiceSMO accountDetailInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IAccountInnerServiceSMO accountInnerServiceSMOImpl; |
| | |
| | | private IRepairUserV1InnerServiceSMO repairUserNewV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private ICouponUserV1InnerServiceSMO couponUserV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private ICouponUserDetailV1InnerServiceSMO couponUserDetailV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarNewV1InnerServiceSMO ownerCarNewV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | |
| | | @Autowired |
| | | private FeeReceiptInnerServiceSMOImpl feeReceiptInnerServiceSMOImpl; |
| | | |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | Assert.jsonObjectHaveKey(reqJson, "communityId", "请求报文中未包含communityId节点"); |
| | | Assert.jsonObjectHaveKey(reqJson, "cycles", "请求报文中未包含cycles节点"); |
| | | Assert.jsonObjectHaveKey(reqJson, "receivedAmount", "请求报文中未包含receivedAmount节点"); |
| | | Assert.jsonObjectHaveKey(reqJson, "feeId", "请求报文中未包含feeId节点"); |
| | | |
| | | Assert.hasLength(reqJson.getString("communityId"), "小区ID不能为空"); |
| | | Assert.hasLength(reqJson.getString("cycles"), "周期不能为空"); |
| | | Assert.hasLength(reqJson.getString("receivedAmount"), "实收金额不能为空"); |
| | | Assert.hasLength(reqJson.getString("feeId"), "费用ID不能为空"); |
| | | |
| | | //判断是否 费用状态为缴费结束 |
| | | FeeDto feeDto = new FeeDto(); |
| | | feeDto.setFeeId(reqJson.getString("feeId")); |
| | |
| | | package com.java110.job.export.adapt; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.dto.data.ExportDataDto; |
| | | import com.java110.dto.dict.DictDto; |
| | | import com.java110.dto.report.QueryStatisticsDto; |
| | | import com.java110.dto.room.RoomDto; |
| | | import com.java110.intf.report.IReportFeeStatisticsInnerServiceSMO; |
| | | import com.java110.job.export.IExportDataAdapt; |
| | | import com.java110.utils.util.Assert; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 月实收数据导出 |
| | |
| | | public SXSSFWorkbook exportData(ExportDataDto exportDataDto) { |
| | | JSONObject reqJson = exportDataDto.getReqJson(); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区"); |
| | | |
| | | String startDate = reqJson.getString("feeStartDate"); |
| | | String endDate = reqJson.getString("feeEndDate"); |
| | | if (!StringUtil.isEmpty(startDate) && !startDate.contains(":")) { |
| | |
| | | endDate += " 23:59:59"; |
| | | reqJson.put("feeEndDate", endDate); |
| | | } |
| | | |
| | | SXSSFWorkbook workbook = null; //工作簿 |
| | | workbook = new SXSSFWorkbook(); |
| | | workbook.setCompressTempFiles(false); |
| | | |
| | | Sheet sheet = workbook.createSheet("实收明细"); |
| | | Row row = sheet.createRow(0); |
| | | row.createCell(0).setCellValue("房屋"); |
| | |
| | | row.createCell(3).setCellValue("费用名称"); |
| | | row.createCell(4).setCellValue("实收时间段"); |
| | | row.createCell(5).setCellValue("收银员"); |
| | | row.createCell(5).setCellValue("缴费时间"); |
| | | |
| | | row.createCell(6).setCellValue("缴费时间"); |
| | | QueryStatisticsDto queryStatisticsDto = new QueryStatisticsDto(); |
| | | queryStatisticsDto.setCommunityId(reqJson.getString("communityId")); |
| | | queryStatisticsDto.setStartDate(reqJson.getString("feeStartDate")); |
| | |
| | | queryStatisticsDto.setOwnerName(reqJson.getString("ownerName")); |
| | | queryStatisticsDto.setLink(reqJson.getString("link")); |
| | | long count = reportFeeStatisticsInnerServiceSMOImpl.getMonthReceivedDetailCount(queryStatisticsDto); |
| | | |
| | | int maxPage = (int) Math.ceil((double) count / (double) MAX_ROW); |
| | | List<Map> infos = null; |
| | | for (int page = 1; page <= maxPage; page++) { |
| | |
| | | infos = reportFeeStatisticsInnerServiceSMOImpl.getMonthReceivedDetailInfo(queryStatisticsDto); |
| | | appendData(infos, sheet, (page - 1) * MAX_ROW); |
| | | } |
| | | |
| | | //todo 实收金额 |
| | | double receivedAmount = reportFeeStatisticsInnerServiceSMOImpl.getMonthReceivedDetailAmount(queryStatisticsDto); |
| | | |
| | | row = sheet.createRow((int)count+1); |
| | | row = sheet.createRow((int) count + 1); |
| | | row.createCell(0).setCellValue("总收入"); |
| | | row.createCell(1).setCellValue(receivedAmount); |
| | | return workbook; |
| | |
| | | //row.createCell(4).setCellValue(getValue(dataObj, "startTime") + "~" + getValue(dataObj, "endTime")); |
| | | row.createCell(4).setCellValue(getValue(dataObj, "curYearMonth")); |
| | | row.createCell(5).setCellValue(getValue(dataObj, "cashierName")); |
| | | row.createCell(5).setCellValue(getValue(dataObj, "createTime")); |
| | | row.createCell(6).setCellValue(getValue(dataObj, "createTime")); |
| | | } |
| | | |
| | | } |
| | | |
| | | private String getValue(Map data, String key) { |
| | |
| | | package com.java110.job.export.adapt; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.dto.data.ExportDataDto; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.owner.OwnerRoomRelDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.dto.reportFee.ReportFeeMonthStatisticsDto; |
| | | import com.java110.dto.room.RoomDto; |
| | | import com.java110.intf.community.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.intf.community.IRoomInnerServiceSMO; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 业主车辆导出 |
| | | * |
| | | * @date 2023-09-08 |
| | | */ |
| | | @Service("exportOwnerCar") |
| | | public class ExportOwnerCarAdapt implements IExportDataAdapt { |
| | | |
| | |
| | | //工作表 |
| | | workbook = new SXSSFWorkbook(); |
| | | workbook.setCompressTempFiles(false); |
| | | |
| | | |
| | | Sheet sheet = workbook.createSheet("业主车辆"); |
| | | Row row = sheet.createRow(0); |
| | | row.createCell(0).setCellValue("车牌号"); |
| | | row.createCell(1).setCellValue("房屋"); |
| | | row.createCell(2).setCellValue("车辆类型"); |
| | | row.createCell(3).setCellValue("颜色"); |
| | | row.createCell(4).setCellValue("业主"); |
| | | row.createCell(5).setCellValue("手机号"); |
| | | row.createCell(6).setCellValue("车位"); |
| | | row.createCell(7).setCellValue("开始时间"); |
| | | row.createCell(8).setCellValue("结束时间"); |
| | | |
| | | row.createCell(1).setCellValue("成员车辆"); |
| | | row.createCell(2).setCellValue("房屋号"); |
| | | row.createCell(3).setCellValue("车辆品牌"); |
| | | row.createCell(4).setCellValue("车辆类型"); |
| | | row.createCell(5).setCellValue("颜色"); |
| | | row.createCell(6).setCellValue("业主"); |
| | | row.createCell(7).setCellValue("车位"); |
| | | row.createCell(8).setCellValue("有效期"); |
| | | row.createCell(9).setCellValue("状态"); |
| | | row.createCell(10).setCellValue("备注"); |
| | | JSONObject reqJson = exportDataDto.getReqJson(); |
| | | if (reqJson.containsKey("num") && !StringUtil.isEmpty(reqJson.getString("num"))) { |
| | | ParkingSpaceDto parkingSpaceDto = new ParkingSpaceDto(); |
| | |
| | | row = sheet.createRow(roomIndex + step + 1); |
| | | dataObj = ownerCarDtoList.get(roomIndex); |
| | | row.createCell(0).setCellValue(dataObj.getCarNum()); |
| | | row.createCell(1).setCellValue(dataObj.getRoomName()); |
| | | row.createCell(2).setCellValue(dataObj.getCarTypeName()); |
| | | row.createCell(3).setCellValue(dataObj.getCarColor()); |
| | | row.createCell(4).setCellValue(dataObj.getOwnerName()); |
| | | row.createCell(5).setCellValue(dataObj.getLink()); |
| | | row.createCell(6).setCellValue(dataObj.getAreaNum()+"-"+dataObj.getNum()); |
| | | row.createCell(7).setCellValue(DateUtil.getFormatTimeStringA(dataObj.getStartTime())); |
| | | row.createCell(8).setCellValue(DateUtil.getFormatTimeStringA(dataObj.getEndTime())); |
| | | if (!StringUtil.isEmpty(dataObj.getMemberCarCount())) { |
| | | row.createCell(1).setCellValue(dataObj.getMemberCarCount()); |
| | | } else { |
| | | row.createCell(1).setCellValue("0"); |
| | | } |
| | | row.createCell(2).setCellValue(dataObj.getRoomName()); |
| | | row.createCell(3).setCellValue(dataObj.getCarBrand()); |
| | | row.createCell(4).setCellValue(dataObj.getCarTypeName()); |
| | | row.createCell(5).setCellValue(dataObj.getCarColor()); |
| | | row.createCell(6).setCellValue(dataObj.getOwnerName() + "(" + dataObj.getLink() + ")"); |
| | | if (!StringUtil.isEmpty(dataObj.getAreaNum()) && dataObj.getState().equals("1001")) { |
| | | row.createCell(7).setCellValue(dataObj.getAreaNum() + "-" + dataObj.getNum()); |
| | | } else { |
| | | row.createCell(7).setCellValue("车位已释放"); |
| | | } |
| | | if (!StringUtil.isEmpty(dataObj.getLeaseType()) && dataObj.getLeaseType().equals("H")) { //H 月租车;S出售车;I 内部车;NM 免费车;R 预约车 |
| | | row.createCell(8).setCellValue(DateUtil.getFormatTimeStringA(dataObj.getStartTime()) + "~" + DateUtil.getFormatTimeStringA(dataObj.getEndTime())); |
| | | } else { |
| | | row.createCell(8).setCellValue("--"); |
| | | } |
| | | //结束时间 |
| | | Date endTime = dataObj.getEndTime(); |
| | | Date date = new Date(); |
| | | if (!StringUtil.isEmpty(dataObj.getState()) && dataObj.getState().equals("3003")) { //1001 正常;2002 欠费;3003 车位释放 |
| | | row.createCell(9).setCellValue("到期"); |
| | | } else if (endTime.getTime() > date.getTime()) { |
| | | row.createCell(9).setCellValue("正常"); |
| | | } else { |
| | | row.createCell(9).setCellValue("到期"); |
| | | } |
| | | row.createCell(10).setCellValue(dataObj.getRemark()); |
| | | } |
| | | |
| | | } |
| | | |
| | | private void freshPs(List<OwnerCarDto> ownerCarDtoList) { |
| | |
| | | return getReportFeeMonthStatisticsBMOImpl.queryDeadlineFee(reportFeeMonthStatisticsDto); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询费用分项表 |
| | | * |
| | |
| | | return getReportFeeMonthStatisticsBMOImpl.queryNoFeeRooms(roomDto); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询华宁物业 欠费统计报表 |
| | | * 作者: 吴学文 |
| | |
| | | paramInfo.put("page", page); |
| | | paramInfo.put("row", row); |
| | | paramInfo.put("startTime", DateUtil.getYear() + "-01-01"); |
| | | paramInfo.put("endTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_Q)+"-01"); |
| | | paramInfo.put("nextMonthTime",DateUtil.getFormatTimeStringB(DateUtil.getNextMonthFirstDate())); |
| | | paramInfo.put("endTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_Q) + "-01"); |
| | | paramInfo.put("nextMonthTime", DateUtil.getFormatTimeStringB(DateUtil.getNextMonthFirstDate())); |
| | | return getReportFeeMonthStatisticsBMOImpl.queryHuaningPayFee(paramInfo); |
| | | } |
| | | |
| | |
| | | @RequestParam(value = "year") int year, |
| | | @RequestParam(value = "month") int month, |
| | | @RequestParam(value = "feeTypeCd", required = false) String feeTypeCd, |
| | | @RequestParam(value = "floorNum", required = false) String floorNum, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | Map paramInfo = new HashMap(); |
| | |
| | | paramInfo.put("page", page); |
| | | paramInfo.put("row", row); |
| | | paramInfo.put("feeTypeCd", feeTypeCd); |
| | | paramInfo.put("floorNum", floorNum); |
| | | paramInfo.put("startTime", DateUtil.getYear() + "-01-01"); |
| | | paramInfo.put("endTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_B)); |
| | | return getReportFeeMonthStatisticsBMOImpl.queryHuaningOweFeeDetail(paramInfo); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.java110.intf.user.IOwnerInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerRoomRelInnerServiceSMO; |
| | | import com.java110.report.bmo.reportFeeMonthStatistics.IGetReportFeeMonthStatisticsBMO; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | |
| | | import java.lang.reflect.Field; |
| | | import java.math.BigDecimal; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | @Service("getReportFeeMonthStatisticsBMOImpl") |
| | |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reportFeeMonthStatisticsDto.getRow()), count, reportFeeMonthStatisticsDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | |
| | | .setScale(2, BigDecimal.ROUND_HALF_UP); |
| | | tmpReportFeeMonthStatisticsDto.setHisOweAmount(hisOweAmountDec.doubleValue()); |
| | | |
| | | |
| | | //当月应收 |
| | | curReceivableAmountDec = new BigDecimal(tmpReportFeeMonthStatisticsDto.getCurReceivableAmount()); |
| | | curReceivableAmountDec = curReceivableAmountDec.add(new BigDecimal(reportFeeMonthStatisticsDto.getCurReceivableAmount())) |
| | |
| | | .setScale(2, BigDecimal.ROUND_HALF_UP); |
| | | tmpReportFeeMonthStatisticsDto.setReceivedAmount(receivedAmountDec.doubleValue() + ""); |
| | | } |
| | | |
| | | return reportFeeMonthStatisticsDtos; |
| | | } |
| | | |
| | |
| | | return tmpReportFeeMonthStatisticsDto; |
| | | } |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | |
| | | reportFeeMonthStatisticsDto.setFeeYear(DateUtil.getYear() + ""); |
| | | reportFeeMonthStatisticsDto.setFeeMonth(DateUtil.getMonth() + ""); |
| | | int count = reportFeeMonthStatisticsInnerServiceSMOImpl.queryReportFloorUnitFeeSummaryCount(reportFeeMonthStatisticsDto); |
| | | |
| | | List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null; |
| | | if (count > 0) { |
| | | reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryReportFloorUnitFeeSummary(reportFeeMonthStatisticsDto); |
| | |
| | | |
| | | @Override |
| | | public ResponseEntity<String> queryFeeBreakdown(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) { |
| | | |
| | | if (StringUtil.isEmpty(reportFeeMonthStatisticsDto.getYearMonth())) { |
| | | reportFeeMonthStatisticsDto.setFeeYear(DateUtil.getYear() + ""); |
| | | reportFeeMonthStatisticsDto.setFeeMonth(DateUtil.getMonth() + ""); |
| | |
| | | |
| | | @Override |
| | | public ResponseEntity<String> queryFeeDetail(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) { |
| | | |
| | | |
| | | reportFeeMonthStatisticsDto.setFeeYear(DateUtil.getYear() + ""); |
| | | reportFeeMonthStatisticsDto.setFeeMonth(DateUtil.getMonth() + ""); |
| | | |
| | |
| | | @Override |
| | | public ResponseEntity<String> queryOweFeeDetail(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) { |
| | | int count = reportFeeMonthStatisticsInnerServiceSMOImpl.queryOweFeeDetailCount(reportFeeMonthStatisticsDto); |
| | | |
| | | List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null; |
| | | if (count > 0) { |
| | | reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryOweFeeDetail(reportFeeMonthStatisticsDto); |
| | |
| | | public ResponseEntity<String> queryPayFeeDetail(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) { |
| | | ResultVo resultVo = queryPayFeeDetailInnerServiceSMOImpl.query(reportFeeMonthStatisticsDto); |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | |
| | | * @param reportFeeMonthStatisticsDtos |
| | | */ |
| | | private void refreshReportFeeMonthStatistics(List<String> ownerIds, List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos) { |
| | | |
| | | if (ownerIds == null || ownerIds.size() < 1) { |
| | | return; |
| | | } |
| | |
| | | |
| | | @Override |
| | | public ResponseEntity<String> queryPrePaymentCount(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) { |
| | | |
| | | List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null; |
| | | |
| | | reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryPrePaymentCount(reportFeeMonthStatisticsDto); |
| | |
| | | |
| | | @Override |
| | | public ResponseEntity<String> queryDeadlinePaymentCount(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) { |
| | | |
| | | List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null; |
| | | |
| | | reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryDeadlinePaymentCount(reportFeeMonthStatisticsDto); |
| | |
| | | |
| | | @Override |
| | | public ResponseEntity<String> queryOwePaymentCount(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) { |
| | | |
| | | List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null; |
| | | List<ReportFeeMonthStatisticsDto> reportAllFeeMonthStatisticsDtos = null; |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | ResultVo resultVo = new ResultVo(reportAllFeeMonthStatisticsDtos); |
| | | |
| | |
| | | //获取总条数 |
| | | int size = staffs.size(); |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) size / (double) repairUserDto.getRow()), repairUserList.size(), repairUserList, staffs, repairUser); |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) size / (double) repairUserDto.getRow()), size, repairUserList, staffs, repairUser); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | |
| | | |
| | | @Override |
| | | public ResponseEntity<String> queryHuaningOweFee(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) { |
| | | |
| | | List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null; |
| | | reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryHuaningOweFee(reportFeeMonthStatisticsDto); |
| | | int count = reportFeeMonthStatisticsInnerServiceSMOImpl.queryHuaningOweFeeCounts(reportFeeMonthStatisticsDto); |
| | | if (count > 0) { |
| | | reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryHuaningOweFee(reportFeeMonthStatisticsDto); |
| | | } else { |
| | | reportFeeMonthStatisticsDtos = new ArrayList<>(); |
| | | } |
| | | |
| | | ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(reportFeeMonthStatisticsDtos); |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reportFeeMonthStatisticsDto.getRow()), count, reportFeeMonthStatisticsDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> queryHuaningPayFee(Map paramInfo) { |
| | | |
| | | List<Map> reportFeeMonthStatisticsDtos = null; |
| | | |
| | | reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryHuaningPayFee(paramInfo); |
| | | |
| | | ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(reportFeeMonthStatisticsDtos); |
| | | |
| | | int count = reportFeeMonthStatisticsInnerServiceSMOImpl.queryHuaningPayFeeCounts(paramInfo); |
| | | if (count > 0) { |
| | | reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryHuaningPayFee(paramInfo); |
| | | } else { |
| | | reportFeeMonthStatisticsDtos = new ArrayList<>(); |
| | | } |
| | | ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto = BeanConvertUtil.covertBean(paramInfo, ReportFeeMonthStatisticsDto.class); |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reportFeeMonthStatisticsDto.getRow()), count, reportFeeMonthStatisticsDtos); |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | return responseEntity; |
| | | } |
| | | |
| | |
| | | calendar.set(Calendar.MONTH, 0); |
| | | Date curStart = calendar.getTime(); |
| | | |
| | | |
| | | for (Map paramIn : reportFeeMonthStatisticsDtos) { |
| | | |
| | | startTime = (Date) paramIn.get("startTime"); |
| | | endTime = (Date) paramIn.get("endTime"); |
| | | BigDecimal money = (BigDecimal) paramIn.get("oweAmount"); |
| | |
| | | paramIn.put("bfAmount", 0); |
| | | continue; |
| | | } |
| | | |
| | | //每月金额 |
| | | BigDecimal monthAmount = money.divide(new BigDecimal(month), 2, BigDecimal.ROUND_HALF_EVEN); |
| | | |
| | | if (startTime.getTime() < curStart.getTime()) { |
| | | BigDecimal btAmountDec = monthAmount.multiply(new BigDecimal(curMonth)).setScale(2, BigDecimal.ROUND_HALF_EVEN); |
| | | paramIn.put("btAmount", btAmountDec.doubleValue()); |
| | |
| | | paramIn.put("bfAmount", bfAmountDec.doubleValue()); |
| | | continue; |
| | | } |
| | | |
| | | if (startTime.getTime() >= curStart.getTime()) { |
| | | paramIn.put("btAmount", money.doubleValue()); |
| | | paramIn.put("bfAmount", 0); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> queryPrePayment(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) { |
| | | |
| | | int count = reportFeeMonthStatisticsInnerServiceSMOImpl.queryPrePaymentNewCount(reportFeeMonthStatisticsDto); |
| | | |
| | | List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null; |
| | | if (count > 0) { |
| | | reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryPrePayment(reportFeeMonthStatisticsDto); |
| | |
| | | } |
| | | |
| | | private void freshReportOweDay(List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos) { |
| | | |
| | | int day = 0; |
| | | for (ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto : reportFeeMonthStatisticsDtos) { |
| | | try { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | private void freshReportDeadlineDay(List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos) { |
| | | |
| | | Date nowDate = DateUtil.getCurrentDate(); |
| | | |
| | | for (ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto : reportFeeMonthStatisticsDtos) { |
| | | try { |
| | | int day = DateUtil.daysBetween(DateUtil.getDateFromString(reportFeeMonthStatisticsDto.getDeadlineTime(), |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | public ResponseEntity<String> get(ReportFeeYearCollectionDto reportFeeYearCollectionDto) { |
| | | |
| | | |
| | | int count = reportFeeYearCollectionInnerServiceSMOImpl.queryReportFeeYearCollectionsCount(reportFeeYearCollectionDto); |
| | | |
| | | List<ReportFeeYearCollectionDto> reportFeeYearCollectionDtos = null; |
| | |
| | | RoomDto roomDto = BeanConvertUtil.covertBean(reqJson, RoomDto.class); |
| | | |
| | | String roomName = reqJson.getString("roomName"); |
| | | if(StringUtil.isEmpty(roomName)){ |
| | | String[] roomNames = roomName.split(roomName,3); |
| | | if(!StringUtil.isEmpty(roomName)){ |
| | | String[] roomNames = roomName.split("-"); |
| | | if(roomNames.length == 3) { |
| | | roomDto.setFloorNum(roomNames[0]); |
| | | roomDto.setUnitNum(roomNames[1]); |
| | |
| | | |
| | | int queryHuaningPayFeeCount(Map paramInfo); |
| | | |
| | | int queryHuaningOweFeeCounts(Map paramInfo); |
| | | |
| | | List<Map> queryHuaningPayFee(Map beanCovertMap); |
| | | |
| | | int queryHuaningPayFeeCounts(Map paramInfo); |
| | | |
| | | int queryHuaningPayFeeTwoCount(Map paramInfo); |
| | | |
| | | List<Map> queryHuaningPayFeeTwo(Map beanCovertMap); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int queryHuaningOweFeeCounts(Map info) { |
| | | logger.debug("查询queryHuaningOweFeeCounts数据 入参 info : {}", info); |
| | | |
| | | List<Map> businessReportFeeMonthStatisticsInfos = sqlSessionTemplate.selectList("reportFeeMonthStatisticsServiceDaoImpl.queryHuaningOweFeeCounts", info); |
| | | if (businessReportFeeMonthStatisticsInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessReportFeeMonthStatisticsInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map> queryHuaningPayFee(Map info) { |
| | | logger.debug("查询queryHuaningPayFee 入参 info : {}", info); |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int queryHuaningPayFeeCounts(Map info) { |
| | | logger.debug("查询queryHuaningPayFeeCounts数据 入参 info : {}", info); |
| | | |
| | | List<Map> businessReportFeeMonthStatisticsInfos = sqlSessionTemplate.selectList("reportFeeMonthStatisticsServiceDaoImpl.queryHuaningPayFeeCounts", info); |
| | | if (businessReportFeeMonthStatisticsInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessReportFeeMonthStatisticsInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | @Override |
| | | public int queryHuaningPayFeeTwoCount(Map info) { |
| | | logger.debug("查询queryHuaningPayFeeTwoCount数据 入参 info : {}", info); |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int queryHuaningOweFeeCounts(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) { |
| | | return reportFeeMonthStatisticsServiceDaoImpl.queryHuaningOweFeeCounts(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsDto)); |
| | | } |
| | | |
| | | @Override |
| | | public int queryHuaningPayFeeCount(@RequestBody Map paramInfo) { |
| | | return reportFeeMonthStatisticsServiceDaoImpl.queryHuaningPayFeeCount(paramInfo); |
| | | } |
| | |
| | | List<Map> deposits = reportFeeMonthStatisticsServiceDaoImpl.queryHuaningPayFee(paramInfo); |
| | | return deposits; |
| | | } |
| | | |
| | | @Override |
| | | public int queryHuaningPayFeeCounts(@RequestBody Map paramInfo) { |
| | | return reportFeeMonthStatisticsServiceDaoImpl.queryHuaningPayFeeCounts(paramInfo); |
| | | } |
| | | |
| | | @Override |
| | | public int queryHuaningPayFeeTwoCount(@RequestBody Map paramInfo) { |
| | | return reportFeeMonthStatisticsServiceDaoImpl.queryHuaningPayFeeTwoCount(paramInfo); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 合同起草待办 |
| | | * |
| | |
| | | @RequestParam(value = "contractType", required = false) String contractType, |
| | | @RequestParam(value = "logStartTime", required = false) String logStartTime, |
| | | @RequestParam(value = "logEndTime", required = false) String logEndTime, |
| | | @RequestParam(value = "planId", required = false) String planId |
| | | ) { |
| | | @RequestParam(value = "staffNameLike", required = false) String staffNameLike, |
| | | @RequestParam(value = "planId", required = false) String planId) { |
| | | ContractChangePlanDto contractChangePlanDto = new ContractChangePlanDto(); |
| | | contractChangePlanDto.setPage(page); |
| | | contractChangePlanDto.setRow(row); |
| | |
| | | contractChangePlanDto.setContractType(contractType); |
| | | contractChangePlanDto.setStartTime(logStartTime); |
| | | contractChangePlanDto.setEndTime(logEndTime); |
| | | contractChangePlanDto.setStaffNameLike(staffNameLike); |
| | | return getContractChangePlanBMOImpl.get(contractChangePlanDto); |
| | | } |
| | | |
| | |
| | | throw new CmdException("保存数据盘点明细失败"); |
| | | } |
| | | } |
| | | //assetInventoryPo.setState("4488"); //4488 盘点中,4477 盘点结束,4466 盘点入库 |
| | | int flag = assetInventoryV1InnerServiceSMOImpl.saveAssetInventory(assetInventoryPo); |
| | | if (flag < 1) { |
| | | throw new CmdException("保存数据失败"); |
| | |
| | | import com.java110.dto.store.StorehouseDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.dto.user.UserStorehouseDto; |
| | | import com.java110.intf.common.IGoodCollectionUserInnerServiceSMO; |
| | | import com.java110.intf.common.IOaWorkflowActivitiInnerServiceSMO; |
| | | import com.java110.intf.oa.IOaWorkflowInnerServiceSMO; |
| | | import com.java110.intf.store.*; |
| | |
| | | @Autowired |
| | | private IUserV1InnerServiceSMO userV1InnerServiceSMOImpl; |
| | | |
| | | |
| | | @Autowired |
| | | private IPurchaseApplyInnerServiceSMO purchaseApplyInnerServiceSMOImpl; |
| | | |
| | |
| | | private IOaWorkflowActivitiInnerServiceSMO oaWorkflowActivitiInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IGoodCollectionUserInnerServiceSMO goodCollectionUserInnerServiceSMOImpl; |
| | | @Autowired |
| | | private IResourceStoreInnerServiceSMO resourceStoreInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IPurchaseApplyDetailInnerServiceSMO purchaseApplyDetailInnerServiceSMOImpl; |
| | | |
| | |
| | | Assert.hasKeyAndValue(reqJson, "endUserName", "必填,请填写采购联系人"); |
| | | Assert.hasKeyAndValue(reqJson, "endUserTel", "必填,请填写采购联系电话"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "必填,请填写小区信息"); |
| | | |
| | | JSONArray resourceStores = reqJson.getJSONArray("resourceStores"); |
| | | String storeId = CmdContextUtils.getStoreId(context); |
| | | |
| | | if (resourceStores == null || resourceStores.size() < 1) { |
| | | throw new CmdException("未包含领用物品"); |
| | | } |
| | |
| | | for (int resourceStoreIndex = 0; resourceStoreIndex < resourceStores.size(); resourceStoreIndex++) { |
| | | JSONObject resourceStore = resourceStores.getJSONObject(resourceStoreIndex); |
| | | Assert.hasKeyAndValue(resourceStore, "timesId", "必填,未选择价格"); |
| | | |
| | | ResourceStoreTimesDto resourceStoreTimesDto = new ResourceStoreTimesDto(); |
| | | resourceStoreTimesDto.setTimesId(resourceStore.getString("timesId")); |
| | | resourceStoreTimesDto.setStoreId(storeId); |
| | | List<ResourceStoreTimesDto> resourceStoreTimesDtos = resourceStoreTimesV1InnerServiceSMOImpl.queryResourceStoreTimess(resourceStoreTimesDto); |
| | | |
| | | Assert.listOnlyOne(resourceStoreTimesDtos, "价格不存在"); |
| | | |
| | | quanitity = resourceStore.getIntValue("quantity"); |
| | | |
| | | if (quanitity < 1) { |
| | | throw new CmdException("申请数量不正确"); |
| | | } |
| | | stock = Integer.parseInt(resourceStoreTimesDtos.get(0).getStock()); |
| | | |
| | | if (quanitity > stock) { |
| | | throw new CmdException(resourceStoreTimesDtos.get(0).getResCode() + "出库不足,库存为=" + stock + ",申请数为=" + quanitity); |
| | | } |
| | | |
| | | resourceStore.put("resourceStoreTimesDtos", resourceStoreTimesDtos); |
| | | } |
| | | |
| | | //todo 查询仓库是否存在 |
| | | StorehouseDto storehouseDto = new StorehouseDto(); |
| | | storehouseDto.setShId(reqJson.getString("shId")); |
| | | List<StorehouseDto> storehouseDtos = storehouseV1InnerServiceSMOImpl.queryStorehouses(storehouseDto); |
| | | Assert.listOnlyOne(storehouseDtos, "仓库不存在"); |
| | | |
| | | if (!StorehouseDto.SWITCH_ON.equals(storehouseDtos.get(0).getUseSwitch())) { |
| | | return; |
| | | } |
| | | |
| | | OaWorkflowDto oaWorkflowDto = new OaWorkflowDto(); |
| | | oaWorkflowDto.setStoreId(storeId); |
| | | oaWorkflowDto.setFlowId(storehouseDtos.get(0).getUseFlowId()); |
| | |
| | | if (!OaWorkflowDto.STATE_COMPLAINT.equals(oaWorkflowDtos.get(0).getState())) { |
| | | throw new IllegalArgumentException(oaWorkflowDtos.get(0).getFlowName() + "流程未部署"); |
| | | } |
| | | |
| | | if (StringUtil.isEmpty(oaWorkflowDtos.get(0).getProcessDefinitionKey())) { |
| | | throw new IllegalArgumentException(oaWorkflowDtos.get(0).getFlowName() + "流程未部署"); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException { |
| | | String storeId = context.getReqHeaders().get("store-id"); |
| | | String userId = context.getReqHeaders().get("user-id"); |
| | | |
| | | //todo 查询仓库是否存在 |
| | | StorehouseDto storehouseDto = new StorehouseDto(); |
| | | storehouseDto.setShId(reqJson.getString("shId")); |
| | | List<StorehouseDto> storehouseDtos = storehouseV1InnerServiceSMOImpl.queryStorehouses(storehouseDto); |
| | | Assert.listOnlyOne(storehouseDtos, "仓库不存在"); |
| | | |
| | | UserDto userDto = new UserDto(); |
| | | userDto.setUserId(userId); |
| | | List<UserDto> userDtos = userV1InnerServiceSMOImpl.queryUsers(userDto); |
| | | |
| | | Assert.listOnlyOne(userDtos, "未包含用户"); |
| | | |
| | | String userName = userDtos.get(0).getName(); |
| | | |
| | | PurchaseApplyPo purchaseApplyPo = new PurchaseApplyPo(); |
| | | purchaseApplyPo.setApplyOrderId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_applyOrderId)); |
| | | purchaseApplyPo.setDescription(reqJson.getString("description")); |
| | |
| | | purchaseApplyDetailPo.setTimesId(resourceStoreTimesDtos.get(0).getTimesId()); |
| | | purchaseApplyDetailPo.setOriginalStock(resourceStoreTimesDtos.get(0).getStock()); |
| | | purchaseApplyDetailPo.setPurchaseQuantity(resourceStore.getString("quantity")); |
| | | |
| | | //todo 获取批次采购参考价格 |
| | | String consultPrice = null; |
| | | JSONArray timeList = resourceStore.getJSONArray("times"); |
| | |
| | | purchaseApplyDetailPos.add(purchaseApplyDetailPo); |
| | | } |
| | | purchaseApplyPo.setPurchaseApplyDetailPos(purchaseApplyDetailPos); |
| | | |
| | | int saveFlag = purchaseApplyInnerServiceSMOImpl.savePurchaseApply(purchaseApplyPo); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new CmdException("物品领用申请失败"); |
| | | } |
| | |
| | | purchaseApplyDto.setNextStaffId(reqJson.getString("staffId")); |
| | | //todo 启动审核流程 |
| | | toStartWorkflow(purchaseApplyDto, storehouseDtos.get(0), reqJson); |
| | | |
| | | context.setResponseEntity(ResultVo.createResponseEntity(ResultVo.CODE_OK, "物品领用成功")); |
| | | } |
| | | |
| | |
| | | * @param purchaseApplyDto |
| | | */ |
| | | private void toStartWorkflow(PurchaseApplyDto purchaseApplyDto, StorehouseDto storehouseDto, JSONObject reqJson) { |
| | | |
| | | if (!StorehouseDto.SWITCH_ON.equals(storehouseDto.getUseSwitch())) { |
| | | //todo 直接入库 |
| | | toPurchaseOutStorehouse(purchaseApplyDto, storehouseDto, reqJson); |
| | | return; |
| | | } |
| | | |
| | | OaWorkflowDto oaWorkflowDto = new OaWorkflowDto(); |
| | | oaWorkflowDto.setStoreId(purchaseApplyDto.getStoreId()); |
| | | oaWorkflowDto.setFlowId(storehouseDto.getUseFlowId()); |
| | | List<OaWorkflowDto> oaWorkflowDtos = oaWorkflowInnerServiceSMOImpl.queryOaWorkflows(oaWorkflowDto); |
| | | |
| | | //todo 提交审核 |
| | | JSONObject flowJson = new JSONObject(); |
| | | flowJson.put("processDefinitionKey", oaWorkflowDtos.get(0).getProcessDefinitionKey()); |
| | |
| | | flowJson.put("storeId", purchaseApplyDto.getStoreId()); |
| | | reqJson.put("processDefinitionKey", oaWorkflowDtos.get(0).getProcessDefinitionKey()); |
| | | JSONObject result = oaWorkflowActivitiInnerServiceSMOImpl.startProcess(flowJson); |
| | | |
| | | JSONObject audit = reqJson.getJSONObject("audit"); |
| | | String nextUserId = "-1"; |
| | | if (audit != null) { |
| | | nextUserId = reqJson.getJSONObject("audit").getString("staffId"); |
| | | String staffId = reqJson.getJSONObject("audit").getString("staffId"); |
| | | if (!StringUtil.isEmpty(staffId)) { |
| | | nextUserId = reqJson.getJSONObject("audit").getString("staffId"); |
| | | } else { |
| | | nextUserId = reqJson.getJSONObject("audit").getString("assignee"); |
| | | } |
| | | } |
| | | |
| | | //提交者提交 |
| | | flowJson = new JSONObject(); |
| | | flowJson.put("processInstanceId", result.getString("processInstanceId")); |
| | |
| | | flowJson.put("storeId", purchaseApplyDto.getStoreId()); |
| | | flowJson.put("id", purchaseApplyDto.getApplyOrderId()); |
| | | flowJson.put("flowId", oaWorkflowDtos.get(0).getFlowId()); |
| | | |
| | | oaWorkflowActivitiInnerServiceSMOImpl.autoFinishFirstTask(flowJson); |
| | | } |
| | | |
| | |
| | | * @param reqJson |
| | | */ |
| | | private void toPurchaseOutStorehouse(PurchaseApplyDto purchaseApplyDto, StorehouseDto storehouseDto, JSONObject reqJson) { |
| | | |
| | | PurchaseApplyDetailDto purchaseApplyDetailDto = new PurchaseApplyDetailDto(); |
| | | purchaseApplyDetailDto.setApplyOrderId(purchaseApplyDto.getApplyOrderId()); |
| | | purchaseApplyDetailDto.setStoreId(purchaseApplyDto.getStoreId()); |
| | | List<PurchaseApplyDetailDto> purchaseApplyDetailDtos = purchaseApplyDetailInnerServiceSMOImpl.queryPurchaseApplyDetails(purchaseApplyDetailDto); |
| | | |
| | | if (purchaseApplyDetailDtos == null || purchaseApplyDetailDtos.size() < 1) { |
| | | return; |
| | | } |
| | | |
| | | int stock = 0; |
| | | for (PurchaseApplyDetailDto tmpPurchaseApplyDetailDto : purchaseApplyDetailDtos) { |
| | | ResourceStorePo resourceStorePo = new ResourceStorePo(); |
| | |
| | | // } |
| | | // resourceStorePo.setMiniStock(String.valueOf(nowMiniStock)); |
| | | resourceStoreInnerServiceSMOImpl.updateResourceStore(resourceStorePo); |
| | | |
| | | // 保存至 物品 times表 |
| | | ResourceStoreTimesPo resourceStoreTimesPo = new ResourceStoreTimesPo(); |
| | | resourceStoreTimesPo.setApplyOrderId(tmpPurchaseApplyDetailDto.getApplyOrderId()); |
| | |
| | | * @param resourceStoreDtos |
| | | */ |
| | | private void addPersonStorehouse(PurchaseApplyDto purchaseApplyDto, List<ResourceStoreDto> resourceStoreDtos, PurchaseApplyDetailDto purchaseApplyDetailDto) { |
| | | |
| | | //获取物品单位 |
| | | String unitCode = resourceStoreDtos.get(0).getUnitCode(); |
| | | //获取物品最小计量单位 |
| | |
| | | JSONObject audit = reqJson.getJSONObject("audit"); |
| | | String nextUserId = "-1"; |
| | | if (audit != null) { |
| | | nextUserId = reqJson.getJSONObject("audit").getString("staffId"); |
| | | String staffId = reqJson.getJSONObject("audit").getString("staffId"); |
| | | if(!StringUtil.isEmpty(staffId)) { |
| | | nextUserId = reqJson.getJSONObject("audit").getString("staffId"); |
| | | } else { |
| | | nextUserId = reqJson.getJSONObject("audit").getString("assignee"); |
| | | } |
| | | } |
| | | |
| | | //提交者提交 |
| | | flowJson = new JSONObject(); |
| | | flowJson.put("processInstanceId", result.getString("processInstanceId")); |
| | |
| | | |
| | | @Autowired |
| | | private IStorehouseV1InnerServiceSMO storehouseV1InnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException { |
| | | Assert.hasKeyAndValue(reqJson, "resourceStores", "必填,请填写申请采购的物资"); |
| | |
| | | Assert.hasKeyAndValue(reqJson, "resOrderType", "必填,请填写申请类型"); |
| | | Assert.hasKeyAndValue(reqJson, "shId", "必填,请填写仓库"); |
| | | JSONArray resourceStores = reqJson.getJSONArray("resourceStores"); |
| | | |
| | | if (resourceStores == null || resourceStores.size() < 1) { |
| | | throw new CmdException("未包含采购物品"); |
| | | } |
| | | |
| | | //todo 查询仓库是否存在 |
| | | StorehouseDto storehouseDto = new StorehouseDto(); |
| | | storehouseDto.setShId(reqJson.getString("shId")); |
| | | List<StorehouseDto> storehouseDtos = storehouseV1InnerServiceSMOImpl.queryStorehouses(storehouseDto); |
| | | Assert.listOnlyOne(storehouseDtos, "仓库不存在"); |
| | | |
| | | //todo 不允许采购 |
| | | if (!"ON".equals(storehouseDtos.get(0).getAllowPurchase())) { |
| | | throw new CmdException(storehouseDtos.get(0).getShName() + "不允许采购"); |
| | |
| | | userDto.setRow(1); |
| | | userDto.setPage(1); |
| | | List<UserDto> userDtos = userV1InnerServiceSMOImpl.queryUsers(userDto); |
| | | |
| | | Assert.listOnlyOne(userDtos, "用户不存在"); |
| | | |
| | | userName = userDtos.get(0).getName(); |
| | | |
| | | String storeId = context.getReqHeaders().get("store-id"); |
| | | PurchaseApplyDto purchaseApplyDto = new PurchaseApplyDto(); |
| | | purchaseApplyDto.setResOrderType(reqJson.getString("resOrderType")); |
| | |
| | | //查询当前小区仓库下该物品信息 |
| | | ResourceStoreDto resourceStoreDto = new ResourceStoreDto(); |
| | | resourceStoreDto.setResCode(resourceStore.getString("resCode")); |
| | | |
| | | if (StringUtil.isEmpty(resourceStore.getString("shzId"))) { |
| | | resourceStore.put("shzId", resourceStore.getString("shId")); |
| | | } |
| | | resourceStoreDto.setShId(resourceStore.getString("shzId")); //小区目标仓库 |
| | | |
| | | List<ResourceStoreDto> resourceStoreDtos = resourceStoreInnerServiceSMOImpl.queryResourceStores(resourceStoreDto); |
| | | //调整集团仓库物品信息 |
| | | ResourceStorePo resourceStorePo = new ResourceStorePo(); |
| | |
| | | resourceStoreTimesPo1.setStock("0"); |
| | | resourceStoreTimesPo1.setStoreId(storeId); |
| | | resourceStoreTimesPo1.setShId(resourceStore.getString("shId")); |
| | | resourceStoreTimesPo1.setCommunityId(reqJson.getString("communityId")); |
| | | resourceStoreTimesV1InnerServiceSMOImpl.saveOrUpdateResourceStoreTimes(resourceStoreTimesPo1); |
| | | |
| | | AllocationStorehouseDto allocationStorehouseDto = new AllocationStorehouseDto(); |
| | | |
| | | if (resourceStoreDtos != null && resourceStoreDtos.size() == 1) {//目标仓库有此物品 |
| | | //生成调拨详情记录 |
| | | allocationStorehouseDto.setAsId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_allocationStorehouseId)); |
| | |
| | | //调拨 |
| | | allocationStorehouseApplyDto.setApplyType("30000"); |
| | | allocationStorehouseApplyInnerServiceSMOImpl.saveAllocationStorehouseApplys(allocationStorehouseApplyDto); |
| | | |
| | | //调整小区仓库物品均价、数量 |
| | | |
| | | //集团仓库商品信息 |
| | | ResourceStoreDto resourceStoreDto2 = new ResourceStoreDto(); |
| | | resourceStoreDto2.setResCode(resourceStore.getString("resCode")); |
| | | resourceStoreDto2.setResId(purchaseApplyDetailPo.getResId()); |
| | | List<ResourceStoreDto> resourceStoreDtoList = resourceStoreInnerServiceSMOImpl.queryResourceStores(resourceStoreDto2); |
| | | |
| | | ResourceStorePo resourceStorePo1 = new ResourceStorePo(); |
| | | resourceStorePo1.setPurchasePrice(resourceStore.getString("urgentPrice")); |
| | | resourceStorePo1.setResId(resourceStoreDtos.get(0).getResId()); |
| | |
| | | BigDecimal newMiniStock = purchaseQuantity.multiply(miniUnitStock).add(miniStock); |
| | | resourceStorePo1.setMiniStock(String.valueOf(newMiniStock)); |
| | | resourceStoreInnerServiceSMOImpl.updateResourceStore(resourceStorePo1); |
| | | |
| | | |
| | | } else if (resourceStoreDtos != null && resourceStoreDtos.size() > 1) { |
| | | throw new IllegalArgumentException("查询商品错误!"); |
| | | } else { |
| | |
| | | if (privileges.size() != 0 || (!StringUtil.isEmpty(reqJson.getString("applyOrderId")))) { |
| | | purchaseApplyDto.setUserId(""); |
| | | } |
| | | if (!StringUtil.isEmpty(reqJson.getString("applyUserName"))) { |
| | | purchaseApplyDto.setUserName(reqJson.getString("applyUserName")); |
| | | } |
| | | int count = purchaseApplyInnerServiceSMOImpl.queryPurchaseApplysCount(purchaseApplyDto); |
| | | List<ApiPurchaseApplyDataVo> purchaseApplys = null; |
| | | if (count > 0) { |
| | |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 类表述:更新 |
| | | * 服务编码:purchaseApply.updatePurchaseApply |
| | |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(UpdatePurchaseApplyCmd.class); |
| | | |
| | | |
| | | @Autowired |
| | | private IPurchaseApplyV1InnerServiceSMO purchaseApplyV1InnerServiceSMOImpl; |
| | | |
| | |
| | | Assert.hasKeyAndValue(reqJson, "endUserTel", "必填,请填写采购联系电话"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "必填,请填写小区信息"); |
| | | Assert.hasKey(reqJson, "resourceStores", "必填,请填写申请采购的物资"); |
| | | |
| | | JSONArray resourceStores = reqJson.getJSONArray("resourceStores"); |
| | | |
| | | if (resourceStores == null || resourceStores.size() < 1) { |
| | | throw new CmdException("未包含采购物品"); |
| | | } |
| | |
| | | reqJson.remove("resourceStores"); |
| | | PurchaseApplyPo purchaseApplyPo = BeanConvertUtil.covertBean(reqJson, PurchaseApplyPo.class); |
| | | int flag = purchaseApplyV1InnerServiceSMOImpl.updatePurchaseApply(purchaseApplyPo); |
| | | |
| | | if (flag < 1) { |
| | | throw new CmdException("更新数据失败"); |
| | | } |
| | | |
| | | //todo 删除 |
| | | PurchaseApplyDetailPo purchaseApplyDetailPo = new PurchaseApplyDetailPo(); |
| | | purchaseApplyDetailPo.setApplyOrderId(purchaseApplyPo.getApplyOrderId()); |
| | | purchaseApplyDetailV1InnerServiceSMOImpl.deletePurchaseApplyDetail(purchaseApplyDetailPo); |
| | | |
| | | |
| | | for (int resourceStoreIndex = 0; resourceStoreIndex < resourceStores.size(); resourceStoreIndex++) { |
| | | JSONObject resourceStore = resourceStores.getJSONObject(resourceStoreIndex); |
| | | resourceStore.put("originalStock", resourceStore.getString("stock")); |
| | |
| | | } |
| | | } |
| | | purchaseApplyDetailPo.setConsultPrice(consultPrice); |
| | | purchaseApplyDetailPo.setbId("-1"); |
| | | purchaseApplyDetailV1InnerServiceSMOImpl.savePurchaseApplyDetail(purchaseApplyDetailPo); |
| | | } |
| | | |
| | | cmdDataFlowContext.setResponseEntity(ResultVo.success()); |
| | | } |
| | | } |
| | |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.java110.dto.resource.ResourceStoreUseRecordDto; |
| | | |
| | | import java.util.List; |
| | | import java.util.ArrayList; |
| | | |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | |
| | | /** |
| | | * 类表述:查询 |
| | |
| | | @Java110Cmd(serviceCode = "resourceStore.listResourceStoreUseRecords") |
| | | public class ListResourceStoreUseRecordCmd extends Cmd { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(ListResourceStoreUseRecordCmd.class); |
| | | private static Logger logger = LoggerFactory.getLogger(ListResourceStoreUseRecordCmd.class); |
| | | |
| | | @Autowired |
| | | private IResourceStoreUseRecordV1InnerServiceSMO resourceStoreUseRecordV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IResourceStoreUseRecordInnerServiceSMO resourceStoreUseRecordInnerServiceSMOImpl; |
| | | |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | |
| | | import com.java110.dto.oaWorkflow.OaWorkflowDto; |
| | | import com.java110.dto.purchase.AllocationStorehouseDto; |
| | | import com.java110.dto.purchase.AllocationStorehouseApplyDto; |
| | | import com.java110.dto.purchase.PurchaseApplyDto; |
| | | import com.java110.dto.resource.ResourceStoreDto; |
| | | import com.java110.dto.resource.ResourceStoreTimesDto; |
| | | import com.java110.dto.store.StorehouseDto; |
| | |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.lock.DistributedLock; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | |
| | | @Autowired |
| | | private IResourceStoreTimesV1InnerServiceSMO resourceStoreTimesV1InnerServiceSMOImpl; |
| | | |
| | | |
| | | @Autowired |
| | | private IStorehouseV1InnerServiceSMO storehouseV1InnerServiceSMOImpl; |
| | | |
| | |
| | | validateResoureStore(reqJson, resourceStores, applyType, resIndex); |
| | | } |
| | | reqJson.put("resourceStores", resourceStores); |
| | | |
| | | |
| | | //todo 查询仓库是否存在 |
| | | StorehouseDto storehouseDto = new StorehouseDto(); |
| | | storehouseDto.setShId(reqJson.getString("shId")); |
| | | List<StorehouseDto> storehouseDtos = storehouseV1InnerServiceSMOImpl.queryStorehouses(storehouseDto); |
| | | Assert.listOnlyOne(storehouseDtos, "仓库不存在"); |
| | | |
| | | if (!StorehouseDto.SWITCH_ON.equals(storehouseDtos.get(0).getAllocationSwitch())) { |
| | | return; |
| | | } |
| | | String storeId = CmdContextUtils.getStoreId(cmdDataFlowContext); |
| | | |
| | | OaWorkflowDto oaWorkflowDto = new OaWorkflowDto(); |
| | | oaWorkflowDto.setStoreId(storeId); |
| | | oaWorkflowDto.setFlowId(storehouseDtos.get(0).getAllocationFlowId()); |
| | |
| | | if (!OaWorkflowDto.STATE_COMPLAINT.equals(oaWorkflowDtos.get(0).getState())) { |
| | | throw new IllegalArgumentException(oaWorkflowDtos.get(0).getFlowName() + "流程未部署"); |
| | | } |
| | | |
| | | if (StringUtil.isEmpty(oaWorkflowDtos.get(0).getProcessDefinitionKey())) { |
| | | throw new IllegalArgumentException(oaWorkflowDtos.get(0).getFlowName() + "流程未部署"); |
| | | } |
| | |
| | | } |
| | | resourceStores.getJSONObject(resIndex).put("resName", resourceStoreDtos.get(0).getResName()); |
| | | resourceStores.getJSONObject(resIndex).put("stockA", stockA); |
| | | |
| | | } else if (AllocationStorehouseApplyDto.STORE_TYPE_RETURN.equals(applyType)) { //返还 |
| | | UserStorehouseDto userStorehouseDto = new UserStorehouseDto(); |
| | | userStorehouseDto.setResId(resourceStores.getJSONObject(resIndex).getString("resId")); |
| | |
| | | int flag = 0; |
| | | //获取调拨返还状态标识 |
| | | String applyType = reqJson.getString("apply_type"); |
| | | |
| | | // 查询用户名称 |
| | | UserDto userDto = new UserDto(); |
| | | userDto.setUserId(reqJson.getString("userId")); |
| | | List<UserDto> userDtos = userV1InnerServiceSMOImpl.queryUsers(userDto); |
| | | |
| | | Assert.listOnlyOne(userDtos, "用户不存在"); |
| | | reqJson.put("userName", userDtos.get(0).getName()); |
| | | |
| | | |
| | | //封装调拨对象 |
| | | AllocationStorehouseApplyPo allocationStorehouseApplyPo = covertAllocationStorehouseApply(reqJson); |
| | | //todo 默认写0 后面 相加 |
| | |
| | | if (flag < 1) { |
| | | throw new CmdException("保存修改物品失败"); |
| | | } |
| | | |
| | | if (!AllocationStorehouseApplyDto.STORE_TYPE_ALLOCATION.equals(applyType)) { |
| | | return; |
| | | } |
| | | // todo 开启流程 |
| | | toStartWorkflow(allocationStorehouseApplyPo, reqJson); |
| | | |
| | | cmdDataFlowContext.setResponseEntity(ResultVo.success()); |
| | | } |
| | | |
| | |
| | | * @param allocationStorehouseApplyPo |
| | | */ |
| | | private void toStartWorkflow(AllocationStorehouseApplyPo allocationStorehouseApplyPo, JSONObject reqJson) { |
| | | |
| | | //todo 查询仓库是否存在 |
| | | StorehouseDto storehouseDto = new StorehouseDto(); |
| | | storehouseDto.setShId(reqJson.getString("shId")); |
| | | List<StorehouseDto> storehouseDtos = storehouseV1InnerServiceSMOImpl.queryStorehouses(storehouseDto); |
| | | Assert.listOnlyOne(storehouseDtos, "仓库不存在"); |
| | | |
| | | if (!StorehouseDto.SWITCH_ON.equals(storehouseDtos.get(0).getAllocationSwitch())) { |
| | | //todo 直接调拨 |
| | | toAllocationStorehouse(allocationStorehouseApplyPo, storehouseDto, reqJson); |
| | | return; |
| | | } |
| | | |
| | | OaWorkflowDto oaWorkflowDto = new OaWorkflowDto(); |
| | | oaWorkflowDto.setStoreId(allocationStorehouseApplyPo.getStoreId()); |
| | | oaWorkflowDto.setFlowId(storehouseDtos.get(0).getAllocationFlowId()); |
| | | List<OaWorkflowDto> oaWorkflowDtos = oaWorkflowInnerServiceSMOImpl.queryOaWorkflows(oaWorkflowDto); |
| | | |
| | | //todo 提交审核 |
| | | JSONObject flowJson = new JSONObject(); |
| | | flowJson.put("processDefinitionKey", oaWorkflowDtos.get(0).getProcessDefinitionKey()); |
| | |
| | | flowJson.put("storeId", allocationStorehouseApplyPo.getStoreId()); |
| | | reqJson.put("processDefinitionKey", oaWorkflowDtos.get(0).getProcessDefinitionKey()); |
| | | JSONObject result = oaWorkflowActivitiInnerServiceSMOImpl.startProcess(flowJson); |
| | | |
| | | JSONObject audit = reqJson.getJSONObject("audit"); |
| | | String nextUserId = "-1"; |
| | | if (audit != null) { |
| | | nextUserId = reqJson.getJSONObject("audit").getString("staffId"); |
| | | String staffId = reqJson.getJSONObject("audit").getString("staffId"); |
| | | if (!StringUtil.isEmpty(staffId)) { |
| | | nextUserId = reqJson.getJSONObject("audit").getString("staffId"); |
| | | } else { |
| | | nextUserId = reqJson.getJSONObject("audit").getString("assignee"); |
| | | } |
| | | } |
| | | |
| | | //提交者提交 |
| | | flowJson = new JSONObject(); |
| | | flowJson.put("processInstanceId", result.getString("processInstanceId")); |
| | |
| | | flowJson.put("storeId", allocationStorehouseApplyPo.getStoreId()); |
| | | flowJson.put("id", allocationStorehouseApplyPo.getApplyId()); |
| | | flowJson.put("flowId", oaWorkflowDtos.get(0).getFlowId()); |
| | | |
| | | oaWorkflowActivitiInnerServiceSMOImpl.autoFinishFirstTask(flowJson); |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param reqJson |
| | | */ |
| | | private void toAllocationStorehouse(AllocationStorehouseApplyPo allocationStorehouseApplyPo, StorehouseDto storehouseDto, JSONObject reqJson) { |
| | | |
| | | //查询调拨记录 |
| | | AllocationStorehouseDto allocationStorehouseDto = new AllocationStorehouseDto(); |
| | | allocationStorehouseDto.setApplyId(allocationStorehouseApplyPo.getApplyId()); |
| | | List<AllocationStorehouseDto> allocationStorehouseDtos = allocationStorehouseV1InnerServiceSMOImpl.queryAllocationStorehouses(allocationStorehouseDto); |
| | | |
| | | if (allocationStorehouseDtos == null || allocationStorehouseDtos.size() < 1) { |
| | | return; |
| | | } |
| | | |
| | | for (AllocationStorehouseDto tmpAllocationStorehouseDto : allocationStorehouseDtos) { |
| | | int allocationStock = Integer.parseInt(tmpAllocationStorehouseDto.getStock()); |
| | | //todo 每条记录调拨 |
| | | allocationBMOImpl.doToAllocationStorehouse(tmpAllocationStorehouseDto, allocationStock); |
| | | } |
| | | |
| | | String applyId = allocationStorehouseApplyPo.getApplyId(); |
| | | AllocationStorehouseApplyPo tmpAllocationStorehouseApplyPo = new AllocationStorehouseApplyPo(); |
| | | tmpAllocationStorehouseApplyPo.setApplyId(applyId); |
| | |
| | | ResourceStoreTimesDto resourceStoreTimesDto = new ResourceStoreTimesDto(); |
| | | resourceStoreTimesDto.setTimesId(resObj.getString("timesId")); |
| | | List<ResourceStoreTimesDto> resourceStoreTimesDtos = resourceStoreTimesV1InnerServiceSMOImpl.queryResourceStoreTimess(resourceStoreTimesDto); |
| | | |
| | | ResourceStoreTimesPo resourceStoreTimesPo = new ResourceStoreTimesPo(); |
| | | resourceStoreTimesPo.setApplyOrderId(GenerateCodeFactory.getGeneratorId("10")); |
| | | resourceStoreTimesPo.setPrice(resourceStoreTimesDtos.get(0).getPrice()); |
| | |
| | | ResourceStoreTimesDto resourceStoreTimesDto = new ResourceStoreTimesDto(); |
| | | resourceStoreTimesDto.setTimesId(resObj.getString("timesId")); |
| | | List<ResourceStoreTimesDto> resourceStoreTimesDtos = resourceStoreTimesV1InnerServiceSMOImpl.queryResourceStoreTimess(resourceStoreTimesDto); |
| | | |
| | | ResourceStoreTimesPo resourceStoreTimesPo = new ResourceStoreTimesPo(); |
| | | resourceStoreTimesPo.setApplyOrderId(GenerateCodeFactory.getGeneratorId("10")); |
| | | resourceStoreTimesPo.setPrice(resourceStoreTimesDtos.get(0).getPrice()); |
| | |
| | | BigDecimal curStockNew = new BigDecimal(resObj.getString("curStock")); |
| | | BigDecimal curStock = miniUnitStock.multiply(curStockNew); //当前调拨的最小计量总数 |
| | | BigDecimal newMiniStock = miniStock.subtract(curStock); //调拨后剩余的最小计量总数 |
| | | |
| | | resourceStorePo.setMiniStock(String.valueOf(newMiniStock)); |
| | | flag = resourceStoreV1InnerServiceSMOImpl.updateResourceStore(resourceStorePo); |
| | | if (flag < 1) { |
| | |
| | | allocationStorehouseApplyPo.setApplyCount(oldCurStore.toString()); |
| | | //加入 从库存中扣减 |
| | | subResourceStoreTimesStock(resObj); |
| | | |
| | | } finally { |
| | | DistributedLock.releaseDistributedLock(requestId, key); |
| | | } |
| | |
| | | allocationStorehousePo.setStartUserName(reqJson.getString("userName")); |
| | | allocationStorehousePo.setTimesId(resObj.getString("timesId")); |
| | | int flag = allocationStorehouseV1InnerServiceSMOImpl.saveAllocationStorehouse(allocationStorehousePo); |
| | | |
| | | if (flag < 1) { |
| | | throw new CmdException("保存调拨物品失败"); |
| | | } |
| | | |
| | | int applyCount = Integer.parseInt(allocationStorehouseApplyPo.getApplyCount()); |
| | | applyCount += resObj.getIntValue("curStock"); |
| | | allocationStorehouseApplyPo.setApplyCount(applyCount + ""); |
| | |
| | | * @return |
| | | */ |
| | | private AllocationStorehouseApplyPo covertAllocationStorehouseApply(JSONObject reqJson) { |
| | | |
| | | AllocationStorehouseApplyPo allocationStorehouseApplyPo = new AllocationStorehouseApplyPo(); |
| | | allocationStorehouseApplyPo.setApplyId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_applyId)); |
| | | allocationStorehouseApplyPo.setApplyCount("0"); |
| | |
| | | allocationStorehouseApplyPo.setCommunityId(reqJson.getString("communityId")); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | allocationStorehouseApplyPo.setCreateTime(format.format(new Date())); |
| | | |
| | | return allocationStorehouseApplyPo; |
| | | } |
| | | |
| | |
| | | resourceStoreTimesDto.setResCode(resObj.getString("resCode")); |
| | | resourceStoreTimesDto.setTimesId(resObj.getString("timesId")); |
| | | List<ResourceStoreTimesDto> resourceStoreTimesDtos = resourceStoreTimesV1InnerServiceSMOImpl.queryResourceStoreTimess(resourceStoreTimesDto); |
| | | |
| | | if (resourceStoreTimesDtos == null || resourceStoreTimesDtos.size() < 1) { |
| | | return; |
| | | } |
| | | int stock = 0; |
| | | int quantity = Integer.parseInt(applyQuantity); |
| | | ResourceStoreTimesPo resourceStoreTimesPo = null; |
| | | |
| | | stock = Integer.parseInt(resourceStoreTimesDtos.get(0).getStock()); |
| | | if (stock < quantity) { |
| | | throw new CmdException(resourceStoreTimesDtos.get(0).getResCode() + "价格为:" + resourceStoreTimesDtos.get(0).getPrice() + "的库存" + resourceStoreTimesDtos.get(0).getStock() + ",库存不足"); |
| | | } |
| | | |
| | | stock = stock - quantity; |
| | | resourceStoreTimesPo = new ResourceStoreTimesPo(); |
| | | resourceStoreTimesPo.setTimesId(resourceStoreTimesDtos.get(0).getTimesId()); |
| | |
| | | Assert.hasKeyAndValue(reqJson, "supplierName", "请求报文中未包含supplierName"); |
| | | Assert.hasKeyAndValue(reqJson, "address", "请求报文中未包含address"); |
| | | Assert.hasKeyAndValue(reqJson, "tel", "请求报文中未包含tel"); |
| | | Assert.hasKeyAndValue(reqJson, "storeId", "请求报文中未包含storeId"); |
| | | String regex = "1[3-9]\\d{9}"; |
| | | String regex2 = "0\\d{2,3}-?[1-9]\\d{4,9}"; |
| | | String tel = reqJson.getString("tel"); //获取手机号 |
| | | if (!tel.matches(regex) && !tel.matches(regex2)) { |
| | | throw new IllegalArgumentException("供应商联系方式格式不对!"); |
| | | } |
| | | if (!reqJson.containsKey("storeId")) { |
| | | String storeId =cmdDataFlowContext.getReqHeaders().get("store-id"); |
| | | String storeId = cmdDataFlowContext.getReqHeaders().get("store-id"); |
| | | reqJson.put("storeId", storeId); |
| | | } |
| | | |
| | | if (!reqJson.containsKey("userId")) { |
| | | reqJson.put("userId", "-1"); |
| | | } |
| | | |
| | | if (!reqJson.containsKey("userName")) { |
| | | reqJson.put("userName", "未知"); |
| | | } |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "storeId", "请求报文中未包含storeId"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | |
| | | reqJson.put("createUserId", reqJson.getString("userId")); |
| | | reqJson.put("createUserName", reqJson.getString("userName")); |
| | | ResourceSupplierPo resourceSupplierPo = BeanConvertUtil.covertBean(reqJson, ResourceSupplierPo.class); |
| | | |
| | | resourceSupplierPo.setRsId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID)); |
| | | int flag = resourceSupplierV1InnerServiceSMOImpl.saveResourceSupplier(resourceSupplierPo); |
| | | |
| | | if (flag < 1) { |
| | | throw new CmdException("保存数据失败"); |
| | | } |
| | | |
| | | cmdDataFlowContext.setResponseEntity(ResultVo.success()); |
| | | } |
| | | } |
| | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | |
| | | /** |
| | | * 类表述:更新 |
| | | * 服务编码:resourceSupplier.updateResourceSupplier |
| | |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(UpdateResourceSupplierCmd.class); |
| | | |
| | | |
| | | @Autowired |
| | | private IResourceSupplierV1InnerServiceSMO resourceSupplierV1InnerServiceSMOImpl; |
| | | |
| | |
| | | Assert.hasKeyAndValue(reqJson, "supplierName", "请求报文中未包含supplierName"); |
| | | Assert.hasKeyAndValue(reqJson, "address", "请求报文中未包含address"); |
| | | Assert.hasKeyAndValue(reqJson, "tel", "请求报文中未包含tel"); |
| | | Assert.hasKeyAndValue(reqJson, "storeId", "请求报文中未包含storeId"); |
| | | String regex = "1[3-9]\\d{9}"; |
| | | String regex2 = "0\\d{2,3}-?[1-9]\\d{4,9}"; |
| | | String tel = reqJson.getString("tel"); //获取手机号 |
| | | if (!tel.matches(regex) && !tel.matches(regex2)) { |
| | | throw new IllegalArgumentException("供应商联系方式格式不对!"); |
| | | } |
| | | if (!reqJson.containsKey("storeId")) { |
| | | String storeId = cmdDataFlowContext.getReqHeaders().get("store-id"); |
| | | reqJson.put("storeId", storeId); |
| | |
| | | if (!reqJson.containsKey("userId")) { |
| | | reqJson.put("userId", "-1"); |
| | | } |
| | | |
| | | if (!reqJson.containsKey("userName")) { |
| | | reqJson.put("userName", "未知"); |
| | | } |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "storeId", "请求报文中未包含storeId"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | ResourceSupplierPo resourceSupplierPo = BeanConvertUtil.covertBean(reqJson, ResourceSupplierPo.class); |
| | | int flag = resourceSupplierV1InnerServiceSMOImpl.updateResourceSupplier(resourceSupplierPo); |
| | | |
| | | if (flag < 1) { |
| | | throw new CmdException("更新数据失败"); |
| | | } |
| | | |
| | | cmdDataFlowContext.setResponseEntity(ResultVo.success()); |
| | | } |
| | | } |
| | |
| | | resourceStoreTimesDto.setPrice(resourceStoreTimesPo.getPrice()); |
| | | resourceStoreTimesDto.setResCode(resourceStoreTimesPo.getResCode()); |
| | | resourceStoreTimesDto.setShId(resourceStoreTimesPo.getShId()); |
| | | resourceStoreTimesDto.setCommunityId(resourceStoreTimesPo.getCommunityId()); |
| | | List<ResourceStoreTimesDto> resourceStoreTimesDtos = queryResourceStoreTimess(resourceStoreTimesDto); |
| | | if (resourceStoreTimesDtos == null || resourceStoreTimesDtos.size() < 1) { |
| | | resourceStoreTimesPo.setTimesId(GenerateCodeFactory.getGeneratorId("11")); |
| | |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException { |
| | | Assert.jsonObjectHaveKey(reqJson, "communityId", "请求中未包含communityId信息"); |
| | | // Assert.jsonObjectHaveKey(reqJson, "ownerTypeCd", "请求中未包含ownerTypeCd信息"); |
| | | |
| | | if(!reqJson.containsKey("page")){ |
| | | reqJson.put("page",1); |
| | | if (!reqJson.containsKey("page")) { |
| | | reqJson.put("page", 1); |
| | | } |
| | | if(!reqJson.containsKey("row")){ |
| | | reqJson.put("row",10); |
| | | if (!reqJson.containsKey("row")) { |
| | | reqJson.put("row", 10); |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | List<OwnerDto> ownerDtoList = null; |
| | | if (total > 0) { |
| | | ownerDtoList = ownerInnerServiceSMOImpl.queryOwnerMembers(ownerDto); |
| | | }else { |
| | | } else { |
| | | ownerDtoList = new ArrayList<>(); |
| | | } |
| | | //查询是否有脱敏权限 |
| | |
| | | FileRelDto fileRelDto = new FileRelDto(); |
| | | fileRelDto.setObjId(ownerdto.getMemberId()); |
| | | List<FileRelDto> fileRelDtos = fileRelInnerServiceSMOImpl.queryFileRels(fileRelDto); |
| | | if(fileRelDtos != null && fileRelDtos.size() > 0){ |
| | | if (fileRelDtos != null && fileRelDtos.size() > 0) { |
| | | ownerdto.setUrl(fileRelDtos.get(0).getFileSaveName()); |
| | | } |
| | | } |
| | |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.dto.questionTitleValue.QuestionTitleValueDto; |
| | | import com.java110.intf.user.IQuestionAnswerV1InnerServiceSMO; |
| | | import com.java110.intf.user.IQuestionTitleV1InnerServiceSMO; |
| | | import com.java110.intf.user.IQuestionTitleValueV1InnerServiceSMO; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | |
| | | /** |
| | | * 类表述:查询 |
| | | * 服务编码:questionAnswer.listQuestionAnswer |
| | |
| | | public class ListQuestionAnswerCmd extends Cmd { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(ListQuestionAnswerCmd.class); |
| | | |
| | | @Autowired |
| | | private IQuestionAnswerV1InnerServiceSMO questionAnswerV1InnerServiceSMOImpl; |
| | | |
| | | |
| | | @Autowired |
| | | private IQuestionTitleV1InnerServiceSMO questionTitleV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IQuestionTitleValueV1InnerServiceSMO questionTitleValueV1InnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | |
| | | //todo 查询已投票数据和 得分 |
| | | computeVotedCountAndScore(questionAnswerDtos); |
| | | |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, questionAnswerDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | |
| | | * @param questionAnswerDtos |
| | | */ |
| | | private void computeVotedCountAndScore(List<QuestionAnswerDto> questionAnswerDtos) { |
| | | |
| | | if (questionAnswerDtos == null || questionAnswerDtos.size() < 1) { |
| | | return; |
| | | } |
| | |
| | | for (QuestionAnswerDto questionAnswerDto : questionAnswerDtos) { |
| | | qaIds.add(questionAnswerDto.getQaId()); |
| | | } |
| | | |
| | | // todo 查询投票人数和得分 |
| | | List<QuestionAnswerDto> votedQAs = questionAnswerV1InnerServiceSMOImpl.queryVotedCountAndScore(qaIds.toArray(new String[qaIds.size()])); |
| | | |
| | | if (votedQAs == null || votedQAs.size() < 1) { |
| | | return; |
| | | } |
| | | for(QuestionAnswerDto questionAnswerDto:questionAnswerDtos){ |
| | | for(QuestionAnswerDto votedQa : votedQAs){ |
| | | if(!questionAnswerDto.getQaId().equals(votedQa.getQaId())){ |
| | | for (QuestionAnswerDto questionAnswerDto : questionAnswerDtos) { |
| | | for (QuestionAnswerDto votedQa : votedQAs) { |
| | | if (!questionAnswerDto.getQaId().equals(votedQa.getQaId())) { |
| | | continue; |
| | | } |
| | | |
| | | questionAnswerDto.setVotedCount(votedQa.getVotedCount()); |
| | | questionAnswerDto.setScore(votedQa.getScore()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | |
| | | /** |
| | | * 类表述:查询 |
| | | * 服务编码:questionTitle.listQuestionTitle |
| | |
| | | public class ListQuestionTitleCmd extends Cmd { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(ListQuestionTitleCmd.class); |
| | | |
| | | @Autowired |
| | | private IQuestionTitleV1InnerServiceSMO questionTitleV1InnerServiceSMOImpl; |
| | | |
| | |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | super.validatePageInfo(reqJson); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | QuestionTitleDto questionTitleDto = BeanConvertUtil.covertBean(reqJson, QuestionTitleDto.class); |
| | | |
| | | int count = questionTitleV1InnerServiceSMOImpl.queryQuestionTitlesCount(questionTitleDto); |
| | |
| | | |
| | | if (count > 0) { |
| | | questionTitleDtos = questionTitleV1InnerServiceSMOImpl.queryQuestionTitles(questionTitleDto); |
| | | |
| | | refreshTitileValues(questionTitleDtos); |
| | | } else { |
| | | questionTitleDtos = new ArrayList<>(); |
| | |
| | | } |
| | | |
| | | private void refreshTitileValues(List<QuestionTitleDto> questionTitleDtos) { |
| | | |
| | | if (questionTitleDtos == null || questionTitleDtos.size() < 1) { |
| | | return; |
| | | } |
| | |
| | | } |
| | | questionTitle.setTitleValues(tmpQuestionTitleValueDtos); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | |
| | | questionAnswerPo.setCommunityId(reqJson.getString("communityId")); |
| | | questionAnswerPo.setQaType(QuestionAnswerDto.QA_TYPE_VOTE); |
| | | questionAnswerPo.setState(QuestionAnswerDto.STATE_WAIT); |
| | | if (!StringUtil.isEmpty(reqJson.getString("communityId"))) { |
| | | questionAnswerPo.setObjType("3306"); //3306 是小区,3307 是商户 |
| | | questionAnswerPo.setObjId(reqJson.getString("communityId")); |
| | | } else if (!StringUtil.isEmpty(reqJson.getString("storeId"))) { |
| | | questionAnswerPo.setObjType("3307"); //3306 是小区,3307 是商户 |
| | | questionAnswerPo.setObjId(reqJson.getString("storeId")); |
| | | } |
| | | questionAnswerV1InnerServiceSMOImpl.saveQuestionAnswer(questionAnswerPo); |
| | | |
| | | QuestionAnswerTitleRelPo questionAnswerTitleRelPo = new QuestionAnswerTitleRelPo(); |
| | |
| | | questionAnswerTitleRelPo.setQatrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID)); |
| | | questionAnswerTitleRelV1InnerServiceSMOImpl.saveQuestionAnswerTitleRel(questionAnswerTitleRelPo); |
| | | |
| | | questionAnswerBMOImpl.saveUserQuestionAnswer(questionAnswerPo,reqJson.getJSONArray("roomIds")); |
| | | questionAnswerBMOImpl.saveUserQuestionAnswer(questionAnswerPo, reqJson.getJSONArray("roomIds")); |
| | | } |
| | | } |
| | |
| | | import com.java110.user.bmo.question.IQuestionAnswerBMO; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.slf4j.Logger; |
| | |
| | | Assert.hasKey(reqJson, "roomIds", "请求报文中未包含投票房屋"); |
| | | Assert.hasKeyAndValue(reqJson, "startTime", "未包含开始时间"); |
| | | Assert.hasKeyAndValue(reqJson, "endTime", "未包含结束时间"); |
| | | Assert.hasKeyAndValue(reqJson, "content", "未包含说明"); |
| | | Assert.hasKeyAndValue(reqJson, "content", "未包含调研说明"); |
| | | Assert.hasKey(reqJson, "questionTitles", "请求报文中未包含题目"); |
| | | |
| | | JSONArray questionTitles = reqJson.getJSONArray("questionTitles"); |
| | | if (questionTitles == null || questionTitles.size() < 1) { |
| | | throw new IllegalArgumentException("未包含题目"); |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | //todo 写入投票信息 |
| | | QuestionAnswerPo questionAnswerPo = new QuestionAnswerPo(); |
| | | questionAnswerPo.setContent(reqJson.getString("content")); |
| | |
| | | questionAnswerPo.setCommunityId(reqJson.getString("communityId")); |
| | | questionAnswerPo.setQaType(QuestionAnswerDto.QA_TYPE_QUESTION); |
| | | questionAnswerPo.setState(QuestionAnswerDto.STATE_WAIT); |
| | | if (!StringUtil.isEmpty(reqJson.getString("communityId"))) { |
| | | questionAnswerPo.setObjType("3306"); //3306 是小区,3307 是商户 |
| | | questionAnswerPo.setObjId(reqJson.getString("communityId")); |
| | | } else if (!StringUtil.isEmpty(reqJson.getString("storeId"))) { |
| | | questionAnswerPo.setObjType("3307"); //3306 是小区,3307 是商户 |
| | | questionAnswerPo.setObjId(reqJson.getString("storeId")); |
| | | } |
| | | int flag = questionAnswerV1InnerServiceSMOImpl.saveQuestionAnswer(questionAnswerPo); |
| | | |
| | | if (flag < 1) { |
| | | throw new CmdException("保存数据失败"); |
| | | } |
| | | JSONArray questionTitles = reqJson.getJSONArray("questionTitles"); |
| | | JSONObject title = null; |
| | | for (int titleIndex = 0; titleIndex < questionTitles.size(); titleIndex++) { |
| | | title= questionTitles.getJSONObject(titleIndex); |
| | | title = questionTitles.getJSONObject(titleIndex); |
| | | QuestionAnswerTitleRelPo questionAnswerTitleRelPo = new QuestionAnswerTitleRelPo(); |
| | | questionAnswerTitleRelPo.setCommunityId(reqJson.getString("communityId")); |
| | | questionAnswerTitleRelPo.setTitleId(title.getString("titleId")); |
| | | questionAnswerTitleRelPo.setSeq((titleIndex + 1) + ""); |
| | | questionAnswerTitleRelPo.setScore("0"); |
| | | if(title.containsKey("score")){ |
| | | if (title.containsKey("score")) { |
| | | questionAnswerTitleRelPo.setScore(title.getString("score")); |
| | | } |
| | | questionAnswerTitleRelPo.setQaId(questionAnswerPo.getQaId()); |
| | | questionAnswerTitleRelPo.setQatrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID)); |
| | | questionAnswerTitleRelV1InnerServiceSMOImpl.saveQuestionAnswerTitleRel(questionAnswerTitleRelPo); |
| | | } |
| | | |
| | | questionAnswerBMOImpl.saveUserQuestionAnswer(questionAnswerPo, reqJson.getJSONArray("roomIds")); |
| | | |
| | | cmdDataFlowContext.setResponseEntity(ResultVo.success()); |
| | | } |
| | | } |
| | |
| | | Assert.hasKeyAndValue(reqJson, "qaId", "请求报文中未包含题目"); |
| | | Assert.hasKeyAndValue(reqJson, "startTime", "未包含开始时间"); |
| | | Assert.hasKeyAndValue(reqJson, "endTime", "未包含结束时间"); |
| | | Assert.hasKeyAndValue(reqJson, "content", "未包含说明"); |
| | | Assert.hasKeyAndValue(reqJson, "content", "未包含调研说明"); |
| | | Assert.hasKey(reqJson, "questionTitles", "请求报文中未包含题目"); |
| | | |
| | | JSONArray questionTitles = reqJson.getJSONArray("questionTitles"); |