| @@ -273,7 +273,15 @@ public class WxEnergyController extends BaseController { | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @ApiOperation("生成科目抄表计算数据") | |||||
| @PostMapping("readingIsDel") | |||||
| public ResultData readingIsDel(@RequestBody WxEnergyMeterReading record) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| record.setIsDel(EnumYesOrNo.YES.getCode()); | |||||
| wxEnergyService.setReadingIsDel(record); | |||||
| return new ResultData(); | |||||
| } | |||||
| @ApiOperation("新建科目抄表计算数据") | |||||
| @PostMapping("createReadingCalcute") | @PostMapping("createReadingCalcute") | ||||
| public ResultData createReadingCalcute(@RequestBody WxEnergyReadingCalcute record) { | public ResultData createReadingCalcute(@RequestBody WxEnergyReadingCalcute record) { | ||||
| record.updateTenantInfo(getTenantInfo()); | record.updateTenantInfo(getTenantInfo()); | ||||
| @@ -333,4 +341,12 @@ public class WxEnergyController extends BaseController { | |||||
| return new ResultData(number); | return new ResultData(number); | ||||
| } | } | ||||
| @PostMapping("calcuteIsDel") | |||||
| public ResultData calcuteIsDel(@RequestBody WxEnergyReadingCalcute record) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| record.setIsDel(EnumYesOrNo.YES.getCode()); | |||||
| wxEnergyService.setReadingCalcuteIsDel(record); | |||||
| return new ResultData(); | |||||
| } | |||||
| } | } | ||||
| @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
| import com.iformall.common.IdWorker; | import com.iformall.common.IdWorker; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.enums.EnumBillAllType; | |||||
| import com.iformall.enums.EnumBillDailyBuildWay; | import com.iformall.enums.EnumBillDailyBuildWay; | ||||
| import com.iformall.enums.EnumBillRentApplyStatus; | import com.iformall.enums.EnumBillRentApplyStatus; | ||||
| import com.iformall.enums.EnumBillStatus; | import com.iformall.enums.EnumBillStatus; | ||||
| @@ -127,6 +128,9 @@ public class WxEnergyMeterReading extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="单价",name="price") | @io.swagger.annotations.ApiModelProperty(value="单价",name="price") | ||||
| private String price; | private String price; | ||||
| @io.swagger.annotations.ApiModelProperty(value="是否删除",name="isDel") | |||||
| private Integer isDel; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private List<WxEnergyMeterReading> meterReadingList; | private List<WxEnergyMeterReading> meterReadingList; | ||||
| @@ -199,6 +203,7 @@ public class WxEnergyMeterReading extends TenantEntity { | |||||
| daily.setUpdateByName(user.getName()); | daily.setUpdateByName(user.getName()); | ||||
| daily.setUpdatetime(new Date()); | daily.setUpdatetime(new Date()); | ||||
| daily.setReceivePay(needPay); | daily.setReceivePay(needPay); | ||||
| daily.setNeedPay(needPay); | |||||
| daily.setPay("0"); | daily.setPay("0"); | ||||
| daily.setStarttime(this.startTime); | daily.setStarttime(this.startTime); | ||||
| daily.setEndtime(this.endTime); | daily.setEndtime(this.endTime); | ||||
| @@ -206,10 +211,12 @@ public class WxEnergyMeterReading extends TenantEntity { | |||||
| daily.setStatus(EnumBillStatus.WAIT_PAY.getCode()); | daily.setStatus(EnumBillStatus.WAIT_PAY.getCode()); | ||||
| daily.setShopId(this.shopId); | daily.setShopId(this.shopId); | ||||
| daily.setShopNumber(this.shopNumber); | daily.setShopNumber(this.shopNumber); | ||||
| daily.setBillType(EnumEnergyMeterType.getEnum(meterType).getBillDailyType()); | |||||
| daily.setBillType(EnumBillAllType.DAILY.getCode()); | |||||
| daily.setEnergyFeesId(calcute.getFeesId()); | |||||
| daily.setPriceDetail(detail); | daily.setPriceDetail(detail); | ||||
| daily.setServiceChargePay("0"); | daily.setServiceChargePay("0"); | ||||
| daily.setBillRemark(remark); | daily.setBillRemark(remark); | ||||
| daily.setIsPreview(EnumYesOrNo.NO.getCode()); | |||||
| daily.setEnergyReadingCalcuteId(calcute.getId()); | daily.setEnergyReadingCalcuteId(calcute.getId()); | ||||
| daily.setEnergyReadingId(id); | daily.setEnergyReadingId(id); | ||||
| return daily; | return daily; | ||||
| @@ -69,7 +69,7 @@ public class WxEnergyReadingCalcute extends TenantEntity { | |||||
| if (null != importSuccess && importSuccess.intValue() == EnumYesOrNo.YES.getCode().intValue()) { | if (null != importSuccess && importSuccess.intValue() == EnumYesOrNo.YES.getCode().intValue()) { | ||||
| return "成功"; | return "成功"; | ||||
| }else { | }else { | ||||
| return "部分失败"; | |||||
| return "未完成导入"; | |||||
| } | } | ||||
| } | } | ||||
| @@ -84,8 +84,11 @@ public class WxEnergyReadingCalcute extends TenantEntity { | |||||
| if (null != calcuteSuccess && calcuteSuccess.intValue() == EnumYesOrNo.YES.getCode().intValue()) { | if (null != calcuteSuccess && calcuteSuccess.intValue() == EnumYesOrNo.YES.getCode().intValue()) { | ||||
| return "成功"; | return "成功"; | ||||
| }else { | }else { | ||||
| return "部分失败"; | |||||
| return "未完成计算"; | |||||
| } | } | ||||
| } | } | ||||
| @io.swagger.annotations.ApiModelProperty(value = "是否删除", name = "isDel") | |||||
| private Integer isDel; | |||||
| } | } | ||||
| @@ -40,6 +40,8 @@ public class WxFinancePrintData extends BaseEntity { | |||||
| private Integer isEdit; | private Integer isEdit; | ||||
| @io.swagger.annotations.ApiModelProperty(value="默认值",name="defaultValue") | @io.swagger.annotations.ApiModelProperty(value="默认值",name="defaultValue") | ||||
| private String defaultValue; | private String defaultValue; | ||||
| @io.swagger.annotations.ApiModelProperty(value="默认值",name="defaultValue") | |||||
| private String tenantId; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Object printComponents; | private Object printComponents; | ||||
| @@ -20,4 +20,6 @@ public interface WxEnergyMeterReadingMapper extends CommonMapper<WxEnergyMeterRe | |||||
| List<Map> findBuildingSumMoney(WxEnergyMeterReading wxBillRent); | List<Map> findBuildingSumMoney(WxEnergyMeterReading wxBillRent); | ||||
| List<Map> findFloorSumMoney(WxEnergyMeterReading wxBillRent); | List<Map> findFloorSumMoney(WxEnergyMeterReading wxBillRent); | ||||
| void setIsDel(@Param("id")Long id,@Param("tenantId")String tenantId,@Param("isDel")Integer isDel); | |||||
| } | } | ||||
| @@ -13,4 +13,6 @@ public interface WxEnergyReadingCalcuteMapper extends CommonMapper<WxEnergyReadi | |||||
| List<WxEnergyReadingCalcute> findList(WxEnergyReadingCalcute wxBillRent); | List<WxEnergyReadingCalcute> findList(WxEnergyReadingCalcute wxBillRent); | ||||
| WxEnergyReadingCalcute selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | WxEnergyReadingCalcute selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | ||||
| void setIsDel(@Param("id")Long id,@Param("tenantId")String tenantId,@Param("isDel")Integer isDel); | |||||
| } | } | ||||
| @@ -51,6 +51,7 @@ public interface WxEnergyService { | |||||
| void updateReading(WxEnergyMeterReading record,MallUserInfo userInfo); | void updateReading(WxEnergyMeterReading record,MallUserInfo userInfo); | ||||
| void commitReading(WxEnergyMeterReading record,MallUserInfo userInfo); | void commitReading(WxEnergyMeterReading record,MallUserInfo userInfo); | ||||
| WxEnergyMeterReading getReadingById(WxEnergyMeterReading record); | WxEnergyMeterReading getReadingById(WxEnergyMeterReading record); | ||||
| void setReadingIsDel(WxEnergyMeterReading record); | |||||
| //抄表科目计算数据 | //抄表科目计算数据 | ||||
| PageInfo<WxEnergyReadingCalcute> readingCalcuteListAsPage(WxEnergyReadingCalcute record, Integer pageIndex, Integer pageSize); | PageInfo<WxEnergyReadingCalcute> readingCalcuteListAsPage(WxEnergyReadingCalcute record, Integer pageIndex, Integer pageSize); | ||||
| @@ -59,4 +60,5 @@ public interface WxEnergyService { | |||||
| void exportReadingCalcute(WxEnergyReadingCalcute record,HttpServletRequest request, HttpServletResponse response); | void exportReadingCalcute(WxEnergyReadingCalcute record,HttpServletRequest request, HttpServletResponse response); | ||||
| void importReadingCalcute(MultipartFile mFile, MallUserInfo user, HttpServletRequest request, HttpServletResponse response); | void importReadingCalcute(MultipartFile mFile, MallUserInfo user, HttpServletRequest request, HttpServletResponse response); | ||||
| Integer calcuteReading(WxEnergyReadingCalcute record, MallUserInfo user); | Integer calcuteReading(WxEnergyReadingCalcute record, MallUserInfo user); | ||||
| void setReadingCalcuteIsDel(WxEnergyReadingCalcute record); | |||||
| } | } | ||||
| @@ -552,6 +552,18 @@ public class WxEnergyServiceImpl implements WxEnergyService { | |||||
| return wxEnergyMeterReadingMapper.selectById(record.getId(), record.getTenantId()); | return wxEnergyMeterReadingMapper.selectById(record.getId(), record.getTenantId()); | ||||
| } | } | ||||
| @Override | |||||
| public void setReadingIsDel(WxEnergyMeterReading record) { | |||||
| WxEnergyMeterReading calcute = this.getReadingById(record); | |||||
| if (null == calcute) { | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "记录未查询到"); | |||||
| } | |||||
| wxEnergyMeterReadingMapper.setIsDel(record.getId(), record.getTenantId(), record.getIsDel()); | |||||
| } | |||||
| @Override | @Override | ||||
| public PageInfo<WxEnergyReadingCalcute> readingCalcuteListAsPage(WxEnergyReadingCalcute record, Integer pageIndex, | public PageInfo<WxEnergyReadingCalcute> readingCalcuteListAsPage(WxEnergyReadingCalcute record, Integer pageIndex, | ||||
| Integer pageSize) { | Integer pageSize) { | ||||
| @@ -825,6 +837,7 @@ public class WxEnergyServiceImpl implements WxEnergyService { | |||||
| WxEnergyMeterReading reading = new WxEnergyMeterReading(); | WxEnergyMeterReading reading = new WxEnergyMeterReading(); | ||||
| reading.updateTenantInfo(record); | reading.updateTenantInfo(record); | ||||
| reading.setTimeId(record.getTimeId()); | reading.setTimeId(record.getTimeId()); | ||||
| reading.setIsDel(EnumYesOrNo.NO.getCode()); | |||||
| reading.setIsPublic(EnumYesOrNo.NO.getCode()); | reading.setIsPublic(EnumYesOrNo.NO.getCode()); | ||||
| WxEnergyFees fq = new WxEnergyFees(); | WxEnergyFees fq = new WxEnergyFees(); | ||||
| @@ -1018,7 +1031,13 @@ public class WxEnergyServiceImpl implements WxEnergyService { | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| @Override | |||||
| public void setReadingCalcuteIsDel(WxEnergyReadingCalcute record) { | |||||
| WxEnergyReadingCalcute calcute = this.getReadingCalcuteById(record); | |||||
| if (null == calcute) { | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "记录未查询到"); | |||||
| } | |||||
| wxEnergyReadingCalcuteMapper.setIsDel(record.getId(), record.getTenantId(), record.getIsDel()); | |||||
| } | |||||
| } | } | ||||
| @@ -30,11 +30,12 @@ | |||||
| <result column="building_id" jdbcType="BIGINT" property="buildingId"/> | <result column="building_id" jdbcType="BIGINT" property="buildingId"/> | ||||
| <result column="floor_id" jdbcType="BIGINT" property="floorId"/> | <result column="floor_id" jdbcType="BIGINT" property="floorId"/> | ||||
| <result column="price" jdbcType="VARCHAR" property="price"/> | <result column="price" jdbcType="VARCHAR" property="price"/> | ||||
| <result column="is_del" jdbcType="INTEGER" property="isDel"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`cur_number`,`pre_number`,`pre_time`,`pre_by`,`pre_by_name`,`start_time`,`end_time`,`create_by`,`create_by_name`, | `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`cur_number`,`pre_number`,`pre_time`,`pre_by`,`pre_by_name`,`start_time`,`end_time`,`create_by`,`create_by_name`, | ||||
| `update_by`,`update_by_name`,`remark`,`time_id`,`meter_id`,`meter_type`,`meter_rate`,`is_public`,`meter_name`,`shop_id`,`shop_number`,`building_id`,`floor_id`,`price` | |||||
| `update_by`,`update_by_name`,`remark`,`time_id`,`meter_id`,`meter_type`,`meter_rate`,`is_public`,`meter_name`,`shop_id`,`shop_number`,`building_id`,`floor_id`,`price`,`is_del` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -56,6 +57,7 @@ | |||||
| <if test=" null != shopNumber and '' != shopNumber ">and shop_number like concat('%', #{shopNumber},'%')</if> | <if test=" null != shopNumber and '' != shopNumber ">and shop_number like concat('%', #{shopNumber},'%')</if> | ||||
| <if test=" null != buildingId ">and `building_id` = #{buildingId}</if> | <if test=" null != buildingId ">and `building_id` = #{buildingId}</if> | ||||
| <if test=" null != floorId ">and `floor_id` = #{floorId}</if> | <if test=" null != floorId ">and `floor_id` = #{floorId}</if> | ||||
| <if test=" null != isDel ">and `is_del` = #{isDel}</if> | |||||
| <if test=" null != createByName and '' != createByName ">and create_by_name like concat('%', #{createByName},'%')</if> | <if test=" null != createByName and '' != createByName ">and create_by_name like concat('%', #{createByName},'%')</if> | ||||
| <if test=" null != shopIds "> | <if test=" null != shopIds "> | ||||
| and shop_id in | and shop_id in | ||||
| @@ -104,6 +106,10 @@ | |||||
| <include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
| group by floor_id | group by floor_id | ||||
| </select> | </select> | ||||
| <update id = "setIsDel" parameterType="HashMap"> | |||||
| update wx_energy_meter_reading set is_del = #{isDel} where id = #{id} and `tenant_id` = #{tenantId} | |||||
| </update> | |||||
| </mapper> | </mapper> | ||||
| @@ -18,11 +18,12 @@ | |||||
| <result column="is_imported" jdbcType="INTEGER" property="isImported"/> | <result column="is_imported" jdbcType="INTEGER" property="isImported"/> | ||||
| <result column="import_success" jdbcType="INTEGER" property="importSuccess"/> | <result column="import_success" jdbcType="INTEGER" property="importSuccess"/> | ||||
| <result column="calcute_success" jdbcType="INTEGER" property="calcuteSuccess"/> | <result column="calcute_success" jdbcType="INTEGER" property="calcuteSuccess"/> | ||||
| <result column="is_del" jdbcType="INTEGER" property="isDel"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`create_by`,`create_by_name`, | `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`create_by`,`create_by_name`, | ||||
| `update_by`,`update_by_name`,`remark`,`time_id`,`fees_id`,`is_calcuted`,`is_imported`,`import_success`,`calcute_success` | |||||
| `update_by`,`update_by_name`,`remark`,`time_id`,`fees_id`,`is_calcuted`,`is_imported`,`import_success`,`calcute_success`,`is_del` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -41,6 +42,7 @@ | |||||
| <if test=" null != isImported ">and `is_imported` = #{isImported}</if> | <if test=" null != isImported ">and `is_imported` = #{isImported}</if> | ||||
| <if test=" null != importSuccess ">and `import_success` = #{importSuccess}</if> | <if test=" null != importSuccess ">and `import_success` = #{importSuccess}</if> | ||||
| <if test=" null != calcuteSuccess ">and `calcute_success` = #{calcuteSuccess}</if> | <if test=" null != calcuteSuccess ">and `calcute_success` = #{calcuteSuccess}</if> | ||||
| <if test=" null != isDel ">and `is_del` = #{isDel}</if> | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | ||||
| @@ -62,6 +64,10 @@ | |||||
| <include refid="allColumns"/> | <include refid="allColumns"/> | ||||
| from wx_energy_reading_calcute where id = #{id} and `tenant_id` = #{tenantId} | from wx_energy_reading_calcute where id = #{id} and `tenant_id` = #{tenantId} | ||||
| </select> | </select> | ||||
| <update id = "setIsDel" parameterType="HashMap"> | |||||
| update wx_energy_reading_calcute set is_del = #{isDel} where id = #{id} and `tenant_id` = #{tenantId} | |||||
| </update> | |||||
| </mapper> | </mapper> | ||||
| @@ -12,10 +12,11 @@ | |||||
| <result column="print_data_json" jdbcType="VARCHAR" property="printDataJson"/> | <result column="print_data_json" jdbcType="VARCHAR" property="printDataJson"/> | ||||
| <result column="is_edit" jdbcType="INTEGER" property="isEdit"/> | <result column="is_edit" jdbcType="INTEGER" property="isEdit"/> | ||||
| <result column="default_value" jdbcType="VARCHAR" property="defaultValue"/> | <result column="default_value" jdbcType="VARCHAR" property="defaultValue"/> | ||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`name`,`is_del`,`remark`,`type`,`sort`,`print_data_type`,`print_data_json`,`is_edit`,`default_value` | |||||
| `id`,`name`,`is_del`,`remark`,`type`,`sort`,`print_data_type`,`print_data_json`,`is_edit`,`default_value`,`tenant_id` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -44,6 +45,10 @@ | |||||
| <if test=" null != isEdit "> | <if test=" null != isEdit "> | ||||
| and `is_edit` = #{isEdit} | and `is_edit` = #{isEdit} | ||||
| </if> | </if> | ||||
| <if test=" null != tenantId "> | |||||
| and (`tenant_id` = #{tenantId} or `tenant_id` is null) | |||||
| </if> | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||