| New file |
| | |
| | | package com.java110.dto.contractChangePlan; |
| | | |
| | | 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 ContractChangePlanDto extends PageDto implements Serializable { |
| | | |
| | | private String planType; |
| | | private String contractId; |
| | | private String planId; |
| | | private String remark; |
| | | private String changePerson; |
| | | private String state; |
| | | private String storeId; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getPlanType() { |
| | | return planType; |
| | | } |
| | | public void setPlanType(String planType) { |
| | | this.planType = planType; |
| | | } |
| | | public String getContractId() { |
| | | return contractId; |
| | | } |
| | | public void setContractId(String contractId) { |
| | | this.contractId = contractId; |
| | | } |
| | | public String getPlanId() { |
| | | return planId; |
| | | } |
| | | public void setPlanId(String planId) { |
| | | this.planId = planId; |
| | | } |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | public String getChangePerson() { |
| | | return changePerson; |
| | | } |
| | | public void setChangePerson(String changePerson) { |
| | | this.changePerson = changePerson; |
| | | } |
| | | public String getState() { |
| | | return state; |
| | | } |
| | | public void setState(String state) { |
| | | this.state = state; |
| | | } |
| | | public String getStoreId() { |
| | | return storeId; |
| | | } |
| | | public void setStoreId(String storeId) { |
| | | this.storeId = storeId; |
| | | } |
| | | |
| | | |
| | | 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.contractChangePlan; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | public class ContractChangePlanPo implements Serializable { |
| | | |
| | | private String planType; |
| | | private String contractId; |
| | | private String planId; |
| | | private String remark; |
| | | private String statusCd = "0"; |
| | | private String changePerson; |
| | | private String state; |
| | | private String storeId; |
| | | public String getPlanType() { |
| | | return planType; |
| | | } |
| | | public void setPlanType(String planType) { |
| | | this.planType = planType; |
| | | } |
| | | public String getContractId() { |
| | | return contractId; |
| | | } |
| | | public void setContractId(String contractId) { |
| | | this.contractId = contractId; |
| | | } |
| | | public String getPlanId() { |
| | | return planId; |
| | | } |
| | | public void setPlanId(String planId) { |
| | | this.planId = planId; |
| | | } |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | public String getChangePerson() { |
| | | return changePerson; |
| | | } |
| | | public void setChangePerson(String changePerson) { |
| | | this.changePerson = changePerson; |
| | | } |
| | | public String getState() { |
| | | return state; |
| | | } |
| | | public void setState(String state) { |
| | | this.state = state; |
| | | } |
| | | public String getStoreId() { |
| | | return storeId; |
| | | } |
| | | public void setStoreId(String storeId) { |
| | | this.storeId = storeId; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | public static final String CODE_PREFIX_beId = "22"; |
| | | public static final String CODE_PREFIX_collectionId = "23"; |
| | | public static final String CODE_PREFIX_authId = "23"; |
| | | public static final String CODE_PREFIX_planId = "24"; |
| | | |
| | | |
| | | |
| 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="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> |
| | | |
| | | |
| | | |
| | | <!-- 查询合同变更计划信息 add by wuxw 2018-07-03 --> |
| | | <select id="getContractChangePlanInfo" parameterType="Map" resultType="Map"> |
| | | select t.plan_type,t.plan_type planType,t.contract_id,t.contract_id contractId,t.plan_id,t.plan_id planId,t.remark,t.status_cd,t.status_cd statusCd,t.change_person,t.change_person changePerson,t.state,t.store_id,t.store_id storeId |
| | | from contract_change_plan t |
| | | where 1 =1 |
| | | <if test="planType !=null and planType != ''"> |
| | | and t.plan_type= #{planType} |
| | | </if> |
| | | <if test="contractId !=null and contractId != ''"> |
| | | and t.contract_id= #{contractId} |
| | | </if> |
| | | <if test="planId !=null and planId != ''"> |
| | | and t.plan_id= #{planId} |
| | | </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="changePerson !=null and changePerson != ''"> |
| | | and t.change_person= #{changePerson} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </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"> |
| | | update contract_change_plan t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="planType !=null and planType != ''"> |
| | | , t.plan_type= #{planType} |
| | | </if> |
| | | <if test="contractId !=null and contractId != ''"> |
| | | , t.contract_id= #{contractId} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | , t.remark= #{remark} |
| | | </if> |
| | | <if test="changePerson !=null and changePerson != ''"> |
| | | , t.change_person= #{changePerson} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | , t.state= #{state} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | , t.store_id= #{storeId} |
| | | </if> |
| | | where 1=1 <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 |
| | | where 1 =1 |
| | | <if test="planType !=null and planType != ''"> |
| | | and t.plan_type= #{planType} |
| | | </if> |
| | | <if test="contractId !=null and contractId != ''"> |
| | | and t.contract_id= #{contractId} |
| | | </if> |
| | | <if test="planId !=null and planId != ''"> |
| | | and t.plan_id= #{planId} |
| | | </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="changePerson !=null and changePerson != ''"> |
| | | and t.change_person= #{changePerson} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | { |
| | | "autoMove": true, |
| | | "id": "auditId", |
| | | "name": "workflowAuditMessage", |
| | | "desc": "流程审核表", |
| | | "shareParam": "shareId", |
| | | "shareColumn": "share_id", |
| | | "shareName": "common", |
| | | "tableName": "workflow_audit_message", |
| | | "id": "planId", |
| | | "name": "contractChangePlan", |
| | | "desc": "合同变更计划", |
| | | "shareParam": "storeId", |
| | | "shareColumn": "store_id", |
| | | "shareName": "store", |
| | | "tableName": "contract_change_plan", |
| | | "param": { |
| | | "auditId": "audit_id", |
| | | "businessType": "business_type", |
| | | "businessKey": "business_key", |
| | | "auditPerson": "audit_person", |
| | | "auditPersonId": "audit_person_id", |
| | | "auditLink": "audit_link", |
| | | "planId": "plan_id", |
| | | "contractId": "contract_id", |
| | | "planType": "plan_type", |
| | | "changePerson": "change_person", |
| | | "remark": "remark", |
| | | "state": "state", |
| | | "message": "message", |
| | | "shareId": "share_id", |
| | | "shareType": "share_type", |
| | | "preAuditId": "pre_audit_id", |
| | | "storeId": "store_id", |
| | | "statusCd": "status_cd" |
| | | }, |
| | | "required": [ |
| | | { |
| | | "code": "businessKey", |
| | | "msg": "业务不能为空" |
| | | "code": "planType", |
| | | "msg": "变更类型不能为空" |
| | | }, |
| | | { |
| | | "code": "auditPersonId", |
| | | "msg": "审核人不能为空" |
| | | "code": "changePerson", |
| | | "msg": "变更人不能为空" |
| | | }, |
| | | { |
| | | "code": "state", |
| | | "msg": "审核状态不能为空" |
| | | }, |
| | | { |
| | | "code": "message", |
| | | "msg": "审核意见不能为空" |
| | | "code": "storeId", |
| | | "msg": "商户不能为空" |
| | | } |
| | | ] |
| | | } |
| New file |
| | |
| | | package com.java110.intf.store; |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.contractChangePlan.ContractChangePlanDto; |
| | | import com.java110.po.contractChangePlan.ContractChangePlanPo; |
| | | 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 IContractChangePlanInnerServiceSMO |
| | | * @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("/contractChangePlanApi") |
| | | public interface IContractChangePlanInnerServiceSMO { |
| | | |
| | | |
| | | @RequestMapping(value = "/saveContractChangePlan", method = RequestMethod.POST) |
| | | public int saveContractChangePlan(@RequestBody ContractChangePlanPo contractChangePlanPo); |
| | | |
| | | @RequestMapping(value = "/updateContractChangePlan", method = RequestMethod.POST) |
| | | public int updateContractChangePlan(@RequestBody ContractChangePlanPo contractChangePlanPo); |
| | | |
| | | @RequestMapping(value = "/deleteContractChangePlan", method = RequestMethod.POST) |
| | | public int deleteContractChangePlan(@RequestBody ContractChangePlanPo contractChangePlanPo); |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * |
| | | * @param contractChangePlanDto 数据对象分享 |
| | | * @return ContractChangePlanDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryContractChangePlans", method = RequestMethod.POST) |
| | | List<ContractChangePlanDto> queryContractChangePlans(@RequestBody ContractChangePlanDto contractChangePlanDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param contractChangePlanDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryContractChangePlansCount", method = RequestMethod.POST) |
| | | int queryContractChangePlansCount(@RequestBody ContractChangePlanDto contractChangePlanDto); |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.dto.contract.ContractDto; |
| | | import com.java110.dto.contractAttr.ContractAttrDto; |
| | | import com.java110.dto.contractChangePlan.ContractChangePlanDto; |
| | | import com.java110.dto.contractType.ContractTypeDto; |
| | | import com.java110.dto.contractTypeSpec.ContractTypeSpecDto; |
| | | import com.java110.dto.contractTypeTemplate.ContractTypeTemplateDto; |
| | | import com.java110.po.contract.ContractPo; |
| | | import com.java110.po.contractAttr.ContractAttrPo; |
| | | import com.java110.po.contractChangePlan.ContractChangePlanPo; |
| | | import com.java110.po.contractType.ContractTypePo; |
| | | import com.java110.po.contractTypeSpec.ContractTypeSpecPo; |
| | | import com.java110.po.contractTypeTemplate.ContractTypeTemplatePo; |
| | |
| | | import com.java110.store.bmo.contractAttr.IGetContractAttrBMO; |
| | | import com.java110.store.bmo.contractAttr.ISaveContractAttrBMO; |
| | | import com.java110.store.bmo.contractAttr.IUpdateContractAttrBMO; |
| | | import com.java110.store.bmo.contractChangePlan.IDeleteContractChangePlanBMO; |
| | | import com.java110.store.bmo.contractChangePlan.IGetContractChangePlanBMO; |
| | | import com.java110.store.bmo.contractChangePlan.ISaveContractChangePlanBMO; |
| | | import com.java110.store.bmo.contractChangePlan.IUpdateContractChangePlanBMO; |
| | | import com.java110.store.bmo.contractType.IDeleteContractTypeBMO; |
| | | import com.java110.store.bmo.contractType.IGetContractTypeBMO; |
| | | import com.java110.store.bmo.contractType.ISaveContractTypeBMO; |
| | |
| | | |
| | | @Autowired |
| | | private IGetContractTypeTemplateBMO getContractTypeTemplateBMOImpl; |
| | | |
| | | |
| | | @Autowired |
| | | private ISaveContractChangePlanBMO saveContractChangePlanBMOImpl; |
| | | @Autowired |
| | | private IUpdateContractChangePlanBMO updateContractChangePlanBMOImpl; |
| | | @Autowired |
| | | private IDeleteContractChangePlanBMO deleteContractChangePlanBMOImpl; |
| | | |
| | | @Autowired |
| | | private IGetContractChangePlanBMO getContractChangePlanBMOImpl; |
| | | |
| | | /** |
| | | * 微信保存消息模板 |
| | |
| | | return getContractTypeTemplateBMOImpl.get(contractTypeTemplateDto); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 微信保存消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /contract/saveContractChangePlan |
| | | * @path /app/contract/saveContractChangePlan |
| | | */ |
| | | @RequestMapping(value = "/saveContractChangePlan", method = RequestMethod.POST) |
| | | public ResponseEntity<String> saveContractChangePlan(@RequestHeader(value = "store-id") String storeId, |
| | | @RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "planType", "请求报文中未包含planType"); |
| | | Assert.hasKeyAndValue(reqJson, "changePerson", "请求报文中未包含changePerson"); |
| | | Assert.hasKeyAndValue(reqJson, "state", "请求报文中未包含state"); |
| | | Assert.hasKeyAndValue(reqJson, "storeId", "请求报文中未包含storeId"); |
| | | |
| | | |
| | | ContractChangePlanPo contractChangePlanPo = BeanConvertUtil.covertBean(reqJson, ContractChangePlanPo.class); |
| | | contractChangePlanPo.setStoreId(storeId); |
| | | return saveContractChangePlanBMOImpl.save(contractChangePlanPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信修改消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /contract/updateContractChangePlan |
| | | * @path /app/contract/updateContractChangePlan |
| | | */ |
| | | @RequestMapping(value = "/updateContractChangePlan", method = RequestMethod.POST) |
| | | public ResponseEntity<String> updateContractChangePlan(@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "planType", "请求报文中未包含planType"); |
| | | Assert.hasKeyAndValue(reqJson, "changePerson", "请求报文中未包含changePerson"); |
| | | Assert.hasKeyAndValue(reqJson, "state", "请求报文中未包含state"); |
| | | Assert.hasKeyAndValue(reqJson, "storeId", "请求报文中未包含storeId"); |
| | | Assert.hasKeyAndValue(reqJson, "planId", "planId不能为空"); |
| | | |
| | | |
| | | ContractChangePlanPo contractChangePlanPo = BeanConvertUtil.covertBean(reqJson, ContractChangePlanPo.class); |
| | | return updateContractChangePlanBMOImpl.update(contractChangePlanPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /contract/deleteContractChangePlan |
| | | * @path /app/contract/deleteContractChangePlan |
| | | */ |
| | | @RequestMapping(value = "/deleteContractChangePlan", method = RequestMethod.POST) |
| | | public ResponseEntity<String> deleteContractChangePlan(@RequestBody JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "planId", "planId不能为空"); |
| | | |
| | | |
| | | ContractChangePlanPo contractChangePlanPo = BeanConvertUtil.covertBean(reqJson, ContractChangePlanPo.class); |
| | | return deleteContractChangePlanBMOImpl.delete(contractChangePlanPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @param storeId 商户ID |
| | | * @return |
| | | * @serviceCode /contract/queryContractChangePlan |
| | | * @path /app/contract/queryContractChangePlan |
| | | */ |
| | | @RequestMapping(value = "/queryContractChangePlan", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryContractChangePlan(@RequestHeader(value = "store-id") String storeId, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | ContractChangePlanDto contractChangePlanDto = new ContractChangePlanDto(); |
| | | contractChangePlanDto.setPage(page); |
| | | contractChangePlanDto.setRow(row); |
| | | contractChangePlanDto.setStoreId(storeId); |
| | | return getContractChangePlanBMOImpl.get(contractChangePlanDto); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.bmo.contractChangePlan; |
| | | import com.java110.po.contractChangePlan.ContractChangePlanPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IDeleteContractChangePlanBMO { |
| | | |
| | | |
| | | /** |
| | | * 修改合同变更计划 |
| | | * add by wuxw |
| | | * @param contractChangePlanPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> delete(ContractChangePlanPo contractChangePlanPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.bmo.contractChangePlan; |
| | | import com.java110.dto.contractChangePlan.ContractChangePlanDto; |
| | | import org.springframework.http.ResponseEntity; |
| | | public interface IGetContractChangePlanBMO { |
| | | |
| | | |
| | | /** |
| | | * 查询合同变更计划 |
| | | * add by wuxw |
| | | * @param contractChangePlanDto |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> get(ContractChangePlanDto contractChangePlanDto); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.bmo.contractChangePlan; |
| | | |
| | | import com.java110.po.contractChangePlan.ContractChangePlanPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | public interface ISaveContractChangePlanBMO { |
| | | |
| | | |
| | | /** |
| | | * 添加合同变更计划 |
| | | * add by wuxw |
| | | * @param contractChangePlanPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> save(ContractChangePlanPo contractChangePlanPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.bmo.contractChangePlan; |
| | | import com.java110.po.contractChangePlan.ContractChangePlanPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IUpdateContractChangePlanBMO { |
| | | |
| | | |
| | | /** |
| | | * 修改合同变更计划 |
| | | * add by wuxw |
| | | * @param contractChangePlanPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> update(ContractChangePlanPo contractChangePlanPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.bmo.contractChangePlan.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.intf.store.IContractChangePlanInnerServiceSMO; |
| | | import com.java110.po.contractChangePlan.ContractChangePlanPo; |
| | | import com.java110.store.bmo.contractChangePlan.IDeleteContractChangePlanBMO; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("deleteContractChangePlanBMOImpl") |
| | | public class DeleteContractChangePlanBMOImpl implements IDeleteContractChangePlanBMO { |
| | | |
| | | @Autowired |
| | | private IContractChangePlanInnerServiceSMO contractChangePlanInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param contractChangePlanPo 数据 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> delete(ContractChangePlanPo contractChangePlanPo) { |
| | | |
| | | int flag = contractChangePlanInnerServiceSMOImpl.deleteContractChangePlan(contractChangePlanPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.bmo.contractChangePlan.impl; |
| | | |
| | | import com.java110.dto.contractChangePlan.ContractChangePlanDto; |
| | | import com.java110.intf.store.IContractChangePlanInnerServiceSMO; |
| | | import com.java110.store.bmo.contractChangePlan.IGetContractChangePlanBMO; |
| | | 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("getContractChangePlanBMOImpl") |
| | | public class GetContractChangePlanBMOImpl implements IGetContractChangePlanBMO { |
| | | |
| | | @Autowired |
| | | private IContractChangePlanInnerServiceSMO contractChangePlanInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param contractChangePlanDto |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public ResponseEntity<String> get(ContractChangePlanDto contractChangePlanDto) { |
| | | |
| | | |
| | | int count = contractChangePlanInnerServiceSMOImpl.queryContractChangePlansCount(contractChangePlanDto); |
| | | |
| | | List<ContractChangePlanDto> contractChangePlanDtos = null; |
| | | if (count > 0) { |
| | | contractChangePlanDtos = contractChangePlanInnerServiceSMOImpl.queryContractChangePlans(contractChangePlanDto); |
| | | } else { |
| | | contractChangePlanDtos = new ArrayList<>(); |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) contractChangePlanDto.getRow()), count, contractChangePlanDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.bmo.contractChangePlan.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.intf.store.IContractChangePlanInnerServiceSMO; |
| | | import com.java110.po.contractChangePlan.ContractChangePlanPo; |
| | | import com.java110.store.bmo.contractChangePlan.ISaveContractChangePlanBMO; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("saveContractChangePlanBMOImpl") |
| | | public class SaveContractChangePlanBMOImpl implements ISaveContractChangePlanBMO { |
| | | |
| | | @Autowired |
| | | private IContractChangePlanInnerServiceSMO contractChangePlanInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * 添加小区信息 |
| | | * |
| | | * @param contractChangePlanPo |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> save(ContractChangePlanPo contractChangePlanPo) { |
| | | |
| | | contractChangePlanPo.setPlanId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_planId)); |
| | | int flag = contractChangePlanInnerServiceSMOImpl.saveContractChangePlan(contractChangePlanPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.bmo.contractChangePlan.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.intf.store.IContractChangePlanInnerServiceSMO; |
| | | import com.java110.po.contractChangePlan.ContractChangePlanPo; |
| | | import com.java110.store.bmo.contractChangePlan.IUpdateContractChangePlanBMO; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("updateContractChangePlanBMOImpl") |
| | | public class UpdateContractChangePlanBMOImpl implements IUpdateContractChangePlanBMO { |
| | | |
| | | @Autowired |
| | | private IContractChangePlanInnerServiceSMO contractChangePlanInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param contractChangePlanPo |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> update(ContractChangePlanPo contractChangePlanPo) { |
| | | |
| | | int flag = contractChangePlanInnerServiceSMOImpl.updateContractChangePlan(contractChangePlanPo); |
| | | |
| | | 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 IContractChangePlanServiceDao { |
| | | |
| | | |
| | | /** |
| | | * 保存 合同变更计划信息 |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void saveContractChangePlanInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询合同变更计划信息(instance过程) |
| | | * 根据bId 查询合同变更计划信息 |
| | | * @param info bId 信息 |
| | | * @return 合同变更计划信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getContractChangePlanInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改合同变更计划信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void updateContractChangePlanInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询合同变更计划总数 |
| | | * |
| | | * @param info 合同变更计划信息 |
| | | * @return 合同变更计划数量 |
| | | */ |
| | | int queryContractChangePlansCount(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.IContractChangePlanServiceDao; |
| | | 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("contractChangePlanServiceDaoImpl") |
| | | //@Transactional |
| | | public class ContractChangePlanServiceDaoImpl extends BaseServiceDao implements IContractChangePlanServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(ContractChangePlanServiceDaoImpl.class); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存合同变更计划信息 到 instance |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveContractChangePlanInfo(Map info) throws DAOException { |
| | | logger.debug("保存合同变更计划信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("contractChangePlanServiceDaoImpl.saveContractChangePlanInfo",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> getContractChangePlanInfo(Map info) throws DAOException { |
| | | logger.debug("查询合同变更计划信息 入参 info : {}",info); |
| | | |
| | | List<Map> businessContractChangePlanInfos = sqlSessionTemplate.selectList("contractChangePlanServiceDaoImpl.getContractChangePlanInfo",info); |
| | | |
| | | return businessContractChangePlanInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改合同变更计划信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void updateContractChangePlanInfo(Map info) throws DAOException { |
| | | logger.debug("修改合同变更计划信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("contractChangePlanServiceDaoImpl.updateContractChangePlanInfo",info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改合同变更计划信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询合同变更计划数量 |
| | | * @param info 合同变更计划信息 |
| | | * @return 合同变更计划数量 |
| | | */ |
| | | @Override |
| | | public int queryContractChangePlansCount(Map info) { |
| | | logger.debug("查询合同变更计划数据 入参 info : {}",info); |
| | | |
| | | List<Map> businessContractChangePlanInfos = sqlSessionTemplate.selectList("contractChangePlanServiceDaoImpl.queryContractChangePlansCount", info); |
| | | if (businessContractChangePlanInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessContractChangePlanInfos.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.contractChangePlan.ContractChangePlanDto; |
| | | import com.java110.intf.store.IContractChangePlanInnerServiceSMO; |
| | | import com.java110.po.contractChangePlan.ContractChangePlanPo; |
| | | import com.java110.store.dao.IContractChangePlanServiceDao; |
| | | 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 ContractChangePlanInnerServiceSMOImpl extends BaseServiceSMO implements IContractChangePlanInnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IContractChangePlanServiceDao contractChangePlanServiceDaoImpl; |
| | | |
| | | |
| | | @Override |
| | | public int saveContractChangePlan(@RequestBody ContractChangePlanPo contractChangePlanPo) { |
| | | int saveFlag = 1; |
| | | contractChangePlanServiceDaoImpl.saveContractChangePlanInfo(BeanConvertUtil.beanCovertMap(contractChangePlanPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int updateContractChangePlan(@RequestBody ContractChangePlanPo contractChangePlanPo) { |
| | | int saveFlag = 1; |
| | | contractChangePlanServiceDaoImpl.updateContractChangePlanInfo(BeanConvertUtil.beanCovertMap(contractChangePlanPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int deleteContractChangePlan(@RequestBody ContractChangePlanPo contractChangePlanPo) { |
| | | int saveFlag = 1; |
| | | contractChangePlanPo.setStatusCd("1"); |
| | | contractChangePlanServiceDaoImpl.updateContractChangePlanInfo(BeanConvertUtil.beanCovertMap(contractChangePlanPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public List<ContractChangePlanDto> queryContractChangePlans(@RequestBody ContractChangePlanDto contractChangePlanDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = contractChangePlanDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | contractChangePlanDto.setPage((page - 1) * contractChangePlanDto.getRow()); |
| | | } |
| | | |
| | | List<ContractChangePlanDto> contractChangePlans = BeanConvertUtil.covertBeanList(contractChangePlanServiceDaoImpl.getContractChangePlanInfo(BeanConvertUtil.beanCovertMap(contractChangePlanDto)), ContractChangePlanDto.class); |
| | | |
| | | return contractChangePlans; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int queryContractChangePlansCount(@RequestBody ContractChangePlanDto contractChangePlanDto) { |
| | | return contractChangePlanServiceDaoImpl.queryContractChangePlansCount(BeanConvertUtil.beanCovertMap(contractChangePlanDto)); |
| | | } |
| | | |
| | | public IContractChangePlanServiceDao getContractChangePlanServiceDaoImpl() { |
| | | return contractChangePlanServiceDaoImpl; |
| | | } |
| | | |
| | | public void setContractChangePlanServiceDaoImpl(IContractChangePlanServiceDao contractChangePlanServiceDaoImpl) { |
| | | this.contractChangePlanServiceDaoImpl = contractChangePlanServiceDaoImpl; |
| | | } |
| | | } |