| New file |
| | |
| | | package com.java110.dto.assetImportLogDetail; |
| | | |
| | | 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 AssetImportLogDetailDto extends PageDto implements Serializable { |
| | | |
| | | private String detailId; |
| | | private String logId; |
| | | private String state; |
| | | private String objName; |
| | | private String communityId; |
| | | private String message; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getDetailId() { |
| | | return detailId; |
| | | } |
| | | public void setDetailId(String detailId) { |
| | | this.detailId = detailId; |
| | | } |
| | | public String getLogId() { |
| | | return logId; |
| | | } |
| | | public void setLogId(String logId) { |
| | | this.logId = logId; |
| | | } |
| | | public String getState() { |
| | | return state; |
| | | } |
| | | public void setState(String state) { |
| | | this.state = state; |
| | | } |
| | | public String getObjName() { |
| | | return objName; |
| | | } |
| | | public void setObjName(String objName) { |
| | | this.objName = objName; |
| | | } |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | public String getMessage() { |
| | | return message; |
| | | } |
| | | public void setMessage(String message) { |
| | | this.message = message; |
| | | } |
| | | |
| | | |
| | | 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.assetImportLogDetail; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | public class AssetImportLogDetailPo implements Serializable { |
| | | |
| | | private String detailId; |
| | | private String logId; |
| | | private String statusCd = "0"; |
| | | private String state; |
| | | private String objName; |
| | | private String communityId; |
| | | private String message; |
| | | public String getDetailId() { |
| | | return detailId; |
| | | } |
| | | public void setDetailId(String detailId) { |
| | | this.detailId = detailId; |
| | | } |
| | | public String getLogId() { |
| | | return logId; |
| | | } |
| | | public void setLogId(String logId) { |
| | | this.logId = logId; |
| | | } |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | public String getState() { |
| | | return state; |
| | | } |
| | | public void setState(String state) { |
| | | this.state = state; |
| | | } |
| | | public String getObjName() { |
| | | return objName; |
| | | } |
| | | public void setObjName(String objName) { |
| | | this.objName = objName; |
| | | } |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | public String getMessage() { |
| | | return message; |
| | | } |
| | | public void setMessage(String message) { |
| | | this.message = message; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| 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="assetImportLogDetailServiceDaoImpl"> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 保存批量操作日志详情信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveAssetImportLogDetailInfo" parameterType="Map"> |
| | | insert into asset_import_log_detail( |
| | | detail_id,log_id,state,obj_name,community_id,message |
| | | ) values ( |
| | | #{detailId},#{logId},#{state},#{objName},#{communityId},#{message} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <!-- 查询批量操作日志详情信息 add by wuxw 2018-07-03 --> |
| | | <select id="getAssetImportLogDetailInfo" parameterType="Map" resultType="Map"> |
| | | select t.detail_id,t.detail_id detailId,t.log_id,t.log_id logId,t.status_cd,t.status_cd statusCd,t.state,t.obj_name,t.obj_name objName,t.community_id,t.community_id communityId,t.message |
| | | from asset_import_log_detail t |
| | | where 1 =1 |
| | | <if test="detailId !=null and detailId != ''"> |
| | | and t.detail_id= #{detailId} |
| | | </if> |
| | | <if test="logId !=null and logId != ''"> |
| | | and t.log_id= #{logId} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="objName !=null and objName != ''"> |
| | | and t.obj_name= #{objName} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="message !=null and message != ''"> |
| | | and t.message= #{message} |
| | | </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="updateAssetImportLogDetailInfo" parameterType="Map"> |
| | | update asset_import_log_detail t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="logId !=null and logId != ''"> |
| | | , t.log_id= #{logId} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | , t.state= #{state} |
| | | </if> |
| | | <if test="objName !=null and objName != ''"> |
| | | , t.obj_name= #{objName} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | <if test="message !=null and message != ''"> |
| | | , t.message= #{message} |
| | | </if> |
| | | where 1=1 <if test="detailId !=null and detailId != ''"> |
| | | and t.detail_id= #{detailId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询批量操作日志详情数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryAssetImportLogDetailsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from asset_import_log_detail t |
| | | where 1 =1 |
| | | <if test="detailId !=null and detailId != ''"> |
| | | and t.detail_id= #{detailId} |
| | | </if> |
| | | <if test="logId !=null and logId != ''"> |
| | | and t.log_id= #{logId} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="objName !=null and objName != ''"> |
| | | and t.obj_name= #{objName} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="message !=null and message != ''"> |
| | | and t.message= #{message} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | { |
| | | "autoMove": true, |
| | | "id": "logId", |
| | | "name": "assetImportLog", |
| | | "desc": "批量操作日志", |
| | | "id": "detailId", |
| | | "name": "assetImportLogDetail", |
| | | "desc": "批量操作日志详情", |
| | | "shareParam": "communityId", |
| | | "shareColumn": "community_id", |
| | | "shareName": "common", |
| | | "tableName": "asset_import_log", |
| | | "tableName": "asset_import_log_detail", |
| | | "param": { |
| | | "detailId": "detail_id", |
| | | "logId": "log_id", |
| | | "communityId": "community_id", |
| | | "logType": "log_type", |
| | | "successCount": "success_count", |
| | | "errorCount": "error_count", |
| | | "remark": "remark", |
| | | "state": "state", |
| | | "message": "message", |
| | | "objName": "obj_name", |
| | | "statusCd": "status_cd" |
| | | }, |
| | | "required": [ |
| New file |
| | |
| | | package com.java110.intf.common; |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.assetImportLogDetail.AssetImportLogDetailDto; |
| | | import com.java110.po.assetImportLogDetail.AssetImportLogDetailPo; |
| | | 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 IAssetImportLogDetailInnerServiceSMO |
| | | * @Description 批量操作日志详情接口类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:04 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @FeignClient(name = "common-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/assetImportLogDetailApi") |
| | | public interface IAssetImportLogDetailInnerServiceSMO { |
| | | |
| | | |
| | | @RequestMapping(value = "/saveAssetImportLogDetail", method = RequestMethod.POST) |
| | | public int saveAssetImportLogDetail(@RequestBody AssetImportLogDetailPo assetImportLogDetailPo); |
| | | |
| | | @RequestMapping(value = "/updateAssetImportLogDetail", method = RequestMethod.POST) |
| | | public int updateAssetImportLogDetail(@RequestBody AssetImportLogDetailPo assetImportLogDetailPo); |
| | | |
| | | @RequestMapping(value = "/deleteAssetImportLogDetail", method = RequestMethod.POST) |
| | | public int deleteAssetImportLogDetail(@RequestBody AssetImportLogDetailPo assetImportLogDetailPo); |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * |
| | | * @param assetImportLogDetailDto 数据对象分享 |
| | | * @return AssetImportLogDetailDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryAssetImportLogDetails", method = RequestMethod.POST) |
| | | List<AssetImportLogDetailDto> queryAssetImportLogDetails(@RequestBody AssetImportLogDetailDto assetImportLogDetailDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param assetImportLogDetailDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryAssetImportLogDetailsCount", method = RequestMethod.POST) |
| | | int queryAssetImportLogDetailsCount(@RequestBody AssetImportLogDetailDto assetImportLogDetailDto); |
| | | } |
| New file |
| | |
| | | package com.java110.common.api; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.bmo.assetImportLogDetail.IDeleteAssetImportLogDetailBMO; |
| | | import com.java110.common.bmo.assetImportLogDetail.IGetAssetImportLogDetailBMO; |
| | | import com.java110.common.bmo.assetImportLogDetail.ISaveAssetImportLogDetailBMO; |
| | | import com.java110.common.bmo.assetImportLogDetail.IUpdateAssetImportLogDetailBMO; |
| | | import com.java110.dto.assetImportLogDetail.AssetImportLogDetailDto; |
| | | import com.java110.po.assetImportLogDetail.AssetImportLogDetailPo; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | @RestController |
| | | @RequestMapping(value = "/assetImportLogDetail") |
| | | public class AssetImportLogDetailApi { |
| | | |
| | | @Autowired |
| | | private ISaveAssetImportLogDetailBMO saveAssetImportLogDetailBMOImpl; |
| | | @Autowired |
| | | private IUpdateAssetImportLogDetailBMO updateAssetImportLogDetailBMOImpl; |
| | | @Autowired |
| | | private IDeleteAssetImportLogDetailBMO deleteAssetImportLogDetailBMOImpl; |
| | | |
| | | @Autowired |
| | | private IGetAssetImportLogDetailBMO getAssetImportLogDetailBMOImpl; |
| | | |
| | | /** |
| | | * 微信保存消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /assetImportLogDetail/saveAssetImportLogDetail |
| | | * @path /app/assetImportLogDetail/saveAssetImportLogDetail |
| | | */ |
| | | @RequestMapping(value = "/saveAssetImportLogDetail", method = RequestMethod.POST) |
| | | public ResponseEntity<String> saveAssetImportLogDetail(@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | |
| | | |
| | | AssetImportLogDetailPo assetImportLogDetailPo = BeanConvertUtil.covertBean(reqJson, AssetImportLogDetailPo.class); |
| | | return saveAssetImportLogDetailBMOImpl.save(assetImportLogDetailPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信修改消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /assetImportLogDetail/updateAssetImportLogDetail |
| | | * @path /app/assetImportLogDetail/updateAssetImportLogDetail |
| | | */ |
| | | @RequestMapping(value = "/updateAssetImportLogDetail", method = RequestMethod.POST) |
| | | public ResponseEntity<String> updateAssetImportLogDetail(@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | Assert.hasKeyAndValue(reqJson, "detailId", "detailId不能为空"); |
| | | |
| | | |
| | | AssetImportLogDetailPo assetImportLogDetailPo = BeanConvertUtil.covertBean(reqJson, AssetImportLogDetailPo.class); |
| | | return updateAssetImportLogDetailBMOImpl.update(assetImportLogDetailPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /assetImportLogDetail/deleteAssetImportLogDetail |
| | | * @path /app/assetImportLogDetail/deleteAssetImportLogDetail |
| | | */ |
| | | @RequestMapping(value = "/deleteAssetImportLogDetail", method = RequestMethod.POST) |
| | | public ResponseEntity<String> deleteAssetImportLogDetail(@RequestBody JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "detailId", "detailId不能为空"); |
| | | |
| | | |
| | | AssetImportLogDetailPo assetImportLogDetailPo = BeanConvertUtil.covertBean(reqJson, AssetImportLogDetailPo.class); |
| | | return deleteAssetImportLogDetailBMOImpl.delete(assetImportLogDetailPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @param communityId 小区ID |
| | | * @return |
| | | * @serviceCode /assetImportLogDetail/queryAssetImportLogDetail |
| | | * @path /app/assetImportLogDetail/queryAssetImportLogDetail |
| | | */ |
| | | @RequestMapping(value = "/queryAssetImportLogDetail", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryAssetImportLogDetail(@RequestParam(value = "communityId") String communityId, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | AssetImportLogDetailDto assetImportLogDetailDto = new AssetImportLogDetailDto(); |
| | | assetImportLogDetailDto.setPage(page); |
| | | assetImportLogDetailDto.setRow(row); |
| | | assetImportLogDetailDto.setCommunityId(communityId); |
| | | return getAssetImportLogDetailBMOImpl.get(assetImportLogDetailDto); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.common.bmo.assetImportLogDetail; |
| | | import com.java110.po.assetImportLogDetail.AssetImportLogDetailPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IDeleteAssetImportLogDetailBMO { |
| | | |
| | | |
| | | /** |
| | | * 修改批量操作日志详情 |
| | | * add by wuxw |
| | | * @param assetImportLogDetailPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> delete(AssetImportLogDetailPo assetImportLogDetailPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.common.bmo.assetImportLogDetail; |
| | | import com.java110.dto.assetImportLogDetail.AssetImportLogDetailDto; |
| | | import org.springframework.http.ResponseEntity; |
| | | public interface IGetAssetImportLogDetailBMO { |
| | | |
| | | |
| | | /** |
| | | * 查询批量操作日志详情 |
| | | * add by wuxw |
| | | * @param assetImportLogDetailDto |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> get(AssetImportLogDetailDto assetImportLogDetailDto); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.common.bmo.assetImportLogDetail; |
| | | |
| | | import com.java110.po.assetImportLogDetail.AssetImportLogDetailPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | public interface ISaveAssetImportLogDetailBMO { |
| | | |
| | | |
| | | /** |
| | | * 添加批量操作日志详情 |
| | | * add by wuxw |
| | | * @param assetImportLogDetailPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> save(AssetImportLogDetailPo assetImportLogDetailPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.common.bmo.assetImportLogDetail; |
| | | import com.java110.po.assetImportLogDetail.AssetImportLogDetailPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IUpdateAssetImportLogDetailBMO { |
| | | |
| | | |
| | | /** |
| | | * 修改批量操作日志详情 |
| | | * add by wuxw |
| | | * @param assetImportLogDetailPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> update(AssetImportLogDetailPo assetImportLogDetailPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.common.bmo.assetImportLogDetail.impl; |
| | | |
| | | import com.java110.common.bmo.assetImportLogDetail.IDeleteAssetImportLogDetailBMO; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.intf.common.IAssetImportLogDetailInnerServiceSMO; |
| | | import com.java110.po.assetImportLogDetail.AssetImportLogDetailPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("deleteAssetImportLogDetailBMOImpl") |
| | | public class DeleteAssetImportLogDetailBMOImpl implements IDeleteAssetImportLogDetailBMO { |
| | | |
| | | @Autowired |
| | | private IAssetImportLogDetailInnerServiceSMO assetImportLogDetailInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param assetImportLogDetailPo 数据 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> delete(AssetImportLogDetailPo assetImportLogDetailPo) { |
| | | |
| | | int flag = assetImportLogDetailInnerServiceSMOImpl.deleteAssetImportLogDetail(assetImportLogDetailPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.common.bmo.assetImportLogDetail.impl; |
| | | |
| | | import com.java110.common.bmo.assetImportLogDetail.IGetAssetImportLogDetailBMO; |
| | | import com.java110.dto.assetImportLogDetail.AssetImportLogDetailDto; |
| | | import com.java110.intf.common.IAssetImportLogDetailInnerServiceSMO; |
| | | 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("getAssetImportLogDetailBMOImpl") |
| | | public class GetAssetImportLogDetailBMOImpl implements IGetAssetImportLogDetailBMO { |
| | | |
| | | @Autowired |
| | | private IAssetImportLogDetailInnerServiceSMO assetImportLogDetailInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param assetImportLogDetailDto |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public ResponseEntity<String> get(AssetImportLogDetailDto assetImportLogDetailDto) { |
| | | |
| | | |
| | | int count = assetImportLogDetailInnerServiceSMOImpl.queryAssetImportLogDetailsCount(assetImportLogDetailDto); |
| | | |
| | | List<AssetImportLogDetailDto> assetImportLogDetailDtos = null; |
| | | if (count > 0) { |
| | | assetImportLogDetailDtos = assetImportLogDetailInnerServiceSMOImpl.queryAssetImportLogDetails(assetImportLogDetailDto); |
| | | } else { |
| | | assetImportLogDetailDtos = new ArrayList<>(); |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) assetImportLogDetailDto.getRow()), count, assetImportLogDetailDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.common.bmo.assetImportLogDetail.impl; |
| | | |
| | | import com.java110.common.bmo.assetImportLogDetail.ISaveAssetImportLogDetailBMO; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.intf.common.IAssetImportLogDetailInnerServiceSMO; |
| | | import com.java110.po.assetImportLogDetail.AssetImportLogDetailPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("saveAssetImportLogDetailBMOImpl") |
| | | public class SaveAssetImportLogDetailBMOImpl implements ISaveAssetImportLogDetailBMO { |
| | | |
| | | @Autowired |
| | | private IAssetImportLogDetailInnerServiceSMO assetImportLogDetailInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * 添加小区信息 |
| | | * |
| | | * @param assetImportLogDetailPo |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> save(AssetImportLogDetailPo assetImportLogDetailPo) { |
| | | |
| | | assetImportLogDetailPo.setDetailId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_detailId)); |
| | | int flag = assetImportLogDetailInnerServiceSMOImpl.saveAssetImportLogDetail(assetImportLogDetailPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.common.bmo.assetImportLogDetail.impl; |
| | | |
| | | import com.java110.common.bmo.assetImportLogDetail.IUpdateAssetImportLogDetailBMO; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.intf.common.IAssetImportLogDetailInnerServiceSMO; |
| | | import com.java110.po.assetImportLogDetail.AssetImportLogDetailPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("updateAssetImportLogDetailBMOImpl") |
| | | public class UpdateAssetImportLogDetailBMOImpl implements IUpdateAssetImportLogDetailBMO { |
| | | |
| | | @Autowired |
| | | private IAssetImportLogDetailInnerServiceSMO assetImportLogDetailInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param assetImportLogDetailPo |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> update(AssetImportLogDetailPo assetImportLogDetailPo) { |
| | | |
| | | int flag = assetImportLogDetailInnerServiceSMOImpl.updateAssetImportLogDetail(assetImportLogDetailPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.common.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 IAssetImportLogDetailServiceDao { |
| | | |
| | | |
| | | /** |
| | | * 保存 批量操作日志详情信息 |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void saveAssetImportLogDetailInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询批量操作日志详情信息(instance过程) |
| | | * 根据bId 查询批量操作日志详情信息 |
| | | * @param info bId 信息 |
| | | * @return 批量操作日志详情信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getAssetImportLogDetailInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改批量操作日志详情信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void updateAssetImportLogDetailInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询批量操作日志详情总数 |
| | | * |
| | | * @param info 批量操作日志详情信息 |
| | | * @return 批量操作日志详情数量 |
| | | */ |
| | | int queryAssetImportLogDetailsCount(Map info); |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.common.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.common.dao.IAssetImportLogDetailServiceDao; |
| | | 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("assetImportLogDetailServiceDaoImpl") |
| | | //@Transactional |
| | | public class AssetImportLogDetailServiceDaoImpl extends BaseServiceDao implements IAssetImportLogDetailServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(AssetImportLogDetailServiceDaoImpl.class); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存批量操作日志详情信息 到 instance |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveAssetImportLogDetailInfo(Map info) throws DAOException { |
| | | logger.debug("保存批量操作日志详情信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("assetImportLogDetailServiceDaoImpl.saveAssetImportLogDetailInfo",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> getAssetImportLogDetailInfo(Map info) throws DAOException { |
| | | logger.debug("查询批量操作日志详情信息 入参 info : {}",info); |
| | | |
| | | List<Map> businessAssetImportLogDetailInfos = sqlSessionTemplate.selectList("assetImportLogDetailServiceDaoImpl.getAssetImportLogDetailInfo",info); |
| | | |
| | | return businessAssetImportLogDetailInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改批量操作日志详情信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void updateAssetImportLogDetailInfo(Map info) throws DAOException { |
| | | logger.debug("修改批量操作日志详情信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("assetImportLogDetailServiceDaoImpl.updateAssetImportLogDetailInfo",info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改批量操作日志详情信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询批量操作日志详情数量 |
| | | * @param info 批量操作日志详情信息 |
| | | * @return 批量操作日志详情数量 |
| | | */ |
| | | @Override |
| | | public int queryAssetImportLogDetailsCount(Map info) { |
| | | logger.debug("查询批量操作日志详情数据 入参 info : {}",info); |
| | | |
| | | List<Map> businessAssetImportLogDetailInfos = sqlSessionTemplate.selectList("assetImportLogDetailServiceDaoImpl.queryAssetImportLogDetailsCount", info); |
| | | if (businessAssetImportLogDetailInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessAssetImportLogDetailInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.common.smo.impl; |
| | | |
| | | |
| | | import com.java110.common.dao.IAssetImportLogDetailServiceDao; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.assetImportLogDetail.AssetImportLogDetailDto; |
| | | import com.java110.intf.common.IAssetImportLogDetailInnerServiceSMO; |
| | | import com.java110.po.assetImportLogDetail.AssetImportLogDetailPo; |
| | | 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 AssetImportLogDetailInnerServiceSMOImpl extends BaseServiceSMO implements IAssetImportLogDetailInnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IAssetImportLogDetailServiceDao assetImportLogDetailServiceDaoImpl; |
| | | |
| | | |
| | | @Override |
| | | public int saveAssetImportLogDetail(@RequestBody AssetImportLogDetailPo assetImportLogDetailPo) { |
| | | int saveFlag = 1; |
| | | assetImportLogDetailServiceDaoImpl.saveAssetImportLogDetailInfo(BeanConvertUtil.beanCovertMap(assetImportLogDetailPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int updateAssetImportLogDetail(@RequestBody AssetImportLogDetailPo assetImportLogDetailPo) { |
| | | int saveFlag = 1; |
| | | assetImportLogDetailServiceDaoImpl.updateAssetImportLogDetailInfo(BeanConvertUtil.beanCovertMap(assetImportLogDetailPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int deleteAssetImportLogDetail(@RequestBody AssetImportLogDetailPo assetImportLogDetailPo) { |
| | | int saveFlag = 1; |
| | | assetImportLogDetailPo.setStatusCd("1"); |
| | | assetImportLogDetailServiceDaoImpl.updateAssetImportLogDetailInfo(BeanConvertUtil.beanCovertMap(assetImportLogDetailPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public List<AssetImportLogDetailDto> queryAssetImportLogDetails(@RequestBody AssetImportLogDetailDto assetImportLogDetailDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = assetImportLogDetailDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | assetImportLogDetailDto.setPage((page - 1) * assetImportLogDetailDto.getRow()); |
| | | } |
| | | |
| | | List<AssetImportLogDetailDto> assetImportLogDetails = BeanConvertUtil.covertBeanList(assetImportLogDetailServiceDaoImpl.getAssetImportLogDetailInfo(BeanConvertUtil.beanCovertMap(assetImportLogDetailDto)), AssetImportLogDetailDto.class); |
| | | |
| | | return assetImportLogDetails; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int queryAssetImportLogDetailsCount(@RequestBody AssetImportLogDetailDto assetImportLogDetailDto) { |
| | | return assetImportLogDetailServiceDaoImpl.queryAssetImportLogDetailsCount(BeanConvertUtil.beanCovertMap(assetImportLogDetailDto)); |
| | | } |
| | | |
| | | public IAssetImportLogDetailServiceDao getAssetImportLogDetailServiceDaoImpl() { |
| | | return assetImportLogDetailServiceDaoImpl; |
| | | } |
| | | |
| | | public void setAssetImportLogDetailServiceDaoImpl(IAssetImportLogDetailServiceDao assetImportLogDetailServiceDaoImpl) { |
| | | this.assetImportLogDetailServiceDaoImpl = assetImportLogDetailServiceDaoImpl; |
| | | } |
| | | } |