Kaynağa Gözat

徐珊发票列表调整

sangwenwei 6 ay önce
ebeveyn
işleme
357aab2544

+ 0 - 2
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/mapper/CwFinanceInvoiceMapper.java

@@ -20,8 +20,6 @@ import java.util.List;
 public interface CwFinanceInvoiceMapper extends BaseMapper<CwFinanceInvoice> {
 
     public IPage<CwFinanceInvoiceDTO> findList(Page<CwFinanceInvoiceDTO> page, @Param(Constants.WRAPPER) QueryWrapper<CwFinanceInvoice> queryWrapper);
-    //只针对于徐珊进行的列表查询
-    public IPage<CwFinanceInvoiceDTO> findList2(Page<CwFinanceInvoiceDTO> page, @Param(Constants.WRAPPER) QueryWrapper<CwFinanceInvoice> queryWrapper);
 
     /**
      * 下载导出

+ 2 - 68
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/mapper/xml/CwFinanceInvoiceMapper.xml

@@ -341,74 +341,8 @@
         LEFT JOIN act_ru_task d ON fi.proc_ins_id = d.PROC_INST_ID_
         LEFT JOIN cw_project_records pr on a.program_id=pr.id
         ${ew.customSqlSegment}
-        ORDER BY
-        fi.create_time DESC, cfid.number asc
-    </select>
-
-    <select id="findList2" resultMap="BaseResultMap">
-        select DISTINCT a.id as 'baseId',
-        <include refid="Base_Column_List"></include>,
-        su.name as operator,
-        so.name as operator_office,
-        d.ID_ AS task_id,
-        (
-        case
-        when a.type = '0' then (concat('其他:',a.program_name))
-        when a.type = '1' then (select rpr.project_name from cw_project_records rpr where id = a.program_id)
-        when a.type = '2' then (select rpr.project_name from cw_project_records rpr where id = (select project_id from cw_project_report where id = a.program_id))
-        when a.type = '4' then (select rpr.project_name from cw_project_records rpr where id = a.program_id)
-        else '' end
-        ) as programName,
-
-        (
-        case
-        when a.type = '0' then (fi.report_type)
-        when a.type = '1' then (select rpr.report_type from cw_project_records rpr where id = a.program_id)
-        when a.type = '4' then (select rpr.report_type from cw_project_records rpr where id = a.program_id)
-        when a.type = '2' then (select rpr.report_type from cw_project_records rpr where id = (select project_id from cw_project_report where id = a.program_id))
-        else '' end
-        ) as reportType,
-        (
-        case
-        when a.type = '0' then ("")
-        when a.type = '1' then (select rpr.project_classification from cw_project_records rpr where id = a.program_id)
-        when a.type = '4' then (select rpr.project_classification from cw_project_records rpr where id = a.program_id)
-        when a.type = '2' then (select rpr.project_classification from cw_project_records rpr where id = (select project_id from cw_project_report where id = a.program_id))
-        else '' end
-        ) as projectClassification,
-        (
-        CASE WHEN a.type = '0' THEN ( "")
-        WHEN a.type = '1' THEN ( select GROUP_CONCAT(cprnlz.report_no) from cw_project_report cprz
-        left join cw_project_report_new_line cprnlz on cprz.id = cprnlz.report_id
-        left join cw_project_records cprsz on cprz.project_id= cprsz.id
-        where cprsz.id = a.program_id )
-        WHEN a.type = '2' THEN (
-        select cprnlz.report_no from cw_project_report cprz
-        left join cw_project_report_new_line cprnlz on cprz.id = cprnlz.report_id
-        where cprz.id = a.program_id)
-        WHEN a.type = '4' THEN ( select GROUP_CONCAT(cprnlz.report_no) from cw_project_report cprz
-        left join cw_project_report_new_line cprnlz on cprz.id = cprnlz.report_id
-        left join cw_project_records cprsz on cprz.project_id= cprsz.id
-        where cprsz.id = a.program_id )ELSE ''
-        END
-        ) AS reportNos,
-        cfid.number as "number",
-        ifnull(cfid.account,"0") as "accountDetail",
-        a.program_id,
-        pr.is_pre_invoice as isPreInvoice,
-        a.type as 'recordType'
-        from cw_finance_invoice_base a
-        left join cw_finance_invoice fi on a.invoice_id = fi.id
-        left join cw_finance_invoice_detail cfid on cfid.invoice_id = fi.id and cfid.del_flag = '0'
-        left join sys_user su on fi.create_by_id = su.id and su.del_flag = '0'
-        left join sys_user su1 on fi.reconciliation_people = su1.id and su1.del_flag = '0'
-        left join sys_user_manage_office sumo on sumo.office_id = su.office_id
-        left join sys_office so on su.office_id = so.id and so.del_flag = '0'
-        LEFT JOIN act_ru_task d ON fi.proc_ins_id = d.PROC_INST_ID_
-        LEFT JOIN cw_project_records pr on a.program_id=pr.id
-        ${ew.customSqlSegment}
-        ORDER BY
-        fi.billing_date DESC
+--         ORDER BY
+--         fi.create_time DESC, cfid.number asc
     </select>
 
 <select id="findExportList" resultMap="BaseExportResultMap">

+ 3 - 1
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/service/CwFinanceInvoiceService.java

@@ -356,12 +356,14 @@ public class CwFinanceInvoiceService extends ServiceImpl<CwFinanceInvoiceMapper,
             for (RoleDTO roleDTO : userDTO.getRoleDTOList()) {
                 RoleDTO dtoById = SpringUtil.getBean(IRoleApi.class).getRoleDTOById(roleDTO.getId());
                 if ("szbgqzgzdb".equals(dtoById.getEnName())){
-                    list = cwFinanceInvoiceMapper.findList2(page,queryWrapper);
+                    queryWrapper.orderByDesc("fi.billing_date");
+                    list = cwFinanceInvoiceMapper.findList(page,queryWrapper);
                     break;
                 }
             }
         }
         if (null == list){
+            queryWrapper.orderByDesc("fi.create_time").orderByAsc("cfid.number");
             if(StringUtils.isNotBlank(export) && "export".equals(export)){
                 list = cwFinanceInvoiceMapper.findExportList(page, queryWrapper);
                 list.getRecords().forEach(item->{