1、优化页面查询相关bug2、优化优惠申请图片上传3、优化页面性bug
| | |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName FloorDto |
| | |
| | | private String feeId; |
| | | private String returnWay; |
| | | private String returnAmount; |
| | | |
| | | private List<String> photos; |
| | | //文件真实名称 |
| | | private String fileRealName; |
| | | //文件存储名称 |
| | | private String fileSaveName; |
| | | private String url; |
| | | private List<String> urls; |
| | | //文件类型 |
| | | private String relTypeCd; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | |
| | | public void setReturnAmount(String returnAmount) { |
| | | this.returnAmount = returnAmount; |
| | | } |
| | | |
| | | public List<String> getPhotos() { |
| | | return photos; |
| | | } |
| | | |
| | | public void setPhotos(List<String> photos) { |
| | | this.photos = photos; |
| | | } |
| | | |
| | | public String getFileRealName() { |
| | | return fileRealName; |
| | | } |
| | | |
| | | public void setFileRealName(String fileRealName) { |
| | | this.fileRealName = fileRealName; |
| | | } |
| | | |
| | | public String getFileSaveName() { |
| | | return fileSaveName; |
| | | } |
| | | |
| | | public void setFileSaveName(String fileSaveName) { |
| | | this.fileSaveName = fileSaveName; |
| | | } |
| | | |
| | | public String getUrl() { |
| | | return url; |
| | | } |
| | | |
| | | public void setUrl(String url) { |
| | | this.url = url; |
| | | } |
| | | |
| | | public String getRelTypeCd() { |
| | | return relTypeCd; |
| | | } |
| | | |
| | | public void setRelTypeCd(String relTypeCd) { |
| | | this.relTypeCd = relTypeCd; |
| | | } |
| | | |
| | | public List<String> getUrls() { |
| | | return urls; |
| | | } |
| | | |
| | | public void setUrls(List<String> urls) { |
| | | this.urls = urls; |
| | | } |
| | | } |
| | |
| | | package com.java110.po.applyRoomDiscount; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | public class ApplyRoomDiscountPo implements Serializable { |
| | | |
| | |
| | | private String feeId; |
| | | private String returnWay; |
| | | private String returnAmount; |
| | | private List<String> photos; |
| | | |
| | | //是否可用状态 |
| | | private String inUse; |
| | |
| | | public void setArdId(String ardId) { |
| | | this.ardId = ardId; |
| | | } |
| | | |
| | | |
| | | public String getCheckUserId() { |
| | | return checkUserId; |
| | |
| | | public void setReturnAmount(String returnAmount) { |
| | | this.returnAmount = returnAmount; |
| | | } |
| | | |
| | | public List<String> getPhotos() { |
| | | return photos; |
| | | } |
| | | |
| | | public void setPhotos(List<String> photos) { |
| | | this.photos = photos; |
| | | } |
| | | } |
| | |
| | | |
| | | <!-- 保存小区房屋信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessRoomInfo" parameterType="Map"> |
| | | insert into business_building_room( |
| | | fee_coefficient,section,remark,user_id,room_id,layer,built_up_area,operate,room_num,unit_id,b_id,apartment,state,community_id, |
| | | room_type,room_sub_type,room_rent,room_area |
| | | ) values ( |
| | | #{feeCoefficient},#{section},#{remark},#{userId},#{roomId},#{layer},#{builtUpArea},#{operate},#{roomNum},#{unitId},#{bId},#{apartment},#{state}, |
| | | #{communityId},#{roomType},#{roomSubType},#{roomRent},#{roomArea} |
| | | ) |
| | | insert into business_building_room(fee_coefficient, section, remark, user_id, room_id, layer, built_up_area, |
| | | operate, room_num, unit_id, b_id, apartment, state, community_id, |
| | | room_type, room_sub_type, room_rent, room_area) |
| | | values (#{feeCoefficient}, #{section}, #{remark}, #{userId}, #{roomId}, #{layer}, #{builtUpArea}, #{operate}, |
| | | #{roomNum}, #{unitId}, #{bId}, #{apartment}, #{state}, |
| | | #{communityId}, #{roomType}, #{roomSubType}, #{roomRent}, #{roomArea}) |
| | | </insert> |
| | | |
| | | |
| | |
| | | <if test="roomSubType !=null and roomSubType != ''"> |
| | | and t.room_sub_type= #{roomSubType} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | <!-- 查询小区房屋数量 add by wuxw 2018-07-03 --> |
| | |
| | | <if test="unitNum !=null and unitNum != ''"> |
| | | and u.unit_num= #{unitNum} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | <!-- 查询小区房屋数量 add by wuxw 2018-07-03 --> |
| | |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | |
| | | |
| | | and borr.`room_id` is null |
| | | <if test="page != -1 and page != null"> |
| | | limit #{page},#{row} |
| | |
| | | t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.built_up_area,t.built_up_area builtUpArea,t.room_num, |
| | | t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,u.`unit_num` |
| | | unitNum,f.`floor_num` floorNum,t.room_type roomType,t.room_type,f.floor_id floorId |
| | | ,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea,bo.name ownerName |
| | | ,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area |
| | | roomArea,bo.name ownerName |
| | | FROM |
| | | building_owner bo,building_room t,building_owner_room_rel borr,building_unit u,f_floor f |
| | | WHERE |
| | |
| | | <if test="bId !=null and bId != ''"> |
| | | and bo.b_id= #{bId} |
| | | </if> |
| | | |
| | | <if test="age !=null and age != ''"> |
| | | and bo.age= #{age} |
| | | </if> |
| | |
| | | <if test="ownerTypeCd !=null and ownerTypeCd != ''"> |
| | | and bo.owner_type_cd= #{ownerTypeCd} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | <!-- 查询小区房屋信息 add by wuxw 2018-07-03 --> |
| | |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.api.ApiRoomDataVo; |
| | | import com.java110.vo.api.ApiRoomVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | RoomDto roomDto = BeanConvertUtil.covertBean(reqJson, RoomDto.class); |
| | | |
| | | if (reqJson.containsKey("flag") && reqJson.getString("flag").equals("1")) { |
| | | if (reqJson.containsKey("roomNumLike") && !StringUtil.isEmpty(reqJson.getString("roomNumLike"))) { |
| | | String[] roomNumLikes = reqJson.getString("roomNumLike").split("-"); |
| | | roomDto.setFloorNum(roomNumLikes[0]); |
| | | roomDto.setUnitNum(roomNumLikes[1]); |
| | | roomDto.setRoomNum(roomNumLikes[2]); |
| | | roomDto.setRoomNumLike(""); |
| | | } |
| | | } |
| | | ApiRoomVo apiRoomVo = new ApiRoomVo(); |
| | | //查询总记录数 |
| | | int total = roomInnerServiceSMOImpl.queryRoomsCount(BeanConvertUtil.covertBean(reqJson, RoomDto.class)); |
| | | int total = roomInnerServiceSMOImpl.queryRoomsCount(roomDto); |
| | | apiRoomVo.setTotal(total); |
| | | List<RoomDto> roomDtoList = null; |
| | | if (total > 0) { |
| | |
| | | try { |
| | | roomDto.setStartTime(DateUtil.getDateFromString(tmpOwnerDto.getStartTime(), DateUtil.DATE_FORMATE_STRING_A)); |
| | | roomDto.setEndTime(DateUtil.getDateFromString(tmpOwnerDto.getEndTime(), DateUtil.DATE_FORMATE_STRING_A)); |
| | | }catch (Exception e){ |
| | | } catch (Exception e) { |
| | | // |
| | | } |
| | | roomDto.setOwnerId(tmpOwnerDto.getOwnerId()); |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.applyRoomDiscount.ApplyRoomDiscountDto; |
| | | import com.java110.dto.applyRoomDiscountType.ApplyRoomDiscountTypeDto; |
| | | import com.java110.dto.fee.FeeDetailDto; |
| | | import com.java110.dto.feeDiscount.FeeDiscountRuleDto; |
| | | import com.java110.dto.file.FileDto; |
| | | import com.java110.fee.bmo.account.ISaveAccountBMO; |
| | | import com.java110.fee.bmo.account.IUpdateAccountBMO; |
| | | import com.java110.fee.bmo.applyRoomDiscount.IAuditApplyRoomDiscountBMO; |
| | |
| | | import com.java110.fee.bmo.applyRoomDiscountType.ISaveApplyRoomDiscountTypeBMO; |
| | | import com.java110.fee.bmo.applyRoomDiscountType.IUpdateApplyRoomDiscountTypeBMO; |
| | | import com.java110.intf.acct.IAccountInnerServiceSMO; |
| | | import com.java110.intf.common.IFileInnerServiceSMO; |
| | | import com.java110.intf.common.IFileRelInnerServiceSMO; |
| | | import com.java110.intf.fee.IApplyRoomDiscountInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeDetailInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeDiscountRuleInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerRoomRelInnerServiceSMO; |
| | | import com.java110.po.applyRoomDiscount.ApplyRoomDiscountPo; |
| | | import com.java110.po.applyRoomDiscountType.ApplyRoomDiscountTypePo; |
| | | import com.java110.po.file.FileRelPo; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | |
| | | @Autowired |
| | | private IUpdateAccountBMO updateAccountBMOImpl; |
| | | |
| | | @Autowired |
| | | private IFileInnerServiceSMO fileInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFileRelInnerServiceSMO fileRelInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * 优惠申请 |
| | | * |
| | |
| | | if (applyRoomDiscountDtos.size() == 0) { |
| | | //空置房优惠可用 |
| | | applyRoomDiscountPo.setInUse("0"); |
| | | applyRoomDiscountPo.setArdId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_ardId)); |
| | | applyRoomDiscountPo.setState(ApplyRoomDiscountDto.STATE_APPLY); |
| | | saveFile(applyRoomDiscountPo); |
| | | return saveApplyRoomDiscountBMOImpl.save(applyRoomDiscountPo); |
| | | } else if (applyRoomDiscountDtos.size() > 0) { |
| | | //取出结束时间 |
| | |
| | | if (startDate.getTime() - finishTime.getTime() >= 0) { |
| | | //空置房优惠可用 |
| | | applyRoomDiscountPo.setInUse("0"); |
| | | applyRoomDiscountPo.setArdId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_ardId)); |
| | | applyRoomDiscountPo.setState(ApplyRoomDiscountDto.STATE_APPLY); |
| | | saveFile(applyRoomDiscountPo); |
| | | return saveApplyRoomDiscountBMOImpl.save(applyRoomDiscountPo); |
| | | } else { |
| | | throw new UnsupportedOperationException("该时间段已经申请过空置房,请重新输入空置房申请开始和结束时间"); |
| | | } |
| | | } else { |
| | | throw new UnsupportedOperationException("信息错误"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 上传图片 |
| | | * |
| | | * @param applyRoomDiscountPo |
| | | */ |
| | | public void saveFile(ApplyRoomDiscountPo applyRoomDiscountPo) { |
| | | //获取图片 |
| | | List<String> photos = applyRoomDiscountPo.getPhotos(); |
| | | FileRelPo fileRelPo = new FileRelPo(); |
| | | fileRelPo.setFileRelId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_relId)); |
| | | fileRelPo.setObjId(applyRoomDiscountPo.getArdId()); |
| | | //table表示表存储 ftp表示ftp文件存储 |
| | | fileRelPo.setSaveWay("ftp"); |
| | | fileRelPo.setCreateTime(new Date()); |
| | | //图片上传 |
| | | if (photos != null && photos.size() > 0) { |
| | | //19000表示装修图片 |
| | | fileRelPo.setRelTypeCd("19000"); |
| | | for (String photo : photos) { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setCommunityId("-1"); |
| | | fileDto.setContext(photo); |
| | | fileDto.setFileId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_file_id)); |
| | | fileDto.setFileName(fileDto.getFileId()); |
| | | String fileName = fileInnerServiceSMOImpl.saveFile(fileDto); |
| | | fileRelPo.setFileRealName(fileName); |
| | | fileRelPo.setFileSaveName(fileName); |
| | | fileRelInnerServiceSMOImpl.saveFileRel(fileRelPo); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | * 89002020980011 102020006 减免金额 |
| | | * 89002020980012 102020007 月份 |
| | | * 89002020980013 102020007 打折率 |
| | | * |
| | | * @param feeDiscountSpecs |
| | | * @return |
| | | */ |
| | |
| | | */ |
| | | @RequestMapping(value = "/queryApplyRoomDiscount", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryApplyRoomDiscount(@RequestParam(value = "communityId") String communityId, |
| | | @RequestParam(value = "ardId", required = false) String ardId, |
| | | @RequestParam(value = "roomName", required = false) String roomName, |
| | | @RequestParam(value = "roomId", required = false) String roomId, |
| | | @RequestParam(value = "state", required = false) String state, |
| | |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | ApplyRoomDiscountDto applyRoomDiscountDto = new ApplyRoomDiscountDto(); |
| | | applyRoomDiscountDto.setArdId(ardId); |
| | | applyRoomDiscountDto.setPage(page); |
| | | applyRoomDiscountDto.setRow(row); |
| | | applyRoomDiscountDto.setCommunityId(communityId); |
| | |
| | | package com.java110.fee.bmo.applyRoomDiscount.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.dto.file.FileRelDto; |
| | | import com.java110.fee.bmo.applyRoomDiscount.IDeleteApplyRoomDiscountBMO; |
| | | import com.java110.intf.common.IFileRelInnerServiceSMO; |
| | | import com.java110.intf.fee.IApplyRoomDiscountInnerServiceSMO; |
| | | import com.java110.po.applyRoomDiscount.ApplyRoomDiscountPo; |
| | | import com.java110.po.file.FileRelPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service("deleteApplyRoomDiscountBMOImpl") |
| | | public class DeleteApplyRoomDiscountBMOImpl implements IDeleteApplyRoomDiscountBMO { |
| | | |
| | | @Autowired |
| | | private IApplyRoomDiscountInnerServiceSMO applyRoomDiscountInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFileRelInnerServiceSMO fileRelInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param applyRoomDiscountPo 数据 |
| | |
| | | int flag = applyRoomDiscountInnerServiceSMOImpl.deleteApplyRoomDiscount(applyRoomDiscountPo); |
| | | |
| | | if (flag > 0) { |
| | | FileRelDto fileRelDto = new FileRelDto(); |
| | | fileRelDto.setObjId(applyRoomDiscountPo.getArdId()); |
| | | //查询文件表 |
| | | List<FileRelDto> fileRelDtos = fileRelInnerServiceSMOImpl.queryFileRels(fileRelDto); |
| | | if (fileRelDtos != null && fileRelDtos.size() > 0) { |
| | | FileRelPo fileRelPo = new FileRelPo(); |
| | | fileRelPo.setObjId(applyRoomDiscountPo.getArdId()); |
| | | fileRelInnerServiceSMOImpl.deleteFileRel(fileRelPo); |
| | | } |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | |
| | | package com.java110.fee.bmo.applyRoomDiscount.impl; |
| | | |
| | | import com.java110.dto.applyRoomDiscount.ApplyRoomDiscountDto; |
| | | import com.java110.dto.file.FileRelDto; |
| | | import com.java110.fee.bmo.applyRoomDiscount.IGetApplyRoomDiscountBMO; |
| | | import com.java110.intf.common.IFileRelInnerServiceSMO; |
| | | import com.java110.intf.fee.IApplyRoomDiscountInnerServiceSMO; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | |
| | | @Autowired |
| | | private IApplyRoomDiscountInnerServiceSMO applyRoomDiscountInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFileRelInnerServiceSMO fileRelInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param applyRoomDiscountDto |
| | | * @return 订单服务能够接受的报文 |
| | |
| | | |
| | | int count = applyRoomDiscountInnerServiceSMOImpl.queryApplyRoomDiscountsCount(applyRoomDiscountDto); |
| | | |
| | | List<ApplyRoomDiscountDto> applyRoomDiscountDtos = null; |
| | | List<ApplyRoomDiscountDto> applyRoomDiscountDtos = new ArrayList<>(); |
| | | if (count > 0) { |
| | | applyRoomDiscountDtos = applyRoomDiscountInnerServiceSMOImpl.queryApplyRoomDiscounts(applyRoomDiscountDto); |
| | | List<ApplyRoomDiscountDto> applyRoomDiscounts = applyRoomDiscountInnerServiceSMOImpl.queryApplyRoomDiscounts(applyRoomDiscountDto); |
| | | String imgUrl = MappingCache.getValue("IMG_PATH"); |
| | | for (ApplyRoomDiscountDto applyRoomDiscount : applyRoomDiscounts) { |
| | | FileRelDto fileRelDto = new FileRelDto(); |
| | | fileRelDto.setObjId(applyRoomDiscount.getArdId()); |
| | | List<FileRelDto> fileRelDtos = fileRelInnerServiceSMOImpl.queryFileRels(fileRelDto); |
| | | List<String> urls = new ArrayList<>(); |
| | | for (FileRelDto fileRel : fileRelDtos) { |
| | | if (!StringUtil.isEmpty(fileRel.getFileRealName()) && fileRel.getRelTypeCd().equals("19000")) { |
| | | urls.add(imgUrl + fileRel.getFileRealName()); |
| | | }else if (!StringUtil.isEmpty(fileRel.getFileRealName()) && fileRel.getRelTypeCd().equals("21000")) { |
| | | urls.add(imgUrl + fileRel.getFileRealName()); |
| | | } |
| | | } |
| | | applyRoomDiscount.setUrls(urls); |
| | | applyRoomDiscountDtos.add(applyRoomDiscount); |
| | | } |
| | | } else { |
| | | applyRoomDiscountDtos = new ArrayList<>(); |
| | | } |
| | |
| | | @Java110Transactional |
| | | public ResponseEntity<String> save(ApplyRoomDiscountPo applyRoomDiscountPo) { |
| | | |
| | | applyRoomDiscountPo.setArdId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_ardId)); |
| | | applyRoomDiscountPo.setState(ApplyRoomDiscountDto.STATE_APPLY); |
| | | int flag = applyRoomDiscountInnerServiceSMOImpl.saveApplyRoomDiscount(applyRoomDiscountPo); |
| | | |
| | | if (flag > 0) { |
| | |
| | | package com.java110.fee.bmo.applyRoomDiscount.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.file.FileDto; |
| | | import com.java110.fee.bmo.applyRoomDiscount.IUpdateApplyRoomDiscountBMO; |
| | | import com.java110.intf.common.IFileInnerServiceSMO; |
| | | import com.java110.intf.common.IFileRelInnerServiceSMO; |
| | | import com.java110.intf.fee.IApplyRoomDiscountInnerServiceSMO; |
| | | import com.java110.po.applyRoomDiscount.ApplyRoomDiscountPo; |
| | | import com.java110.po.file.FileRelPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Service("updateApplyRoomDiscountBMOImpl") |
| | | public class UpdateApplyRoomDiscountBMOImpl implements IUpdateApplyRoomDiscountBMO { |
| | | |
| | | @Autowired |
| | | private IApplyRoomDiscountInnerServiceSMO applyRoomDiscountInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFileRelInnerServiceSMO fileRelInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFileInnerServiceSMO fileInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param applyRoomDiscountPo |
| | |
| | | int flag = applyRoomDiscountInnerServiceSMOImpl.updateApplyRoomDiscount(applyRoomDiscountPo); |
| | | |
| | | if (flag > 0) { |
| | | //获取图片集合 |
| | | List<String> photos = applyRoomDiscountPo.getPhotos(); |
| | | if (photos != null && photos.size() > 0) { |
| | | FileRelPo fileRelPo = new FileRelPo(); |
| | | fileRelPo.setObjId(applyRoomDiscountPo.getArdId()); |
| | | fileRelInnerServiceSMOImpl.deleteFileRel(fileRelPo); |
| | | FileRelPo fileRel = new FileRelPo(); |
| | | fileRel.setFileRelId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_relId)); |
| | | fileRel.setObjId(applyRoomDiscountPo.getArdId()); |
| | | //table表示表存储 ftp表示ftp文件存储 |
| | | fileRel.setSaveWay("ftp"); |
| | | fileRel.setCreateTime(new Date()); |
| | | //19000表示装修图片 |
| | | fileRel.setRelTypeCd("19000"); |
| | | for (String photo : photos) { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setCommunityId("-1"); |
| | | fileDto.setContext(photo); |
| | | fileDto.setFileId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_file_id)); |
| | | fileDto.setFileName(fileDto.getFileId()); |
| | | String fileName = fileInnerServiceSMOImpl.saveFile(fileDto); |
| | | fileRel.setFileRealName(fileName); |
| | | fileRel.setFileSaveName(fileName); |
| | | fileRelInnerServiceSMOImpl.saveFileRel(fileRel); |
| | | } |
| | | } |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |