| | |
| | | STRIPE_INTERFERENCE("SCREENSTRIP", "条纹干扰","VIDEO"), |
| | | SCREEN_OCCLUSION("SCREENSHADE", "画面遮挡","VIDEO"), |
| | | ABNORMAL_CLARITY("SCREENBLUR", "清晰度异常","VIDEO"), |
| | | //新增的图像异常,合并前面所有异常类型 |
| | | ABNORMAL_PIC("ABNORMALPIC", "图像异常","VIDEO"), |
| | | // ABNORMAL_BRIGHTNESS("SCREENLIGHT", "亮度异常","VIDEO"), |
| | | OSD_ERROR("OSD", "osd异常","VIDEO"), |
| | | // VIDEO_LOSS("VIDEOMISS", "录像缺失","VIDEO"), |
| | |
| | | @TableField("which_month") |
| | | private Integer whichMonth; |
| | | |
| | | |
| | | @ApiModelProperty("发布状态") |
| | | @TableField("status") |
| | | private String status; |
| | | } |
| | |
| | | |
| | | private Integer unitId; |
| | | |
| | | private String status; |
| | | |
| | | private Integer contractId; |
| | | |
| | | private Integer whichYear; |
| | | } |
| | | |
| | |
| | | /** 最新一条核算标识 */ |
| | | private Boolean latest; |
| | | |
| | | private String status; |
| | | public static CalculateRecordVO getVoByEntity(@NonNull CalculateRecord entity, CalculateRecordVO vo) { |
| | | if(vo == null) { |
| | | vo = new CalculateRecordVO(); |
| | |
| | | /** 合同 */ |
| | | private Integer contractId; |
| | | |
| | | private Integer whichYear; |
| | | /** 运维单位 */ |
| | | private String unitName; |
| | | |
| | |
| | | /** 明细 */ |
| | | private List<CalculateRecordVO> recordList; |
| | | |
| | | private Integer whichYear; |
| | | |
| | | public static CalculateReportVO getVoByEntity(@NonNull CalculateReport entity, CalculateReportVO vo) { |
| | | if(vo == null) { |
| | | vo = new CalculateReportVO(); |
| | |
| | | package com.ycl.platform.controller; |
| | | |
| | | import com.ycl.platform.domain.entity.CalculateRecord; |
| | | import com.ycl.platform.domain.form.CalculateReportBackfillForm; |
| | | import com.ycl.platform.domain.query.CalculateReportQuery; |
| | | import com.ycl.platform.service.CalculateReportService; |
| | |
| | | return calculateReportService.backfill(form); |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | @GetMapping("/{contractId}/{whichYear}") |
| | | @ApiOperation(value = "详情", notes = "详情") |
| | | @PreAuthorize("@ss.hasPermi('system:calculate:report:detail')") |
| | | public Result detail(@PathVariable("id") Long id) { |
| | | return calculateReportService.detail(id); |
| | | public Result detail(@PathVariable("contractId") Integer contractId,@PathVariable("whichYear") Integer whichYear) { |
| | | CalculateReportQuery query = new CalculateReportQuery(); |
| | | query.setContractId(contractId); |
| | | query.setWhichYear(whichYear); |
| | | return calculateReportService.detail(query); |
| | | } |
| | | |
| | | @PutMapping("/status/{reportId}") |
| | | @PutMapping("/status/{contractId}/{whichYear}") |
| | | @ApiOperation(value = "修改发布状态", notes = "修改发布状态") |
| | | @PreAuthorize("@ss.hasPermi('system:calculate:report:status')") |
| | | public Result updatePublishStatus(@PathVariable("reportId") Long reportId) { |
| | | return calculateReportService.updatePublishStatus(reportId); |
| | | public Result updatePublishStatus(@PathVariable("contractId") Integer contractId,@PathVariable("whichYear") Integer whichYear) { |
| | | return calculateReportService.updatePublishStatus(contractId,whichYear); |
| | | } |
| | | |
| | | @PutMapping("/status/detail/{id}/{status}") |
| | | @ApiOperation(value = "修改发布状态", notes = "修改发布状态") |
| | | @PreAuthorize("@ss.hasPermi('system:calculate:report:status')") |
| | | public Result updatePublishStatusById(@PathVariable("id") Integer id,@PathVariable("status") String status) { |
| | | |
| | | return calculateReportService.updatePublishStatusById(id,status); |
| | | } |
| | | @PostMapping("/export") |
| | | @ApiOperation(value = "导出", notes = "导出") |
| | | @PreAuthorize("@ss.hasPermi('system:calculate:report:export')") |
| | |
| | | |
| | | import com.ycl.platform.domain.entity.CalculateRecord; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.form.CalculateReportBackfillForm; |
| | | import com.ycl.platform.domain.vo.CalculateRecordVO; |
| | | import com.ycl.platform.domain.form.CalculateRecordForm; |
| | | |
| | |
| | | @Mapper |
| | | public interface CalculateRecordMapper extends BaseMapper<CalculateRecord> { |
| | | |
| | | public void updateBatch(List<CalculateReportBackfillForm.RecordForm> list); |
| | | |
| | | void batchPublish(Integer contractId, Integer whichYear); |
| | | |
| | | void updatePublishById(Integer id, String status); |
| | | } |
| | |
| | | * @param id 核算ID |
| | | * @return |
| | | */ |
| | | CalculateReportDetailVO getById(@Param("id") Long id); |
| | | CalculateReportDetailVO getById(@Param("query") CalculateReportQuery query); |
| | | |
| | | /** |
| | | * 导出数据 |
| | |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result detail(Long id); |
| | | Result detail(CalculateReportQuery query); |
| | | |
| | | /** |
| | | * 列表 |
| | |
| | | * @param reportId |
| | | * @return |
| | | */ |
| | | Result updatePublishStatus(Long reportId); |
| | | |
| | | Result updatePublishStatus(Integer contractId,Integer whichYear); |
| | | /** |
| | | * 修改发布状态 |
| | | * |
| | | * @param reportId |
| | | * @return |
| | | */ |
| | | Result updatePublishStatusById(Integer id,String status); |
| | | /** |
| | | * 导出 |
| | | * @param response 响应 |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result detail(Long id) { |
| | | public Result detail(CalculateReportQuery query) { |
| | | // 明细列表 |
| | | CalculateReportDetailVO detail = baseMapper.getById(id); |
| | | CalculateReportDetailVO detail = baseMapper.getById(query); |
| | | if (Objects.nonNull(detail) && ! CollectionUtils.isEmpty(detail.getRecordList())) { |
| | | if (CalculateReportStatusEnum.NOT_PUBLISH.equals(detail.getStatus())) { |
| | | detail.getRecordList().get(0).setLatest(Boolean.TRUE); |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Result backfill(CalculateReportBackfillForm form) { |
| | | CalculateReport report = baseMapper.selectById(form.getId()); |
| | | if (Objects.isNull(report)) { |
| | | throw new RuntimeException("该核算报告不存在"); |
| | | } |
| | | if (CalculateReportStatusEnum.PUBLISHED.equals(report.getStatus())) { |
| | | throw new RuntimeException("最新一次核算报告已经发布,无法修改"); |
| | | } |
| | | CalculateReportBackfillForm.RecordForm latestRecord = form.getRecordList().get(0); |
| | | CalculateRecord beforeRecord = calculateRecordMapper.selectById(latestRecord.getId()); |
| | | if (Objects.isNull(beforeRecord)) { |
| | | throw new RuntimeException("最近一次核算记录不存在"); |
| | | } |
| | | // 计算得到扣款总额(只算最近一条) |
| | | BigDecimal totalDeduct = report.getDeductMoney().subtract(latestRecord.getDeductMoney()).add(latestRecord.getDeductMoney()); |
| | | report.setDeductMoney(totalDeduct); |
| | | baseMapper.updateById(report); |
| | | |
| | | beforeRecord.setDeductMoney(latestRecord.getDeductMoney()); |
| | | calculateRecordMapper.updateById(beforeRecord); |
| | | // CalculateReport report = baseMapper.selectById(form.getId()); |
| | | // if (Objects.isNull(report)) { |
| | | // throw new RuntimeException("该核算报告不存在"); |
| | | // } |
| | | // if (CalculateReportStatusEnum.PUBLISHED.equals(report.getStatus())) { |
| | | // throw new RuntimeException("最新一次核算报告已经发布,无法修改"); |
| | | // } |
| | | // CalculateReportBackfillForm.RecordForm latestRecord = form.getRecordList().get(0); |
| | | // CalculateRecord beforeRecord = calculateRecordMapper.selectById(latestRecord.getId()); |
| | | // if (Objects.isNull(beforeRecord)) { |
| | | // throw new RuntimeException("最近一次核算记录不存在"); |
| | | // } |
| | | // // 计算得到扣款总额(只算最近一条) |
| | | // BigDecimal totalDeduct = report.getDeductMoney().subtract(latestRecord.getDeductMoney()).add(latestRecord.getDeductMoney()); |
| | | // report.setDeductMoney(totalDeduct); |
| | | // baseMapper.updateById(report); |
| | | // |
| | | // beforeRecord.setDeductMoney(latestRecord.getDeductMoney()); |
| | | // calculateRecordMapper.updateById(beforeRecord); |
| | | List<CalculateReportBackfillForm.RecordForm> recordList = form.getRecordList(); |
| | | if(!CollectionUtils.isEmpty(recordList)) calculateRecordMapper.updateBatch(recordList); |
| | | return Result.ok("操作成功"); |
| | | } |
| | | |
| | | @Override |
| | | public Result updatePublishStatus(Long reportId) { |
| | | CalculateReport report = baseMapper.selectById(reportId); |
| | | if (Objects.isNull(report)) { |
| | | throw new RuntimeException("该核算报告不存在"); |
| | | } |
| | | if (CalculateReportStatusEnum.NOT_PUBLISH.equals(report.getStatus())) { |
| | | report.setStatus(CalculateReportStatusEnum.PUBLISHED); |
| | | } else if (CalculateReportStatusEnum.PUBLISHED.equals(report.getStatus())) { |
| | | report.setStatus(CalculateReportStatusEnum.NOT_PUBLISH); |
| | | } |
| | | baseMapper.updateById(report); |
| | | public Result updatePublishStatus(Integer contractId,Integer whichYear) { |
| | | |
| | | calculateRecordMapper.batchPublish(contractId,whichYear); |
| | | return Result.ok("操作成功"); |
| | | } |
| | | |
| | | @Override |
| | | public Result updatePublishStatusById(Integer id, String status) { |
| | | calculateRecordMapper.updatePublishById(id,status); |
| | | return Result.ok("操作成功"); |
| | | } |
| | | |
| | |
| | | calculateMoneyRuleService.saveBatch(JSON.parseArray(tContract.getRuleList(), CalculateMoneyRule.class).stream().peek( |
| | | calculateMoneyRule -> calculateMoneyRule.setContractId(tContract.getId().intValue()) |
| | | ).collect(Collectors.toList())); |
| | | |
| | | |
| | | return AjaxResult.success("操作成功"); |
| | | } |
| | | |
| | |
| | | WorkOrder workOrder = new WorkOrder(); |
| | | // 信号缺失 |
| | | if (-1 == item.getSigna1()) { |
| | | this.genWorkOrder(workOrder, ErrorType.SIGNAL_LOSS, item.getDeviceId()); |
| | | this.genWorkOrder(workOrder, ErrorType.ABNORMAL_PIC, item.getDeviceId()); |
| | | } |
| | | // 画面偏色 |
| | | if (-1 == item.getColor()) { |
| | | this.genWorkOrder(workOrder, ErrorType.SCREEN_COLOR_DEVIATION, item.getDeviceId()); |
| | | this.genWorkOrder(workOrder, ErrorType.ABNORMAL_PIC, item.getDeviceId()); |
| | | } |
| | | // 雪花干扰 |
| | | if (-1 == item.getSnow()) { |
| | | this.genWorkOrder(workOrder, ErrorType.SNOW_STORM, item.getDeviceId()); |
| | | this.genWorkOrder(workOrder, ErrorType.ABNORMAL_PIC, item.getDeviceId()); |
| | | } |
| | | // 条纹干扰 |
| | | if (-1 == item.getStripe()) { |
| | | this.genWorkOrder(workOrder, ErrorType.STRIPE_INTERFERENCE, item.getDeviceId()); |
| | | this.genWorkOrder(workOrder, ErrorType.ABNORMAL_PIC, item.getDeviceId()); |
| | | } |
| | | // 画面遮挡 |
| | | if (-1 == item.getShade()) { |
| | | this.genWorkOrder(workOrder, ErrorType.SCREEN_OCCLUSION, item.getDeviceId()); |
| | | this.genWorkOrder(workOrder, ErrorType.ABNORMAL_PIC, item.getDeviceId()); |
| | | } |
| | | // 清晰度异常 |
| | | if (-1 == item.getBlur()) { |
| | | this.genWorkOrder(workOrder, ErrorType.ABNORMAL_CLARITY, item.getDeviceId()); |
| | | this.genWorkOrder(workOrder, ErrorType.ABNORMAL_PIC, item.getDeviceId()); |
| | | } |
| | | // // 亮度异常 |
| | | // if (-1 == item.getLight()) { |
| | |
| | | package com.ycl.task; |
| | | |
| | | import com.ycl.platform.domain.entity.ContractResult; |
| | | import com.ycl.platform.domain.entity.ContractResultRecord; |
| | | import com.ycl.platform.domain.entity.ContractScore; |
| | | import com.ycl.platform.domain.entity.TContract; |
| | | import com.ycl.platform.domain.entity.*; |
| | | import com.ycl.platform.mapper.CalculateRecordMapper; |
| | | import com.ycl.platform.service.CalculateRecordService; |
| | | import com.ycl.platform.service.IContractResultService; |
| | | import com.ycl.platform.service.IContractScoreService; |
| | | import com.ycl.platform.service.ITContractService; |
| | | import com.ycl.utils.DateUtils; |
| | | import com.ycl.utils.bean.BeanUtils; |
| | | import enumeration.general.CalculateReportStatusEnum; |
| | | import lombok.Data; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | private final ITContractService contractService; |
| | | private final IContractScoreService contractScoreService; |
| | | private final IContractResultService checkResultService; |
| | | |
| | | private final CalculateRecordMapper calculateRecordMapper; |
| | | private String startTime; |
| | | private String endTime; |
| | | |
| | |
| | | * 每个月1号执行,统计考核结果 |
| | | */ |
| | | @Transactional |
| | | // @PostConstruct //启动时执行一次 |
| | | public void contractResultTask() { |
| | | // 查询有效期内的合同 |
| | | List<TContract> list = contractService.selectUsingContract(); |
| | |
| | | // 新增考核结果记录 |
| | | List<ContractResultRecord> contractResultRecord = getContractResultRecord(contractScore, contractResult); |
| | | checkResultService.saveBatchRecord(contractResultRecord); |
| | | // 新增核算明细记录 |
| | | CalculateRecord calculateRecord = new CalculateRecord(); |
| | | calculateRecord.setScore(contractResult.getScore()); |
| | | calculateRecord.setContractId(Integer.parseInt(tContract.getId()+"")); |
| | | calculateRecord.setCreateTime(new Date()); |
| | | calculateRecord.setUpdateTime(new Date()); |
| | | calculateRecord.setStatus(CalculateReportStatusEnum.NOT_PUBLISH.getValue()); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calculateRecord.setWhichYear(calendar.get(Calendar.YEAR)); |
| | | calculateRecord.setWhichMonth(calendar.get(Calendar.MONTH)+1); |
| | | calculateRecordMapper.insert(calculateRecord); |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | //月底计算在线率分数 |
| | | public void calculateOnlineScore() { |
| | | //TODO:检查表 |
| | | log.info("开始计算合同点位在线率分数"); |
| | | //月底需要统计平均在线率然后进行积分扣除 |
| | | String mouthStart = DateUtils.getMouthStart(new Date()); |
| | |
| | | } |
| | | } |
| | | //点位异常情况处理(镜头异常、摄像头遮挡等) |
| | | if (ErrorType.SCREEN_OCCLUSION.getValue().equals(errorType) || ErrorType.SIGNAL_LOSS.getValue().equals(errorType) || ErrorType.SCREEN_COLOR_DEVIATION.getValue().equals(errorType) || ErrorType.SNOW_STORM.getValue().equals(errorType) || ErrorType.STRIPE_INTERFERENCE.getValue().equals(errorType) || ErrorType.ABNORMAL_CLARITY.getValue().equals(errorType)) { |
| | | if (ErrorType.ABNORMAL_PIC.getValue().equals(errorType)) { |
| | | if (!CollectionUtils.isEmpty(monitorRuleMap)) { |
| | | siteRuleMap.forEach((contractId, rules) -> { |
| | | Integer unitId = rules.get(0).getUnitId(); |
| | |
| | | mongodb: |
| | | # uri: mongodb://root1:yunwei%402024@192.168.3.88:27017/zgyw?authSource=admin |
| | | uri: mongodb://localhost:27017/zgyw |
| | | auto-index-creation: true |
| | | # auto-index-creation: true |
| | | |
| | | # 拉取数据请求配置 |
| | | request: |
| | |
| | | <collection property="recordList" column="contract_id" select="selectByContractId" ofType="com.ycl.platform.domain.vo.CalculateMoneyRuleVO"/> |
| | | </resultMap> |
| | | |
| | | <update id="updateBatch" parameterType="java.util.List"> |
| | | update t_calculate_record |
| | | <trim prefix="set" suffixOverrides=","><!-- 表示在生成的 SQL 语句前面添加 set 关键字,并移除末尾逗号 --> |
| | | <trim prefix="deduct_money =case" suffix="end,"><!-- 构造case语法 末尾加上end,如果需要更新多个字段复制这个trim --> |
| | | <foreach collection="list" item="item"> |
| | | when id=#{item.id} then #{item.deductMoney} |
| | | </foreach> |
| | | </trim> |
| | | </trim> |
| | | where id in |
| | | <foreach collection="list" index="index" item="item" separator="," open="(" close=")"> |
| | | #{item.id,jdbcType=BIGINT} |
| | | </foreach> |
| | | </update> |
| | | |
| | | <update id="batchPublish"> |
| | | update t_calculate_record set status = 'publish' |
| | | where contract_id = #{contractId} and which_year =#{whichYear} |
| | | </update> |
| | | |
| | | <update id="updatePublishById"> |
| | | update t_calculate_record set status = #{status} |
| | | where id = #{id} |
| | | </update> |
| | | </mapper> |
| | |
| | | <result column="latestDeductMoney" property="latestDeductMoney"/> |
| | | </resultMap> |
| | | |
| | | <select id="page" resultMap="BaseResultMap"> |
| | | <!-- <select id="page" resultMap="BaseResultMap">--> |
| | | <!-- SELECT--> |
| | | <!-- tcr.contract_id,--> |
| | | <!-- tyu.unit_name,--> |
| | | <!-- tc.name,--> |
| | | <!-- tcr.id,--> |
| | | <!-- tcr.status,--> |
| | | <!-- tcr.deduct_money,--> |
| | | <!-- tcr.create_time,--> |
| | | <!-- tcr.update_time,--> |
| | | <!-- tcr.calculate_time,--> |
| | | <!-- tcr.latest_time,--> |
| | | <!-- (SELECT a.deduct_money FROM (SELECT deduct_money,which_year, which_month FROM t_calculate_record WHERE contract_id = tcr.contract_id ORDER BY which_year, which_month DESC limit 1) a) as latestDeductMoney--> |
| | | <!-- FROM--> |
| | | <!-- t_calculate_report tcr--> |
| | | <!-- INNER JOIN t_contract tc ON tcr.contract_id = tc.id--> |
| | | <!-- INNER JOIN t_yw_unit tyu ON tyu.id = tc.unit_id--> |
| | | <!-- <where>--> |
| | | <!-- AND tcr.deleted = 0 AND tc.deleted = 0 AND tyu.deleted = 0--> |
| | | <!-- <if test="query.unitName != null and query.unitName != '' ">--> |
| | | <!-- AND tyu.unit_name like concat('%', #{query.unitName}, '%')--> |
| | | <!-- </if>--> |
| | | <!-- <if test="query.unitId != null">--> |
| | | <!-- AND tyu.id = #{query.unitId}--> |
| | | <!-- </if>--> |
| | | <!-- </where>--> |
| | | <!-- </select>--> |
| | | <select id="page" resultType="com.ycl.platform.domain.vo.CalculateReportVO"> |
| | | SELECT |
| | | tcr.contract_id, |
| | | tyu.unit_name, |
| | | tc.name, |
| | | tcr.id, |
| | | tcr.status, |
| | | tcr.deduct_money, |
| | | tcr.create_time, |
| | | tcr.update_time, |
| | | tcr.calculate_time, |
| | | tcr.latest_time, |
| | | (SELECT a.deduct_money FROM (SELECT deduct_money,which_year, which_month FROM t_calculate_record WHERE contract_id = tcr.contract_id ORDER BY which_year, which_month DESC limit 1) a) as latestDeductMoney |
| | | tcr.id, |
| | | tcr.contract_id, |
| | | tyu.unit_name, |
| | | tc.name as contractName, |
| | | tcr.which_year, |
| | | SUM(tcr.deduct_money) AS deductMoney, |
| | | MAX(tcr.create_time) AS latest_time, |
| | | ( |
| | | SELECT deduct_money |
| | | FROM t_calculate_record |
| | | WHERE contract_id = tcr.contract_id |
| | | AND which_year = tcr.which_year |
| | | ORDER BY which_month DESC |
| | | LIMIT 1 |
| | | ) AS latestDeductMoney |
| | | FROM |
| | | t_calculate_report tcr |
| | | t_calculate_record tcr |
| | | INNER JOIN t_contract tc ON tcr.contract_id = tc.id |
| | | INNER JOIN t_yw_unit tyu ON tyu.id = tc.unit_id |
| | | <where> |
| | | AND tcr.deleted = 0 AND tc.deleted = 0 AND tyu.deleted = 0 |
| | | <if test="query.unitName != null and query.unitName != '' "> |
| | | AND tyu.unit_name like concat('%', #{query.unitName}, '%') |
| | | </if> |
| | | <if test="query.unitId != null"> |
| | | AND tyu.id = #{query.unitId} |
| | | <if test="query.status!=null and query.status !=''"> |
| | | AND tcr.status = #{query.status} |
| | | </if> |
| | | </where> |
| | | group by contract_id,which_year |
| | | </select> |
| | | |
| | | <resultMap id="DetailResultMap" type="com.ycl.platform.domain.vo.CalculateReportDetailVO"> |
| | | <result column="id" property="id"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="unit_name" property="unitName"/> |
| | | <result column="name" property="contractName"/> |
| | | <result column="contract_id" property="contractId"/> |
| | | <result column="calculate_time" property="calculateTime"/> |
| | | <result column="deduct_money" property="deductMoney"/> |
| | | <result column="which_year" property="whichYear"/> |
| | | <result column="status" property="status"/> |
| | | <collection property="ruleList" column="contract_id" ofType="com.ycl.platform.domain.vo.CalculateMoneyRuleVO" |
| | | select="selectRuleByContractId"/> |
| | | <collection property="recordList" column="contract_id" ofType="com.ycl.platform.domain.vo.CalculateRecordVO" |
| | | <collection property="recordList" column="{contractId=contract_id, whichYear=which_year}" ofType="com.ycl.platform.domain.vo.CalculateRecordVO" |
| | | select="selectRecordByContractId"/> |
| | | </resultMap> |
| | | |
| | |
| | | score, |
| | | deduct_money as deductMoney, |
| | | which_year as whichYear, |
| | | which_month as whichMonth |
| | | which_month as whichMonth, |
| | | status |
| | | FROM |
| | | t_calculate_record |
| | | WHERE |
| | | contract_id = #{contractId} AND deleted = 0 |
| | | contract_id = #{contractId} AND which_year = #{whichYear} AND deleted = 0 |
| | | ORDER BY |
| | | create_time DESC |
| | | |
| | | create_time |
| | | </select> |
| | | |
| | | <select id="getById" resultMap="DetailResultMap"> |
| | |
| | | tc.name, |
| | | tcr.id, |
| | | tcr.contract_id, |
| | | tcr.deduct_money, |
| | | tcr.create_time, |
| | | tcr.update_time, |
| | | tcr.calculate_time, |
| | | tcr.status |
| | | FROM t_calculate_report tcr |
| | | tcr.which_year |
| | | FROM t_calculate_record tcr |
| | | INNER JOIN t_contract tc ON tcr.contract_id = tc.id |
| | | INNER JOIN t_yw_unit tyu ON tyu.id = tc.unit_id |
| | | WHERE tcr.id = #{id} |
| | | WHERE tcr.contract_id = #{query.contractId} AND tcr.which_year = #{query.whichYear} |
| | | limit 1 |
| | | </select> |
| | | |
| | | <select id="exportData" resultType="com.ycl.platform.domain.excel.CalculateExport"> |