瀏覽代碼

结算单查询

guoweisong 2 年之前
父節點
當前提交
3e5b9157e6

+ 4 - 4
src/main/java/com/ydtech/modules/fnc/dao/InsPlyIncomeMapper.java

@@ -28,20 +28,20 @@ public interface InsPlyIncomeMapper extends BaseMapper<InsPlyIncome> {
             "left join esm_ins_company c on a.company_id=c.id " +
             "where DATE_FORMAT(pay_date, '%Y-%m-%d') " +
             "between DATE_FORMAT(#{startDate}, '%Y-%m-%d') and DATE_FORMAT(#{endDate}, '%Y-%m-%d')" +
-            "<if test='companyId!=\"\" '>" +
+            "<if test='companyId!=\"\" and companyId!=null '>" +
             "   and a.company_id=#{companyId} " +
             "</if> "+
-            "<if test='deptId!=\"\" '>" +
+            "<if test='deptId!=\"\" and deptId!=null '>" +
             "   and a.dept_id like  CONCAT(#{deptId}, '%') " +
             "</if> "+
-            "<if test='agreementId!=\"\" '>" +
+            "<if test='agreementId!=\"\" and agreementId!=null '>" +
             "   and a.agreement_id=#{agreementId} " +
             "</if> "+
             //待结算清单
             "<if test='flag==\"0\" '>" +
             "   and a.all_fee_value!=IFNULL(a.final_fee_value,0)+IFNULL(a.doing_fee_value,0)" +
             "</if> "+
-            "<if test='licenseno!=\"\" '>" +
+            "<if test='licenseno!=\"\" and licenseno!=null '>" +
             "   and a.licenseno=#{licenseno} " +
             "</if> "
             ,"</script>"}

+ 2 - 2
src/main/java/com/ydtech/modules/fnc/dao/InsPlySettleMapper.java

@@ -35,10 +35,10 @@ public interface InsPlySettleMapper extends BaseMapper<InsPlySettle> {
             "and DATE_FORMAT(a.create_time, '%Y-%m-%d') " +
             "between DATE_FORMAT(#{startDate}, '%Y-%m-%d') and DATE_FORMAT(#{endDate}, '%Y-%m-%d') " +
             "</if> "+
-            "<if test='companyId!=\"\" '>" +
+            "<if test='companyId!=\"\" and companyId!=null '>" +
             "   and a.company_id=#{companyId} " +
             "</if> "+
-            "<if test='deptId!=\"\" '>" +
+            "<if test='deptId!=\"\" and deptId!=null '>" +
             "   and a.dept_id like  CONCAT(#{deptId}, '%') " +
             "</if> "
             ,"</script>"}