PBLM_ID,PBLM_NAME_BZ,CHECK_POINT_BZ,SN_NUM_BZ,PBLM_DESC_BZ, OBJ_ID, OBJ_TYPE, INSP_GROUP_ID, PGUID, INSP_PBLM_TYPE, INSP_PBLM_CODE, INSP_PBLM_NAME, INSP_PBLM_DESC, INSP_ADD_DESC, PBLM_LONG, PBLM_LAT, IF_CASE_PBLM, INSP_PBLM_ORG_NAME, PBLM_PERS_NAME, INSP_PBLM_CATE, PBLM_STAT, REVI_OPIN, REVI_CONC, REVI_ORG_GUID, DATA_STAT, COLL_TIME, REC_PERS, NOTE, REGID, COMMON_FILE_IDS, FILE_NO, FILE_NO_NUMBER, PBLMS_ID, PBLMS_TYPE_ID, VILL_TYPE, CWS_CODE, VILLAGE_CODE, PBLM_DEL_ID, PBLM_DEL_PERS, PBLM_DEL_PERSNM, PBLM_DEL_TM, PBLM_DEL_NOTE,QUOTE, PROVINCIAL, BELONG_ORG_ID, BELONG_AD_CODE #{pblmId},#{pblmNameBz},#{checkPointBz},#{snNumBz},#{pblmDescBz}, #{objId}, #{objType}, #{inspGroupId}, #{pguid}, #{inspPblmType}, #{inspPblmCode}, #{inspPblmName}, #{inspPblmDesc}, #{inspAddDesc}, #{pblmLong}, #{pblmLat}, #{ifCasePblm}, #{inspPblmOrgName}, #{pblmPersName}, #{inspPblmCate}, #{pblmStat}, #{reviOpin}, #{reviConc}, #{reviOrgGuid}, #{dataStat}, #{collTime}, #{recPers}, #{note}, #{regid}, #{commonFileIds}, #{fileNo}, #{fileNoNumber}, #{pblmsId}, #{pblmsTypeId}, #{villType}, #{cwsCode}, #{villageCode}, #{pblmDelId}, #{pblmDelPers}, #{pblmDelPersnm}, STR_TO_DATE(#{pblmDelTm},'%Y-%m-%d %H:%i:%s'), #{pblmDelNote},#{quote},#{provincial},#{belongOrgId},#{belongAdCode} attach_Bz, CWS_CODE,HAS_VEDIO,PROBLEM_TYPE,QUALITY_TYPE_ID,DEFECT_TYPE_ID,FDBK_ID,ITEM_ID,WATER_USER_ID,GONGDI_BZ_ID, VILLAGE_CODE, VILL_TYPE, PBLMS_TYPE_ID, REGID, COMMON_FILE_IDS, FILE_NO, FILE_NO_NUMBER, PBLMS_ID, PBLM_ID, OBJ_ID, OBJ_TYPE, INSP_GROUP_ID, PGUID, INSP_PBLM_TYPE, INSP_PBLM_CODE, INSP_PBLM_NAME, INSP_PBLM_DESC, INSP_ADD_DESC, PBLM_LONG, PBLM_LAT, IF_CASE_PBLM, INSP_PBLM_ORG_NAME, PBLM_PERS_NAME, INSP_PBLM_CATE, REL_BASIS, PBLM_STAT, REVI_OPIN, REVI_CONC, REVI_ORG_GUID, DATA_STAT, COLL_TIME, REC_PERS, NOTE,QUOTE, UP_TM,PBLM_NAME_BZ,CHECK_POINT_BZ,SN_NUM_BZ,PBLM_DESC_BZ,NEW_VILL_NAME, PBLM_REASON, PBLM_SGGTN,WTDST_NOTE, OBJ_CODE,OBJ_NAME,OBJ_AD_CODE,SCORE, PROVINCIAL,BELONG_ORG_ID, BELONG_AD_CODE #{attachBz}, #{cwsCode},#{hasVedio},#{problemType},#{qualityTypeId},#{defectTypeId},#{fdbkId},#{itemId},#{waterUserId},#{gongdiBzId}, #{villageCode}, #{villType}, #{pblmsTypeId}, #{regid}, #{commonFileIds}, #{fileNo}, #{fileNoNumber}, #{pblmsId}, #{pblmId}, #{objId}, #{objType}, #{inspGroupId}, #{pguid}, #{inspPblmType}, #{inspPblmCode}, #{inspPblmName}, #{inspPblmDesc}, #{inspAddDesc}, #{pblmLong}, #{pblmLat}, #{ifCasePblm}, #{inspPblmOrgName}, #{pblmPersName}, #{inspPblmCate}, #{relBasis}, #{pblmStat}, #{reviOpin}, #{reviConc}, #{reviOrgGuid}, #{dataStat}, #{collTime}, #{recPers}, #{note},#{quote}, #{uptm},#{pblmNameBz},#{checkPointBz},#{snNumBz},#{pblmDescBz},#{newVillName}, #{pblmReason}, #{pblmSggtn}, #{wtdstNote}, #{objCode}, #{objName}, #{objAdCode}, #{score}, #{provincial}, #{belongOrgId}, #{belongAdCode} and WATER_USER_ID = #{waterUserId} and CWS_CODE = #{cwsCode} and NEW_VILL_NAME = #{newVillName} and PBLM_NAME_BZ = #{pblmNameBz} and SN_NUM_BZ = #{snNumBz} and attach_Bz = #{attachBz} and gongdi_Bz_Id = #{gongdiBzId} and CHECK_POINT_BZ = #{checkPointBz} and PBLM_DESC_BZ = #{pblmDescBz} and REGID = #{regid} and QUOTE = #{quote} and HAS_VEDIO = #{hasVedio} and VILL_TYPE = #{villType} and COMMON_FILE_IDS = #{commonFileIds} and FILE_NO = #{fileNo} and FILE_NO_NUMBER = #{fileNoNumber} and PBLMS_ID = #{pblmsId} and PBLM_ID = #{pblmId} and problem_Type = #{problemType} and OBJ_ID = #{objId} and OBJ_TYPE = #{objType} and INSP_GROUP_ID = #{inspGroupId} and PGUID = #{pguid} and INSP_PBLM_TYPE = #{inspPblmType} and INSP_PBLM_CODE = #{inspPblmCode} and INSP_PBLM_NAME = #{inspPblmName} and INSP_PBLM_DESC like '%${inspPblmDesc}%' and INSP_ADD_DESC = #{inspAddDesc} and PBLM_LONG = #{pblmLong} and PBLM_LAT = #{pblmLat} and IF_CASE_PBLM = #{ifCasePblm} and INSP_PBLM_ORG_NAME = #{inspPblmOrgName} and PBLM_PERS_NAME = #{pblmPersName} and INSP_PBLM_CATE = #{inspPblmCate} and PBLM_STAT = #{pblmStat} and REVI_OPIN = #{reviOpin} and REVI_CONC = #{reviConc} and REVI_ORG_GUID = #{reviOrgGuid} and DATA_STAT = #{dataStat} and COLL_TIME = #{collTime} and REC_PERS = #{recPers} and NOTE = #{note} and DATE_FORMAT(COLL_TIME,'%Y') = #{year} and COLL_TIME > STR_TO_DATE(#{startTime},'%Y-%m-%d %H:%i:%s') and COLL_TIME < STR_TO_DATE(#{endTime},'%Y-%m-%d %H:%i:%s') and DATE_FORMAT(coll_time,'%Y-%m-%d')=#{findTime} and DATE_FORMAT(coll_time,'%Y-%m')=#{monthTime} and OBJ_CODE = #{objCode} and OBJ_NAME = #{objName} and OBJ_AD_CODE = #{objAdCode} and WTDST_NOTE = #{wtdstNote} and PROVINCIAL = #{provincial} and BELONG_ORG_ID = #{belongOrgId} and BELONG_AD_CODE LIKE CONCAT(#{belongAdCode},'%') and INSP_PBLM_CATE = #{inspPblmCate} and IF_CASE_PBLM = #{ifCasePblm} and p.DATA_STAT = #{dataStat} and INSP_PBLM_NAME like '%${inspPblmName}%' and obj_name like '%${name}%' and obj_name like '%${objName}%' and p.obj_ad_code like '${adCode}%' and p.obj_ad_code like '${objAdCode}%' and obj_code like '${province}%' and regid = #{regid} and obj_type = #{objType} and COLL_TIME >= STR_TO_DATE(#{startTime},'%Y-%m-%d') and COLL_TIME=STR_TO_DATE(#{inspPblmTm},'%Y-%m-%d') and COLL_TIME < DATE_ADD(STR_TO_DATE(#{endTime},'%Y-%m-%d'), INTERVAL 1 DAY) and PBLM_Stat = #{pblmStat} and HAS_VEDIO = #{hasVedio} and p.OBJ_ID =#{objId} and p.PROVINCIAL =#{provincial} and p.BELONG_ORG_ID =#{belongOrgId} and p.BELONG_AD_CODE like '${belongAdCode}%' and DATE_FORMAT(p.coll_time,'%Y')= #{year} and pblm_id not in (select pblm_id from BIS_INSP_PBLM_PLIST WHERE pblm_id IS NOT NULL) and pblm_id in (select pblm_id from BIS_INSP_PBLM_PLIST WHERE pblm_id IS NOT NULL) order by coll_time desc and PERS_NAME like '%${persName}%' and INSP_PBLM_CATE = #{inspPblmCate} and IF_CASE_PBLM = #{ifCasePblm} and DATA_STAT = #{dataStat} and INSP_PBLM_NAME like '%${inspPblmName}%' and PBLM_DESC_BZ like '%${pblmDescBz}%' and INSP_PBLMS_NAME like '%${inspPblmsName}%' and NEW_VILL_NAME = #{newVillName} and regid = #{regid} and regid = #{rgstrId} and obj_type = #{objType} and WATER_USER_ID = #{waterUserId} AND CWS_CODE IS NULL AND WATER_USER_ID IS NULL and VILL_TYPE in (${villType}) and village_Code = #{villageCode} and cws_Code = #{cwsCode} and CODE = #{code} and CODE in (${codes}) and HAS_VEDIO = #{hasVedio} and REC_PERS = #{recPers} and OBJ_ID =#{objId} and OBJ_ID in (${objIdes}) and nm like '%${nm}%' and COLL_TIME >= STR_TO_DATE(#{startTime},'%Y-%m-%d') and COLL_TIME=STR_TO_DATE(#{findTime},'%Y-%m-%d') and COLL_TIME < DATE_ADD(STR_TO_DATE(#{endTime},'%Y-%m-%d'), INTERVAL 1 DAY) and PBLM_Stat = #{pblmStat} and srcDesc like '%${srcDesc}%' and oid in (${oides}) and CODE like '${adCode}%' and eng_Scal =#{engScal} and waga_Scal =#{wagaScal} and gate_Type =#{gateType} and sttp =#{sttp} and re_Ptype =#{rePtype} and pnm =#{pnm} and ORG_ID=#{orgId} and ORG_ID is null insert into bis_insp_pblm( ) values ( ) delete from bis_insp_pblm where PBLM_ID = #{id} delete from bis_insp_pblm update bis_insp_pblm set flag_valid = 0 where PBLM_ID = #{id} delete from bis_insp_pblm where obj_type = #{objType} and PBLMS_TYPE_ID in (${pblmsTypeId}) and obj_id in (select obj_id from bis_insp_rsvr_rgstr where rgstr_id = #{rgstrId}) update bis_insp_pblm set pblmStat=#{pblmStat} where regid=#{regid} update bis_insp_pblm NEW_VILL_NAME = #{newVillName}, PBLM_NAME_BZ = #{pblmNameBz}, SN_NUM_BZ = #{snNumBz}, CHECK_POINT_BZ = #{checkPointBz}, PBLM_DESC_BZ = #{pblmDescBz}, REGID = #{regid}, attach_Bz = #{attachBz}, QUOTE = #{quote}, COMMON_FILE_IDS = #{commonFileIds}, FILE_NO = #{fileNo}, FILE_NO_NUMBER = #{fileNoNumber}, PBLMS_ID = #{pblmsId}, PBLMS_TYPE_ID = #{pblmsTypeId}, PBLMS_ID ='', PBLMS_TYPE_ID ='', OBJ_ID = #{objId}, OBJ_TYPE = #{objType}, water_User_Id = #{waterUserId}, INSP_GROUP_ID = #{inspGroupId}, PGUID = #{pguid}, INSP_PBLM_TYPE = #{inspPblmType}, INSP_PBLM_CODE = #{inspPblmCode}, INSP_PBLM_NAME = #{inspPblmName}, INSP_PBLM_DESC = #{inspPblmDesc}, INSP_ADD_DESC = #{inspAddDesc}, PBLM_LONG = #{pblmLong}, PBLM_LAT = #{pblmLat}, IF_CASE_PBLM = #{ifCasePblm}, INSP_PBLM_ORG_NAME = #{inspPblmOrgName}, PBLM_PERS_NAME = #{pblmPersName}, INSP_PBLM_CATE = #{inspPblmCate}, REL_BASIS = #{relBasis}, PBLM_STAT = #{pblmStat}, REVI_OPIN = #{reviOpin}, REVI_CONC = #{reviConc}, village_Code = #{villageCode}, cws_Code = #{cwsCode}, REVI_ORG_GUID = #{reviOrgGuid}, DATA_STAT = #{dataStat}, COLL_TIME = #{collTime}, REC_PERS = #{recPers}, NOTE = #{note}, HAS_VEDIO = #{hasVedio}, problem_Type = #{problemType}, VILL_TYPE = #{villType}, DEFECT_TYPE_ID = #{defectTypeId}, QUALITY_TYPE_ID = #{qualityTypeId}, DEFECT_TYPE_ID ='', QUALITY_TYPE_ID ='', gongdi_Bz_Id = #{gongdiBzId}, gongdi_Bz_Id ='', FDBK_ID = #{fdbkId}, item_Id = #{itemId}, UP_TM = #{uptm}, PBLM_REASON = #{pblmReason}, PBLM_SGGTN = #{pblmSggtn}, OBJ_CODE = #{objCode}, OBJ_NAME = #{objName}, OBJ_AD_CODE = #{objAdCode}, WTDST_NOTE = #{wtdstNote}, STATE = #{state}, SCORE = #{score}, PBLM_ID = #{pblmId} update bis_insp_pblm NEW_VILL_NAME = #{newVillName}, PBLM_NAME_BZ = #{pblmNameBz}, SN_NUM_BZ = #{snNumBz}, CHECK_POINT_BZ = #{checkPointBz}, PBLM_DESC_BZ = #{pblmDescBz}, REGID = #{regid}, attach_Bz = #{attachBz}, COMMON_FILE_IDS = #{commonFileIds}, FILE_NO = #{fileNo}, FILE_NO_NUMBER = #{fileNoNumber}, PBLMS_ID = #{pblmsId}, PBLM_ID = #{pblmId}, water_User_Id = #{waterUserId}, OBJ_ID = #{objId}, OBJ_TYPE = #{objType}, INSP_GROUP_ID = #{inspGroupId}, PGUID = #{pguid}, item_Id = #{itemId}, INSP_PBLM_TYPE = #{inspPblmType}, INSP_PBLM_CODE = #{inspPblmCode}, INSP_PBLM_NAME = #{inspPblmName}, INSP_PBLM_DESC = #{inspPblmDesc}, INSP_ADD_DESC = #{inspAddDesc}, PBLM_LONG = #{pblmLong}, PBLM_LAT = #{pblmLat}, IF_CASE_PBLM = #{ifCasePblm}, INSP_PBLM_ORG_NAME = #{inspPblmOrgName}, PBLM_PERS_NAME = #{pblmPersName}, INSP_PBLM_CATE = #{inspPblmCate}, PBLM_STAT = #{pblmStat}, REVI_OPIN = #{reviOpin}, REVI_CONC = #{reviConc}, REVI_ORG_GUID = #{reviOrgGuid}, DATA_STAT = #{dataStat}, FDBK_ID = #{fdbkId}, COLL_TIME = #{collTime}, village_Code = #{villageCode}, problem_Type = #{problemType}, cws_Code = #{cwsCode}, REC_PERS = #{recPers}, NOTE = #{note}, VILL_TYPE = #{villType}, HAS_VEDIO = #{hasVedio}, DEFECT_TYPE_ID = #{defectTypeId}, QUALITY_TYPE_ID = #{qualityTypeId}, gongdi_Bz_Id = #{gongdiBzId}, gongdi_Bz_Id ='', UP_TM = #{uptm}, PBLM_REASON = #{pblmReason}, PBLM_SGGTN = #{pblmSggtn}, OBJ_CODE = #{objCode}, OBJ_NAME = #{objName}, OBJ_AD_CODE = #{objAdCode}, WTDST_NOTE = #{wtdstNote}, insert into BIS_INSP_PBLM_DEL_LOG( ) values ( ) and o.ad_code = '${province}' and o.ad_code =#{province} and o.ad_code is null select OB.ADM_DIV AS AD_CODE,t.coll_time AS COLL_TIME,o.ID AS ID,t.obj_type from BIS_INSP_PBLM t left join bis_insp_all_obj o on t.obj_id = o.obj_id left join ATT_RS_BASE OB ON O.CODE = OB.RS_CODE where t.obj_type = 1 and t.quote=#{quote} union all select o.code AS AD_CODE,t.coll_time AS COLL_TIME,o.ID AS ID,t.obj_type from BIS_INSP_PBLM t left join bis_insp_all_obj o on t.obj_id = o.obj_id where t.obj_type = 2 and t.quote=#{quote} union all select OB.LOC_AD AS AD_CODE,t.coll_time AS COLL_TIME,o.ID AS ID,t.obj_type from BIS_INSP_PBLM t left join bis_insp_all_obj o on t.obj_id = o.obj_id left join BIS_INSP_WTDST OB ON O.CODE = OB.WTDST_ID where t.obj_type = 3 and t.quote=#{quote} union all select OB.AD_CODE AS AD_CODE ,t.coll_time AS COLL_TIME,o.ID AS ID ,t.obj_type from BIS_INSP_PBLM t left join bis_insp_all_obj o on t.obj_id = o.obj_id left join ATT_EMPWTPRJ_BASE OB ON O.CODE = OB.ID where t.obj_type = 4 and t.quote=#{quote} union all select OB.ADCD AS AD_CODE,t.coll_time AS COLL_TIME,o.ID AS ID,t.obj_type from BIS_INSP_PBLM t left join bis_insp_all_obj o on t.obj_id = o.obj_id left join ATT_GRW_BASE OB ON O.CODE = OB.STCD where t.obj_type = 5 and t.quote=#{quote} union all select OB.AD_CODE AS AD_CODE,t.coll_time AS COLL_TIME,o.ID AS ID,t.obj_type from BIS_INSP_PBLM t left join bis_insp_all_obj o on t.obj_id = o.obj_id left join ATT_WAGA_BASE OB ON O.CODE = OB.OBJ_CODE where t.obj_type = 6 and t.quote=#{quote} union all select OB.AD_CODE AS AD_CODE,t.coll_time AS COLL_TIME,o.ID AS ID,t.obj_type from BIS_INSP_PBLM t left join bis_insp_all_obj o on t.obj_id = o.obj_id left join ATT_EMPWTPRJ_BASE OB ON O.CODE = OB.ID where t.obj_type = 7 and t.quote=#{quote} union all select OB.AD_CODE AS AD_CODE,t.intm AS COLL_TIME,o.ID AS ID,t.obj_type from tac_pblm_info t left join bis_insp_all_obj o on t.obj_id = o.obj_id left join tac_att_pawp_base OB ON O.CODE = OB.ID where t.obj_type = 8 union all select OB.AD_CODE AS AD_CODE,t.coll_time AS COLL_TIME,o.ID AS ID,t.obj_type from BIS_INSP_PBLM t left join bis_insp_all_obj o on t.obj_id = o.obj_id left join att_fsc_base OB ON O.CODE = OB.ID where t.obj_type = 9 and t.quote=#{quote} union all select OB.AD_CODE AS AD_CODE,t.coll_time AS COLL_TIME,o.ID AS ID,t.obj_type from BIS_INSP_PBLM t left join bis_insp_all_obj o on t.obj_id = o.obj_id left join att_other_base OB ON O.CODE = OB.ID where t.obj_type = 10 and t.quote=#{quote} union all select OB.ADM_DIV AS AD_CODE,t.coll_time AS COLL_TIME,o.ID AS ID,t.obj_type from BIS_INSP_PBLM t left join bis_insp_all_obj o on t.obj_id = o.obj_id left join ATT_RS_BASE OB ON o.CODE = OB.RS_CODE where t.obj_type = 22 and t.quote=#{quote} UPDATE BIS_INSP_PBLM t set t.state = #{state} where t.obj_id = #{objId} and t.obj_type = #{objType} UPDATE BIS_INSP_PBLM t set t.state = #{state} where t.obj_id = #{objId} and t.obj_type = #{objType} INSERT INTO bis_insp_pblm (PBLM_ID, OBJ_ID,OBJ_TYPE, OBJ_AD_CODE, INSP_PBLM_NAME, PBLM_NAME_BZ, INSP_PBLM_DESC, IF_CASE_PBLM, DATA_STAT, COLL_TIME, REC_PERS, obj_name, CHECK_POINT_BZ, PBLM_DESC_BZ, INSP_PBLM_CATE, has_vedio, state ) VALUES ( #{item.pblmId},#{item.objId},#{item.objType},#{item.objAdCode},#{item.inspPblmName},#{item.pblmNameBz},#{item.inspPblmDesc}, #{item.ifCasePblm}, 0, #{item.collTime},#{item.recPers},#{item.objName},#{item.checkPointBz}, #{item.pblmDescBz}, #{item.inspPblmCate},#{item.hasVedio},#{item.state} ) delete from bis_insp_pblm where PBLM_ID in #{item.pblmId}