| New file |
| | |
| | | package com.java110.dto.contractTypeSpec; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName FloorDto |
| | | * @Description 合同类型规格数据层封装 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 8:52 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | public class ContractTypeSpecDto extends PageDto implements Serializable { |
| | | |
| | | private String specType; |
| | | private String specName; |
| | | private String specHoldplace; |
| | | private String specValueType; |
| | | private String specCd; |
| | | private String storeId; |
| | | private String specShow; |
| | | private String contractTypeId; |
| | | private String required; |
| | | private String listShow; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getSpecType() { |
| | | return specType; |
| | | } |
| | | public void setSpecType(String specType) { |
| | | this.specType = specType; |
| | | } |
| | | public String getSpecName() { |
| | | return specName; |
| | | } |
| | | public void setSpecName(String specName) { |
| | | this.specName = specName; |
| | | } |
| | | public String getSpecHoldplace() { |
| | | return specHoldplace; |
| | | } |
| | | public void setSpecHoldplace(String specHoldplace) { |
| | | this.specHoldplace = specHoldplace; |
| | | } |
| | | public String getSpecValueType() { |
| | | return specValueType; |
| | | } |
| | | public void setSpecValueType(String specValueType) { |
| | | this.specValueType = specValueType; |
| | | } |
| | | public String getSpecCd() { |
| | | return specCd; |
| | | } |
| | | public void setSpecCd(String specCd) { |
| | | this.specCd = specCd; |
| | | } |
| | | public String getStoreId() { |
| | | return storeId; |
| | | } |
| | | public void setStoreId(String storeId) { |
| | | this.storeId = storeId; |
| | | } |
| | | public String getSpecShow() { |
| | | return specShow; |
| | | } |
| | | public void setSpecShow(String specShow) { |
| | | this.specShow = specShow; |
| | | } |
| | | public String getContractTypeId() { |
| | | return contractTypeId; |
| | | } |
| | | public void setContractTypeId(String contractTypeId) { |
| | | this.contractTypeId = contractTypeId; |
| | | } |
| | | public String getRequired() { |
| | | return required; |
| | | } |
| | | public void setRequired(String required) { |
| | | this.required = required; |
| | | } |
| | | public String getListShow() { |
| | | return listShow; |
| | | } |
| | | public void setListShow(String listShow) { |
| | | this.listShow = listShow; |
| | | } |
| | | |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.po.contractTypeSpec; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | public class ContractTypeSpecPo implements Serializable { |
| | | |
| | | private String specType; |
| | | private String specName; |
| | | private String specHoldplace; |
| | | private String specValueType; |
| | | private String specCd; |
| | | private String statusCd = "0"; |
| | | private String storeId; |
| | | private String specShow; |
| | | private String contractTypeId; |
| | | private String required; |
| | | private String listShow; |
| | | public String getSpecType() { |
| | | return specType; |
| | | } |
| | | public void setSpecType(String specType) { |
| | | this.specType = specType; |
| | | } |
| | | public String getSpecName() { |
| | | return specName; |
| | | } |
| | | public void setSpecName(String specName) { |
| | | this.specName = specName; |
| | | } |
| | | public String getSpecHoldplace() { |
| | | return specHoldplace; |
| | | } |
| | | public void setSpecHoldplace(String specHoldplace) { |
| | | this.specHoldplace = specHoldplace; |
| | | } |
| | | public String getSpecValueType() { |
| | | return specValueType; |
| | | } |
| | | public void setSpecValueType(String specValueType) { |
| | | this.specValueType = specValueType; |
| | | } |
| | | public String getSpecCd() { |
| | | return specCd; |
| | | } |
| | | public void setSpecCd(String specCd) { |
| | | this.specCd = specCd; |
| | | } |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | public String getStoreId() { |
| | | return storeId; |
| | | } |
| | | public void setStoreId(String storeId) { |
| | | this.storeId = storeId; |
| | | } |
| | | public String getSpecShow() { |
| | | return specShow; |
| | | } |
| | | public void setSpecShow(String specShow) { |
| | | this.specShow = specShow; |
| | | } |
| | | public String getContractTypeId() { |
| | | return contractTypeId; |
| | | } |
| | | public void setContractTypeId(String contractTypeId) { |
| | | this.contractTypeId = contractTypeId; |
| | | } |
| | | public String getRequired() { |
| | | return required; |
| | | } |
| | | public void setRequired(String required) { |
| | | this.required = required; |
| | | } |
| | | public String getListShow() { |
| | | return listShow; |
| | | } |
| | | public void setListShow(String listShow) { |
| | | this.listShow = listShow; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | public static final String CODE_PREFIX_appointmentId = "80"; |
| | | public static final String CODE_PREFIX_contractId = "81"; |
| | | public static final String CODE_PREFIX_contractTypeId = "81"; |
| | | public static final String CODE_PREFIX_specCd = "82"; |
| | | |
| | | |
| | | |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!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> |
| | | |
| | | |
| | | <!-- 查询合同类型规格信息 add by wuxw 2018-07-03 --> |
| | | <select id="getContractTypeSpecInfo" parameterType="Map" resultType="Map"> |
| | | select t.spec_type,t.spec_type specType,t.spec_name,t.spec_name specName,t.spec_holdplace,t.spec_holdplace |
| | | specHoldplace,t.spec_value_type,t.spec_value_type specValueType,t.spec_cd,t.spec_cd |
| | | specCd,t.status_cd,t.status_cd statusCd,t.store_id,t.store_id storeId,t.spec_show,t.spec_show |
| | | specShow,t.contract_type_id,t.contract_type_id contractTypeId,t.required,t.list_show,t.list_show listShow |
| | | from contract_type_spec t |
| | | where 1 =1 |
| | | <if test="specType !=null and specType != ''"> |
| | | and t.spec_type= #{specType} |
| | | </if> |
| | | <if test="specName !=null and specName != ''"> |
| | | and t.spec_name= #{specName} |
| | | </if> |
| | | <if test="specHoldplace !=null and specHoldplace != ''"> |
| | | and t.spec_holdplace= #{specHoldplace} |
| | | </if> |
| | | <if test="specValueType !=null and specValueType != ''"> |
| | | and t.spec_value_type= #{specValueType} |
| | | </if> |
| | | <if test="specCd !=null and specCd != ''"> |
| | | and t.spec_cd= #{specCd} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="specShow !=null and specShow != ''"> |
| | | and t.spec_show= #{specShow} |
| | | </if> |
| | | <if test="contractTypeId !=null and contractTypeId != ''"> |
| | | and t.contract_type_id= #{contractTypeId} |
| | | </if> |
| | | <if test="required !=null and required != ''"> |
| | | and t.required= #{required} |
| | | </if> |
| | | <if test="listShow !=null and listShow != ''"> |
| | | and t.list_show= #{listShow} |
| | | </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="updateContractTypeSpecInfo" parameterType="Map"> |
| | | update contract_type_spec t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="specType !=null and specType != ''"> |
| | | , t.spec_type= #{specType} |
| | | </if> |
| | | <if test="specName !=null and specName != ''"> |
| | | , t.spec_name= #{specName} |
| | | </if> |
| | | <if test="specHoldplace !=null and specHoldplace != ''"> |
| | | , t.spec_holdplace= #{specHoldplace} |
| | | </if> |
| | | <if test="specValueType !=null and specValueType != ''"> |
| | | , t.spec_value_type= #{specValueType} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | , t.store_id= #{storeId} |
| | | </if> |
| | | <if test="specShow !=null and specShow != ''"> |
| | | , t.spec_show= #{specShow} |
| | | </if> |
| | | <if test="contractTypeId !=null and contractTypeId != ''"> |
| | | , t.contract_type_id= #{contractTypeId} |
| | | </if> |
| | | <if test="required !=null and required != ''"> |
| | | , t.required= #{required} |
| | | </if> |
| | | <if test="listShow !=null and listShow != ''"> |
| | | , t.list_show= #{listShow} |
| | | </if> |
| | | where 1=1 |
| | | <if test="specCd !=null and specCd != ''"> |
| | | and t.spec_cd= #{specCd} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询合同类型规格数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryContractTypeSpecsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from contract_type_spec t |
| | | where 1 =1 |
| | | <if test="specType !=null and specType != ''"> |
| | | and t.spec_type= #{specType} |
| | | </if> |
| | | <if test="specName !=null and specName != ''"> |
| | | and t.spec_name= #{specName} |
| | | </if> |
| | | <if test="specHoldplace !=null and specHoldplace != ''"> |
| | | and t.spec_holdplace= #{specHoldplace} |
| | | </if> |
| | | <if test="specValueType !=null and specValueType != ''"> |
| | | and t.spec_value_type= #{specValueType} |
| | | </if> |
| | | <if test="specCd !=null and specCd != ''"> |
| | | and t.spec_cd= #{specCd} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="specShow !=null and specShow != ''"> |
| | | and t.spec_show= #{specShow} |
| | | </if> |
| | | <if test="contractTypeId !=null and contractTypeId != ''"> |
| | | and t.contract_type_id= #{contractTypeId} |
| | | </if> |
| | | <if test="required !=null and required != ''"> |
| | | and t.required= #{required} |
| | | </if> |
| | | <if test="listShow !=null and listShow != ''"> |
| | | and t.list_show= #{listShow} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | { |
| | | "autoMove": true, |
| | | "id": "contractTypeId", |
| | | "name": "contractType", |
| | | "desc": "合同类型", |
| | | "shareParam": "storeId", |
| | | "shareColumn": "store_id", |
| | | "id": "specCd", |
| | | "name": "contractTypeSpec", |
| | | "desc": "合同类型规格", |
| | | "shareParam": "specCd", |
| | | "shareColumn": "spec_cd", |
| | | "shareName": "store", |
| | | "tableName": "contract_type", |
| | | "tableName": "contract_type_spec", |
| | | "param": { |
| | | "specCd": "spec_cd", |
| | | "contractTypeId": "contract_type_id", |
| | | "typeName": "type_name", |
| | | "audit": "audit", |
| | | "storeId": "store_id", |
| | | "remark": "remark", |
| | | "specName": "spec_name", |
| | | "specHoldplace": "spec_holdplace", |
| | | "required": "required", |
| | | "specShow": "spec_show", |
| | | "specValueType": "spec_value_type", |
| | | "specType": "spec_type", |
| | | "listShow": "list_show", |
| | | "statusCd": "status_cd" |
| | | }, |
| | | "required": [ |
| | | { |
| | | "code": "typeName", |
| | | "code": "specCd", |
| | | "msg": "规格ID不能为空" |
| | | }, |
| | | { |
| | | "code": "contractTypeId", |
| | | "msg": "合同类型不能为空" |
| | | }, |
| | | { |
| | | "code": "audit", |
| | | "msg": "审核不能为空" |
| | | "code": "specName", |
| | | "msg": "规格名称不能为空" |
| | | },{ |
| | | "code": "specHoldplace", |
| | | "msg": "提示不能为空" |
| | | },{ |
| | | "code": "required", |
| | | "msg": "必填不能为空" |
| | | },{ |
| | | "code": "specShow", |
| | | "msg": "是否显示不能为空" |
| | | },{ |
| | | "code": "specValueType", |
| | | "msg": "规格值不能为空" |
| | | },{ |
| | | "code": "specType", |
| | | "msg": "规格类型不能为空" |
| | | },{ |
| | | "code": "listShow", |
| | | "msg": "是否list中显示不能为空" |
| | | } |
| | | ] |
| | | } |
| New file |
| | |
| | | { |
| | | "autoMove": true, |
| | | "id": "contractTypeId", |
| | | "name": "contractType", |
| | | "desc": "合同类型", |
| | | "shareParam": "storeId", |
| | | "shareColumn": "store_id", |
| | | "shareName": "store", |
| | | "tableName": "contract_type", |
| | | "param": { |
| | | "contractTypeId": "contract_type_id", |
| | | "typeName": "type_name", |
| | | "audit": "audit", |
| | | "storeId": "store_id", |
| | | "remark": "remark", |
| | | "statusCd": "status_cd" |
| | | }, |
| | | "required": [ |
| | | { |
| | | "code": "typeName", |
| | | "msg": "合同类型不能为空" |
| | | }, |
| | | { |
| | | "code": "audit", |
| | | "msg": "审核不能为空" |
| | | } |
| | | ] |
| | | } |
| | |
| | | { |
| | | "templateName": "合同类型", |
| | | "templateName":"合同类型属性", |
| | | "directories": "admin", |
| | | "templateCode": "contractType", |
| | | "templateKey": "contractTypeId", |
| | | "templateKeyName": "类型ID", |
| | | "searchCode": "contractTypeId", |
| | | "searchName": "类型ID", |
| | | "templateCode":"contractTypeSpec", |
| | | "templateKey":"specCd", |
| | | "templateKeyName":"规格", |
| | | "searchCode": "specCd", |
| | | "searchName": "规格", |
| | | "conditions": [ |
| | | { |
| | | "name": "类型名称", |
| | | "name": "规格名称", |
| | | "inputType": "input", |
| | | "code": "typeName", |
| | | "code": "specName", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "审核", |
| | | "name": "规格显示", |
| | | "inputType": "select", |
| | | "selectValue": "1001,2002,3003,4004", |
| | | "selectValueName": "物业审核,不审核,运营审核,代理商审核", |
| | | "code": "audit", |
| | | "selectValue":"Y,N", |
| | | "selectValueName":"显示,不显示", |
| | | "code": "specShow", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "类型编码", |
| | | "name": "规格", |
| | | "inputType": "input", |
| | | "code": "contractTypeId", |
| | | "code": "specCd", |
| | | "whereCondition": "equal" |
| | | } |
| | | ], |
| | | "columns": [ |
| | | "columns":[ |
| | | { |
| | | "code": "typeName", |
| | | "cnCode": "类型名称", |
| | | "desc": "必填,请填写合同类型名称", |
| | | "required": true, |
| | | "hasDefaultValue": false, |
| | | "code": "specName", |
| | | "cnCode":"规格名称", |
| | | "desc":"必填,请填写规格名称", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType": "input", |
| | | "limit": "maxLength", |
| | | "limitParam": "200", |
| | | "limitErrInfo": "类型名称不能超过64位", |
| | | "limit":"maxLength", |
| | | "limitParam":"64", |
| | | "limitErrInfo":"规格名称太长", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "audit", |
| | | "cnCode": "是否审核", |
| | | "desc": "必须,请选择是否审核", |
| | | "required": true, |
| | | "hasDefaultValue": false, |
| | | "selectValue": "1001,2002,3003,4004", |
| | | "selectValueName": "物业审核,不审核,运营审核,代理商审核", |
| | | "limit": "num", |
| | | "limitParam": "", |
| | | "limitErrInfo": "是否审核格式错误", |
| | | "code": "specHoldplace", |
| | | "cnCode":"说明", |
| | | "desc":"选填,请填写说明", |
| | | "required":false, |
| | | "hasDefaultValue":false, |
| | | "inputType": "input", |
| | | "limit":"maxLength", |
| | | "limitParam":"200", |
| | | "limitErrInfo":"说明不能超过500位", |
| | | "show": false |
| | | }, |
| | | { |
| | | "code":"required", |
| | | "cnCode":"必填", |
| | | "desc":"必填,请选择是否必填", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType": "select", |
| | | "selectValue":"Y,N", |
| | | "selectValueName":"是,否", |
| | | "limit":"", |
| | | "limitParam":"", |
| | | "limitErrInfo":"模板格式错误", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "remark", |
| | | "cnCode": "描述", |
| | | "desc": "选填,请填写描述", |
| | | "required": false, |
| | | "hasDefaultValue": false, |
| | | "inputType": "input", |
| | | "limit": "maxLength", |
| | | "limitParam": "200", |
| | | "limitErrInfo": "描述超过200位", |
| | | "code":"specShow", |
| | | "cnCode":"展示", |
| | | "desc":"必填,请选择是否添加编辑时展示", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType": "select", |
| | | "selectValue":"Y,N", |
| | | "selectValueName":"是,否", |
| | | "limit":"", |
| | | "limitParam":"", |
| | | "limitErrInfo":"模板格式错误", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"specValueType", |
| | | "cnCode":"值类型", |
| | | "desc":"必填,请选择值类型", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType": "select", |
| | | "selectValue":"1001,2002,3003", |
| | | "selectValueName":"字符串,整数,金额", |
| | | "limit":"num", |
| | | "limitParam":"", |
| | | "limitErrInfo":"值类型格式错误", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"specType", |
| | | "cnCode":"规格类型", |
| | | "desc":"必填,请选择规格类型", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType": "select", |
| | | "selectValue":"2233,3344", |
| | | "selectValueName":"input,select", |
| | | "limit":"num", |
| | | "limitParam":"", |
| | | "limitErrInfo":"规格类型错误", |
| | | "show": true |
| | | } |
| | | , |
| | | { |
| | | "code":"listShow", |
| | | "cnCode":"查询显示", |
| | | "desc":"必填,请选择查询显示", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType": "select", |
| | | "selectValue":"Y,N", |
| | | "selectValueName":"是,否", |
| | | "limit":"", |
| | | "limitParam":"", |
| | | "limitErrInfo":"规格类型错误", |
| | | "show": true |
| | | } |
| | | ] |
| New file |
| | |
| | | { |
| | | "templateName": "合同类型", |
| | | "directories": "admin", |
| | | "templateCode": "contractType", |
| | | "templateKey": "contractTypeId", |
| | | "templateKeyName": "类型ID", |
| | | "searchCode": "contractTypeId", |
| | | "searchName": "类型ID", |
| | | "conditions": [ |
| | | { |
| | | "name": "类型名称", |
| | | "inputType": "input", |
| | | "code": "typeName", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "审核", |
| | | "inputType": "select", |
| | | "selectValue": "1001,2002,3003,4004", |
| | | "selectValueName": "物业审核,不审核,运营审核,代理商审核", |
| | | "code": "audit", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "类型编码", |
| | | "inputType": "input", |
| | | "code": "contractTypeId", |
| | | "whereCondition": "equal" |
| | | } |
| | | ], |
| | | "columns": [ |
| | | { |
| | | "code": "typeName", |
| | | "cnCode": "类型名称", |
| | | "desc": "必填,请填写合同类型名称", |
| | | "required": true, |
| | | "hasDefaultValue": false, |
| | | "inputType": "input", |
| | | "limit": "maxLength", |
| | | "limitParam": "200", |
| | | "limitErrInfo": "类型名称不能超过64位", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "audit", |
| | | "cnCode": "是否审核", |
| | | "desc": "必须,请选择是否审核", |
| | | "required": true, |
| | | "hasDefaultValue": false, |
| | | "selectValue": "1001,2002,3003,4004", |
| | | "selectValueName": "物业审核,不审核,运营审核,代理商审核", |
| | | "limit": "num", |
| | | "limitParam": "", |
| | | "limitErrInfo": "是否审核格式错误", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "remark", |
| | | "cnCode": "描述", |
| | | "desc": "选填,请填写描述", |
| | | "required": false, |
| | | "hasDefaultValue": false, |
| | | "inputType": "input", |
| | | "limit": "maxLength", |
| | | "limitParam": "200", |
| | | "limitErrInfo": "描述超过200位", |
| | | "show": true |
| | | } |
| | | ] |
| | | } |
| New file |
| | |
| | | package com.java110.intf.store; |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.contractTypeSpec.ContractTypeSpecDto; |
| | | import com.java110.po.contractTypeSpec.ContractTypeSpecPo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName IContractTypeSpecInnerServiceSMO |
| | | * @Description 合同类型规格接口类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:04 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @FeignClient(name = "store-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/contractTypeSpecApi") |
| | | public interface IContractTypeSpecInnerServiceSMO { |
| | | |
| | | |
| | | @RequestMapping(value = "/saveContractTypeSpec", method = RequestMethod.POST) |
| | | public int saveContractTypeSpec(@RequestBody ContractTypeSpecPo contractTypeSpecPo); |
| | | |
| | | @RequestMapping(value = "/updateContractTypeSpec", method = RequestMethod.POST) |
| | | public int updateContractTypeSpec(@RequestBody ContractTypeSpecPo contractTypeSpecPo); |
| | | |
| | | @RequestMapping(value = "/deleteContractTypeSpec", method = RequestMethod.POST) |
| | | public int deleteContractTypeSpec(@RequestBody ContractTypeSpecPo contractTypeSpecPo); |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * @param contractTypeSpecDto 数据对象分享 |
| | | * @return ContractTypeSpecDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryContractTypeSpecs", method = RequestMethod.POST) |
| | | List<ContractTypeSpecDto> queryContractTypeSpecs(@RequestBody ContractTypeSpecDto contractTypeSpecDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param contractTypeSpecDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryContractTypeSpecsCount", method = RequestMethod.POST) |
| | | int queryContractTypeSpecsCount(@RequestBody ContractTypeSpecDto contractTypeSpecDto); |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.dto.contract.ContractDto; |
| | | import com.java110.dto.contractType.ContractTypeDto; |
| | | import com.java110.dto.contractTypeSpec.ContractTypeSpecDto; |
| | | import com.java110.po.contract.ContractPo; |
| | | import com.java110.po.contractType.ContractTypePo; |
| | | import com.java110.po.contractTypeSpec.ContractTypeSpecPo; |
| | | import com.java110.store.bmo.contract.IDeleteContractBMO; |
| | | import com.java110.store.bmo.contract.IGetContractBMO; |
| | | import com.java110.store.bmo.contract.ISaveContractBMO; |
| | |
| | | import com.java110.store.bmo.contractType.IGetContractTypeBMO; |
| | | import com.java110.store.bmo.contractType.ISaveContractTypeBMO; |
| | | import com.java110.store.bmo.contractType.IUpdateContractTypeBMO; |
| | | import com.java110.store.bmo.contractTypeSpec.IDeleteContractTypeSpecBMO; |
| | | import com.java110.store.bmo.contractTypeSpec.IGetContractTypeSpecBMO; |
| | | import com.java110.store.bmo.contractTypeSpec.ISaveContractTypeSpecBMO; |
| | | import com.java110.store.bmo.contractTypeSpec.IUpdateContractTypeSpecBMO; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private IGetContractTypeBMO getContractTypeBMOImpl; |
| | | |
| | | @Autowired |
| | | private ISaveContractTypeSpecBMO saveContractTypeSpecBMOImpl; |
| | | @Autowired |
| | | private IUpdateContractTypeSpecBMO updateContractTypeSpecBMOImpl; |
| | | @Autowired |
| | | private IDeleteContractTypeSpecBMO deleteContractTypeSpecBMOImpl; |
| | | |
| | | @Autowired |
| | | private IGetContractTypeSpecBMO getContractTypeSpecBMOImpl; |
| | | |
| | | /** |
| | | * 微信保存消息模板 |
| | |
| | | contractTypeDto.setStoreId(storeId); |
| | | return getContractTypeBMOImpl.get(contractTypeDto); |
| | | } |
| | | |
| | | /** |
| | | * 微信保存消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /contract/saveContractTypeSpec |
| | | * @path /app/contract/saveContractTypeSpec |
| | | */ |
| | | @RequestMapping(value = "/saveContractTypeSpec", method = RequestMethod.POST) |
| | | public ResponseEntity<String> saveContractTypeSpec(@RequestBody JSONObject reqJson, @RequestParam(value = "store-id") String storeId) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "specCd", "请求报文中未包含specCd"); |
| | | Assert.hasKeyAndValue(reqJson, "contractTypeId", "请求报文中未包含contractTypeId"); |
| | | Assert.hasKeyAndValue(reqJson, "specName", "请求报文中未包含specName"); |
| | | Assert.hasKeyAndValue(reqJson, "specHoldplace", "请求报文中未包含specHoldplace"); |
| | | Assert.hasKeyAndValue(reqJson, "required", "请求报文中未包含required"); |
| | | Assert.hasKeyAndValue(reqJson, "specShow", "请求报文中未包含specShow"); |
| | | Assert.hasKeyAndValue(reqJson, "specValueType", "请求报文中未包含specValueType"); |
| | | Assert.hasKeyAndValue(reqJson, "specType", "请求报文中未包含specType"); |
| | | Assert.hasKeyAndValue(reqJson, "listShow", "请求报文中未包含listShow"); |
| | | |
| | | |
| | | ContractTypeSpecPo contractTypeSpecPo = BeanConvertUtil.covertBean(reqJson, ContractTypeSpecPo.class); |
| | | contractTypeSpecPo.setStoreId(storeId); |
| | | return saveContractTypeSpecBMOImpl.save(contractTypeSpecPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信修改消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /contract/updateContractTypeSpec |
| | | * @path /app/contract/updateContractTypeSpec |
| | | */ |
| | | @RequestMapping(value = "/updateContractTypeSpec", method = RequestMethod.POST) |
| | | public ResponseEntity<String> updateContractTypeSpec(@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "specCd", "请求报文中未包含specCd"); |
| | | Assert.hasKeyAndValue(reqJson, "contractTypeId", "请求报文中未包含contractTypeId"); |
| | | Assert.hasKeyAndValue(reqJson, "specName", "请求报文中未包含specName"); |
| | | Assert.hasKeyAndValue(reqJson, "specHoldplace", "请求报文中未包含specHoldplace"); |
| | | Assert.hasKeyAndValue(reqJson, "required", "请求报文中未包含required"); |
| | | Assert.hasKeyAndValue(reqJson, "specShow", "请求报文中未包含specShow"); |
| | | Assert.hasKeyAndValue(reqJson, "specValueType", "请求报文中未包含specValueType"); |
| | | Assert.hasKeyAndValue(reqJson, "specType", "请求报文中未包含specType"); |
| | | Assert.hasKeyAndValue(reqJson, "listShow", "请求报文中未包含listShow"); |
| | | Assert.hasKeyAndValue(reqJson, "specCd", "specCd不能为空"); |
| | | |
| | | |
| | | ContractTypeSpecPo contractTypeSpecPo = BeanConvertUtil.covertBean(reqJson, ContractTypeSpecPo.class); |
| | | return updateContractTypeSpecBMOImpl.update(contractTypeSpecPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /contract/deleteContractTypeSpec |
| | | * @path /app/contract/deleteContractTypeSpec |
| | | */ |
| | | @RequestMapping(value = "/deleteContractTypeSpec", method = RequestMethod.POST) |
| | | public ResponseEntity<String> deleteContractTypeSpec(@RequestBody JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "specCd", "specCd不能为空"); |
| | | |
| | | |
| | | ContractTypeSpecPo contractTypeSpecPo = BeanConvertUtil.covertBean(reqJson, ContractTypeSpecPo.class); |
| | | return deleteContractTypeSpecBMOImpl.delete(contractTypeSpecPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @param storeId 小区ID |
| | | * @return |
| | | * @serviceCode /contract/queryContractTypeSpec |
| | | * @path /app/contract/queryContractTypeSpec |
| | | */ |
| | | @RequestMapping(value = "/queryContractTypeSpec", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryContractTypeSpec(@RequestParam(value = "store-id") String storeId, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | ContractTypeSpecDto contractTypeSpecDto = new ContractTypeSpecDto(); |
| | | contractTypeSpecDto.setPage(page); |
| | | contractTypeSpecDto.setRow(row); |
| | | contractTypeSpecDto.setStoreId(storeId); |
| | | return getContractTypeSpecBMOImpl.get(contractTypeSpecDto); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.store.bmo.contractTypeSpec; |
| | | |
| | | import com.java110.po.contractTypeSpec.ContractTypeSpecPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IDeleteContractTypeSpecBMO { |
| | | |
| | | |
| | | /** |
| | | * 修改合同类型规格 |
| | | * add by wuxw |
| | | * |
| | | * @param contractTypeSpecPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> delete(ContractTypeSpecPo contractTypeSpecPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.bmo.contractTypeSpec; |
| | | |
| | | import com.java110.dto.contractTypeSpec.ContractTypeSpecDto; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IGetContractTypeSpecBMO { |
| | | |
| | | |
| | | /** |
| | | * 查询合同类型规格 |
| | | * add by wuxw |
| | | * |
| | | * @param contractTypeSpecDto |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> get(ContractTypeSpecDto contractTypeSpecDto); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.bmo.contractTypeSpec; |
| | | |
| | | import com.java110.po.contractTypeSpec.ContractTypeSpecPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface ISaveContractTypeSpecBMO { |
| | | |
| | | |
| | | /** |
| | | * 添加合同类型规格 |
| | | * add by wuxw |
| | | * |
| | | * @param contractTypeSpecPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> save(ContractTypeSpecPo contractTypeSpecPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.bmo.contractTypeSpec; |
| | | |
| | | import com.java110.po.contractTypeSpec.ContractTypeSpecPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IUpdateContractTypeSpecBMO { |
| | | |
| | | |
| | | /** |
| | | * 修改合同类型规格 |
| | | * add by wuxw |
| | | * |
| | | * @param contractTypeSpecPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> update(ContractTypeSpecPo contractTypeSpecPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.bmo.contractTypeSpec.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.intf.store.IContractTypeSpecInnerServiceSMO; |
| | | import com.java110.po.contractTypeSpec.ContractTypeSpecPo; |
| | | import com.java110.store.bmo.contractTypeSpec.IDeleteContractTypeSpecBMO; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("deleteContractTypeSpecBMOImpl") |
| | | public class DeleteContractTypeSpecBMOImpl implements IDeleteContractTypeSpecBMO { |
| | | |
| | | @Autowired |
| | | private IContractTypeSpecInnerServiceSMO contractTypeSpecInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param contractTypeSpecPo 数据 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> delete(ContractTypeSpecPo contractTypeSpecPo) { |
| | | |
| | | int flag = contractTypeSpecInnerServiceSMOImpl.deleteContractTypeSpec(contractTypeSpecPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.bmo.contractTypeSpec.impl; |
| | | |
| | | import com.java110.dto.contractTypeSpec.ContractTypeSpecDto; |
| | | import com.java110.intf.store.IContractTypeSpecInnerServiceSMO; |
| | | import com.java110.store.bmo.contractTypeSpec.IGetContractTypeSpecBMO; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Service("getContractTypeSpecBMOImpl") |
| | | public class GetContractTypeSpecBMOImpl implements IGetContractTypeSpecBMO { |
| | | |
| | | @Autowired |
| | | private IContractTypeSpecInnerServiceSMO contractTypeSpecInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param contractTypeSpecDto |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public ResponseEntity<String> get(ContractTypeSpecDto contractTypeSpecDto) { |
| | | |
| | | |
| | | int count = contractTypeSpecInnerServiceSMOImpl.queryContractTypeSpecsCount(contractTypeSpecDto); |
| | | |
| | | List<ContractTypeSpecDto> contractTypeSpecDtos = null; |
| | | if (count > 0) { |
| | | contractTypeSpecDtos = contractTypeSpecInnerServiceSMOImpl.queryContractTypeSpecs(contractTypeSpecDto); |
| | | } else { |
| | | contractTypeSpecDtos = new ArrayList<>(); |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) contractTypeSpecDto.getRow()), count, contractTypeSpecDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.bmo.contractTypeSpec.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.intf.store.IContractTypeSpecInnerServiceSMO; |
| | | import com.java110.po.contractTypeSpec.ContractTypeSpecPo; |
| | | import com.java110.store.bmo.contractTypeSpec.ISaveContractTypeSpecBMO; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("saveContractTypeSpecBMOImpl") |
| | | public class SaveContractTypeSpecBMOImpl implements ISaveContractTypeSpecBMO { |
| | | |
| | | @Autowired |
| | | private IContractTypeSpecInnerServiceSMO contractTypeSpecInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * 添加小区信息 |
| | | * |
| | | * @param contractTypeSpecPo |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> save(ContractTypeSpecPo contractTypeSpecPo) { |
| | | |
| | | contractTypeSpecPo.setSpecCd(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_specCd)); |
| | | int flag = contractTypeSpecInnerServiceSMOImpl.saveContractTypeSpec(contractTypeSpecPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.bmo.contractTypeSpec.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.intf.store.IContractTypeSpecInnerServiceSMO; |
| | | import com.java110.po.contractTypeSpec.ContractTypeSpecPo; |
| | | import com.java110.store.bmo.contractTypeSpec.IUpdateContractTypeSpecBMO; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("updateContractTypeSpecBMOImpl") |
| | | public class UpdateContractTypeSpecBMOImpl implements IUpdateContractTypeSpecBMO { |
| | | |
| | | @Autowired |
| | | private IContractTypeSpecInnerServiceSMO contractTypeSpecInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param contractTypeSpecPo |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> update(ContractTypeSpecPo contractTypeSpecPo) { |
| | | |
| | | int flag = contractTypeSpecInnerServiceSMOImpl.updateContractTypeSpec(contractTypeSpecPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.dao; |
| | | |
| | | |
| | | import com.java110.utils.exception.DAOException; |
| | | import com.java110.entity.merchant.BoMerchant; |
| | | import com.java110.entity.merchant.BoMerchantAttr; |
| | | import com.java110.entity.merchant.Merchant; |
| | | import com.java110.entity.merchant.MerchantAttr; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 合同类型规格组件内部之间使用,没有给外围系统提供服务能力 |
| | | * 合同类型规格服务接口类,要求全部以字符串传输,方便微服务化 |
| | | * 新建客户,修改客户,删除客户,查询客户等功能 |
| | | * |
| | | * Created by wuxw on 2016/12/27. |
| | | */ |
| | | public interface IContractTypeSpecServiceDao { |
| | | |
| | | |
| | | /** |
| | | * 保存 合同类型规格信息 |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void saveContractTypeSpecInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询合同类型规格信息(instance过程) |
| | | * 根据bId 查询合同类型规格信息 |
| | | * @param info bId 信息 |
| | | * @return 合同类型规格信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getContractTypeSpecInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改合同类型规格信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void updateContractTypeSpecInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询合同类型规格总数 |
| | | * |
| | | * @param info 合同类型规格信息 |
| | | * @return 合同类型规格数量 |
| | | */ |
| | | int queryContractTypeSpecsCount(Map info); |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.dao.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.DAOException; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | import com.java110.store.dao.IContractTypeSpecServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 合同类型规格服务 与数据库交互 |
| | | * Created by wuxw on 2017/4/5. |
| | | */ |
| | | @Service("contractTypeSpecServiceDaoImpl") |
| | | //@Transactional |
| | | public class ContractTypeSpecServiceDaoImpl extends BaseServiceDao implements IContractTypeSpecServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(ContractTypeSpecServiceDaoImpl.class); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存合同类型规格信息 到 instance |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveContractTypeSpecInfo(Map info) throws DAOException { |
| | | logger.debug("保存合同类型规格信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("contractTypeSpecServiceDaoImpl.saveContractTypeSpecInfo",info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存合同类型规格信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询合同类型规格信息(instance) |
| | | * @param info bId 信息 |
| | | * @return List<Map> |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public List<Map> getContractTypeSpecInfo(Map info) throws DAOException { |
| | | logger.debug("查询合同类型规格信息 入参 info : {}",info); |
| | | |
| | | List<Map> businessContractTypeSpecInfos = sqlSessionTemplate.selectList("contractTypeSpecServiceDaoImpl.getContractTypeSpecInfo",info); |
| | | |
| | | return businessContractTypeSpecInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改合同类型规格信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void updateContractTypeSpecInfo(Map info) throws DAOException { |
| | | logger.debug("修改合同类型规格信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("contractTypeSpecServiceDaoImpl.updateContractTypeSpecInfo",info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改合同类型规格信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询合同类型规格数量 |
| | | * @param info 合同类型规格信息 |
| | | * @return 合同类型规格数量 |
| | | */ |
| | | @Override |
| | | public int queryContractTypeSpecsCount(Map info) { |
| | | logger.debug("查询合同类型规格数据 入参 info : {}",info); |
| | | |
| | | List<Map> businessContractTypeSpecInfos = sqlSessionTemplate.selectList("contractTypeSpecServiceDaoImpl.queryContractTypeSpecsCount", info); |
| | | if (businessContractTypeSpecInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessContractTypeSpecInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.smo.impl; |
| | | |
| | | |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.contractTypeSpec.ContractTypeSpecDto; |
| | | import com.java110.intf.store.IContractTypeSpecInnerServiceSMO; |
| | | import com.java110.po.contractTypeSpec.ContractTypeSpecPo; |
| | | import com.java110.store.dao.IContractTypeSpecServiceDao; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName FloorInnerServiceSMOImpl |
| | | * @Description 合同类型规格内部服务实现类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:20 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @RestController |
| | | public class ContractTypeSpecInnerServiceSMOImpl extends BaseServiceSMO implements IContractTypeSpecInnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IContractTypeSpecServiceDao contractTypeSpecServiceDaoImpl; |
| | | |
| | | |
| | | @Override |
| | | public int saveContractTypeSpec(@RequestBody ContractTypeSpecPo contractTypeSpecPo) { |
| | | int saveFlag = 1; |
| | | contractTypeSpecServiceDaoImpl.saveContractTypeSpecInfo(BeanConvertUtil.beanCovertMap(contractTypeSpecPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int updateContractTypeSpec(@RequestBody ContractTypeSpecPo contractTypeSpecPo) { |
| | | int saveFlag = 1; |
| | | contractTypeSpecServiceDaoImpl.updateContractTypeSpecInfo(BeanConvertUtil.beanCovertMap(contractTypeSpecPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int deleteContractTypeSpec(@RequestBody ContractTypeSpecPo contractTypeSpecPo) { |
| | | int saveFlag = 1; |
| | | contractTypeSpecPo.setStatusCd("1"); |
| | | contractTypeSpecServiceDaoImpl.updateContractTypeSpecInfo(BeanConvertUtil.beanCovertMap(contractTypeSpecPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public List<ContractTypeSpecDto> queryContractTypeSpecs(@RequestBody ContractTypeSpecDto contractTypeSpecDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = contractTypeSpecDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | contractTypeSpecDto.setPage((page - 1) * contractTypeSpecDto.getRow()); |
| | | } |
| | | |
| | | List<ContractTypeSpecDto> contractTypeSpecs = BeanConvertUtil.covertBeanList(contractTypeSpecServiceDaoImpl.getContractTypeSpecInfo(BeanConvertUtil.beanCovertMap(contractTypeSpecDto)), ContractTypeSpecDto.class); |
| | | |
| | | return contractTypeSpecs; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int queryContractTypeSpecsCount(@RequestBody ContractTypeSpecDto contractTypeSpecDto) { |
| | | return contractTypeSpecServiceDaoImpl.queryContractTypeSpecsCount(BeanConvertUtil.beanCovertMap(contractTypeSpecDto)); |
| | | } |
| | | |
| | | public IContractTypeSpecServiceDao getContractTypeSpecServiceDaoImpl() { |
| | | return contractTypeSpecServiceDaoImpl; |
| | | } |
| | | |
| | | public void setContractTypeSpecServiceDaoImpl(IContractTypeSpecServiceDao contractTypeSpecServiceDaoImpl) { |
| | | this.contractTypeSpecServiceDaoImpl = contractTypeSpecServiceDaoImpl; |
| | | } |
| | | } |