Commit 8a6d8bc9 authored by Administrator's avatar Administrator

修改了groupList,conutyList,typeList,派出所申领表,交接单,出入库时间,出入库数

parent f73676d5
...@@ -2,6 +2,7 @@ package com.yxproject.start.mapper; ...@@ -2,6 +2,7 @@ package com.yxproject.start.mapper;
import com.yxproject.start.entity.CountyListEntity; import com.yxproject.start.entity.CountyListEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -13,12 +14,12 @@ import java.util.Map; ...@@ -13,12 +14,12 @@ import java.util.Map;
@Mapper @Mapper
public interface CountyListMapper { public interface CountyListMapper {
public List<CountyListEntity> findCountyListByTaskListID(String taskListId);
public List<CountyListEntity> findCountyListByTaskListID(String tasklistID);
public List<CountyListEntity> findCountyListByTaskStateId(String taskStateId); public List<CountyListEntity> findCountyListByTaskStateId(String taskStateId);
public List<CountyListEntity> findCountyListByCardType(String cardType); public List<CountyListEntity> findCountyListByCardType(String cardType);
public int updateBoundCount(CountyListEntity countyListEntity); public int updateBoundCount(@Param("county_List_Id") String county_List_Id,@Param("out_Storage_Count") String out_Storage_Count,@Param("in_Storage_Count") String in_Storage_Count);
public List<CountyListEntity> getConnectList(String save_Date); public List<CountyListEntity> getConnectList( @Param("startDate")String startDate , @Param("endDate") String endDate);
public List<CountyListEntity> findStorageCountByTaskListId(String taskListId);
// public List<Map<String, Object>> PrintCountyListXML(); // public List<Map<String, Object>> PrintCountyListXML();
} }
...@@ -2,6 +2,7 @@ package com.yxproject.start.mapper; ...@@ -2,6 +2,7 @@ package com.yxproject.start.mapper;
import com.yxproject.start.entity.PoliceStationApplyReasonEntity; import com.yxproject.start.entity.PoliceStationApplyReasonEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -15,7 +16,7 @@ public interface PoliceStationApplyReasonMapper { ...@@ -15,7 +16,7 @@ public interface PoliceStationApplyReasonMapper {
public int updatePoliceStationApplyReasonEntity(PoliceStationApplyReasonEntity policeStationApplyReasonEntity); public int updatePoliceStationApplyReasonEntity(PoliceStationApplyReasonEntity policeStationApplyReasonEntity);
public List<Map<String,Object>> findNormalApplyReasonByCyclesheetID(String cyclesheetid); public List<Map<String,Object>> findNormalApplyReasonByCyclesheetID(String cyclesheetid);
public List<Map<String,Object>> findSpecialApplyReasonByCyclesheetID(String cyclesheetid); public List<Map<String,Object>> findSpecialApplyReasonByCyclesheetID(String cyclesheetid);
public List<Map<String,Object>> findPoliceStationApplyReasonBySaveDate(String save_Date); public List<Map<String,Object>> findPoliceStationApplyReasonBySaveDate( @Param("startDate") String startDate,@Param("endDate") String endDate);
public List<Map<String,Object>> findPoliceStationApplyReasonByCardType(String cardType); public List<Map<String,Object>> findPoliceStationApplyReasonByCardType(String cardType);
public List<Map<String,Object>> findPoliceStationApplyReasonByCity(String city); public List<Map<String,Object>> findPoliceStationApplyReasonByCity(String city);
public List<Map<String,Object>> findPoliceStationApplyReasonByCounty(String county); public List<Map<String,Object>> findPoliceStationApplyReasonByCounty(String county);
......
...@@ -2,6 +2,7 @@ package com.yxproject.start.mapper; ...@@ -2,6 +2,7 @@ package com.yxproject.start.mapper;
import com.yxproject.start.entity.TaskEntity; import com.yxproject.start.entity.TaskEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -21,4 +22,6 @@ public interface TaskMapper { ...@@ -21,4 +22,6 @@ public interface TaskMapper {
public List<Map<String,Object>> findTypeListByTaskStateId(String taskStateId); public List<Map<String,Object>> findTypeListByTaskStateId(String taskStateId);
public List<Map<String,Object>> findCityListByTaskStateId(String taskStateId); public List<Map<String,Object>> findCityListByTaskStateId(String taskStateId);
public List<Map<String,Object>> findCityListByCardType(String cardType); public List<Map<String,Object>> findCityListByCardType(String cardType);
public int updateOutStorageDate( @Param("taskId")String taskId, @Param("inStorageCount")String inStorageCount, @Param("outStorageCount")String outStorageCount);
public int updateInStorageDate(String taskId,String inStorageCount,String outStorageCount);
} }
...@@ -4,13 +4,14 @@ import com.yxproject.start.entity.CountyListEntity; ...@@ -4,13 +4,14 @@ import com.yxproject.start.entity.CountyListEntity;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
public interface CountyListService { public interface CountyListService {
public List<CountyListEntity> findCountyListByTaskListID(String tasklistID); public List<CountyListEntity> findCountyListByTaskListID(String taskListId);
public List<CountyListEntity> findCountyListByTaskStateId(String taskStateId); public List<CountyListEntity> findCountyListByTaskStateId(String taskStateId);
public int reviseOutBoundCount(CountyListEntity countyListEntity); public List<CountyListEntity> getConnectList(String startDate,String endDate);
public int reviseInBoundCount(CountyListEntity countyListEntity);
public List<CountyListEntity> getConnectList(String save_Date);
public List<CountyListEntity> findCountyListByCardType(String cardType); public List<CountyListEntity> findCountyListByCardType(String cardType);
public List<CountyListEntity> findStorageCountByTaskListId(String taskListId);
public int reviseBoundCount(String county_List_Id, String out_Storage_Count, String in_Storage_Count);
} }
...@@ -8,7 +8,7 @@ import java.util.Map; ...@@ -8,7 +8,7 @@ import java.util.Map;
*/ */
public interface PoliceStationApplyReasonService { public interface PoliceStationApplyReasonService {
public int savePoliceStationApplyReasonEntity(String cyclesheetID); public int savePoliceStationApplyReasonEntity(String cyclesheetID);
public List<Map<String,Object>> findPoliceStationApplyReasonBySaveDate(String save_Date); public List<Map<String,Object>> findPoliceStationApplyReasonBySaveDate(String startDate,String endDate);
public List<Map<String,Object>> findPoliceStationApplyReasonByCardType(String cardType); public List<Map<String,Object>> findPoliceStationApplyReasonByCardType(String cardType);
public List<Map<String,Object>> findPoliceStationApplyReasonByCity(String cityCode); public List<Map<String,Object>> findPoliceStationApplyReasonByCity(String cityCode);
} }
...@@ -28,9 +28,7 @@ public interface TaskService { ...@@ -28,9 +28,7 @@ public interface TaskService {
public int addExceptionState(TaskEntity state); public int addExceptionState(TaskEntity state);
public int updateOutBoundDate(TaskEntity taskEntity, CountyListEntity countyListEntity); public int updateStorageDate(String taskId,String inStorageCount,String outStorageCount);
public int updateInStorageDate(TaskEntity taskEntity, CountyListEntity countyListEntity );
public List<Map<String,Object>> findTypeListByTaskStateId( String taskStateId); public List<Map<String,Object>> findTypeListByTaskStateId( String taskStateId);
......
...@@ -8,6 +8,7 @@ import org.springframework.stereotype.Service; ...@@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* Created by liuxinben on 2018/11/6.13:42 * Created by liuxinben on 2018/11/6.13:42
...@@ -19,8 +20,8 @@ public class CountyListServiceImpl implements CountyListService { ...@@ -19,8 +20,8 @@ public class CountyListServiceImpl implements CountyListService {
public CountyListMapper countyListMapper; public CountyListMapper countyListMapper;
@Override @Override
public List<CountyListEntity> findCountyListByTaskListID(String tasklistid) { public List<CountyListEntity> findCountyListByTaskListID(String taskListId) {
List<CountyListEntity> byTaskListID = countyListMapper.findCountyListByTaskListID(tasklistid); List<CountyListEntity> byTaskListID = countyListMapper.findCountyListByTaskListID(taskListId);
return byTaskListID; return byTaskListID;
} }
...@@ -37,20 +38,27 @@ public class CountyListServiceImpl implements CountyListService { ...@@ -37,20 +38,27 @@ public class CountyListServiceImpl implements CountyListService {
} }
@Override @Override
public int reviseOutBoundCount(CountyListEntity countyListEntity) { public int reviseBoundCount(String county_List_Id, String out_Storage_Count, String in_Storage_Count) {
countyListEntity.setOut_Storage_Count(countyListEntity.getOut_Storage_Count()); int i= 0;
return countyListMapper.updateBoundCount(countyListEntity); if(out_Storage_Count.equals(0)&&!in_Storage_Count.equals(0)){
i=countyListMapper.updateBoundCount(county_List_Id, out_Storage_Count, in_Storage_Count);
}
if(!out_Storage_Count.equals(0)&&in_Storage_Count.equals(0)){
i=countyListMapper.updateBoundCount(county_List_Id, out_Storage_Count, in_Storage_Count);
}
if(!out_Storage_Count.equals(0)&&!in_Storage_Count.equals(0)){
i=countyListMapper.updateBoundCount(county_List_Id, out_Storage_Count, in_Storage_Count);
}
return i;
} }
@Override @Override
public int reviseInBoundCount(CountyListEntity countyListEntity) { public List<CountyListEntity> getConnectList(String startDate,String endDate) {
countyListEntity.setIn_Storage_Count(countyListEntity.getIn_Storage_Count()); return countyListMapper.getConnectList(startDate,endDate);
return countyListMapper.updateBoundCount(countyListEntity);
} }
@Override @Override
public List<CountyListEntity> getConnectList(String save_Date) { public List<CountyListEntity> findStorageCountByTaskListId(String taskListId){
return countyListMapper.getConnectList(save_Date); return countyListMapper.findStorageCountByTaskListId(taskListId);
} }
......
...@@ -54,8 +54,8 @@ public class PoliceStationApplyReasonServiceImpl implements PoliceStationApplyRe ...@@ -54,8 +54,8 @@ public class PoliceStationApplyReasonServiceImpl implements PoliceStationApplyRe
* @return * @return
*/ */
@Override @Override
public List <Map <String, Object>> findPoliceStationApplyReasonBySaveDate( String save_Date ) { public List <Map <String, Object>> findPoliceStationApplyReasonBySaveDate(String startDate,String endDate) {
List <Map <String, Object>> SaveData =policeStationApplyReasonMapper.findPoliceStationApplyReasonBySaveDate(save_Date); List <Map <String, Object>> SaveData =policeStationApplyReasonMapper.findPoliceStationApplyReasonBySaveDate(startDate,endDate);
return SaveData; return SaveData;
} }
......
...@@ -433,46 +433,24 @@ public class TaskServiceImpl implements TaskService { ...@@ -433,46 +433,24 @@ public class TaskServiceImpl implements TaskService {
return i; return i;
} }
/** /**
* 更新出库时间 * 更新出库时间
* @param * @param
* @param countyListEntity
* @return * @return
*/ */
@Override @Override
public int updateOutBoundDate(TaskEntity taskEntity, CountyListEntity countyListEntity) { public int updateStorageDate(String taskId,String inStorageCount,String outStorageCount ) {
int i=0; int i=0;
i= taskMapper.totalNum(i); i= taskMapper.totalNum(i);
if (countyListEntity.getOut_Storage_Count()==i){
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
taskEntity.setOut_Storage_Date(new Date()); if (inStorageCount.equals(i)){
return taskMapper.updateTaskEntity(taskEntity); return taskMapper.updateInStorageDate(taskId,inStorageCount,outStorageCount);
}
else{
return 0;
} }
if(outStorageCount.equals(i)){
return taskMapper.updateOutStorageDate(taskId,inStorageCount,outStorageCount);
} }
/**
* 更新入库时间
* @param
* @return
*/
@Override
public int updateInStorageDate(TaskEntity taskEntity, CountyListEntity countyListEntity ) {
int i=0;
i= taskMapper.totalNum(i);
if (countyListEntity.getIn_Storage_Count()==i){
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
taskEntity.setIn_Storage_Date(new Date());
return taskMapper.updateTaskEntity(taskEntity);
}
else{
return 0; return 0;
} }
}
/** /**
* 通过状态查找TypeList * 通过状态查找TypeList
......
...@@ -26,12 +26,25 @@ ...@@ -26,12 +26,25 @@
SELECT * FROM COUNTY_LIST left join TASK on COUNTY_LIST.TASK_ID = TASK.TASK_ID left join CARD_TYPE_DIC on TASK.CARD_TYPE = CARD_TYPE_DIC.CARD_TYPE_ID where CARD_TYPE_DIC.CARD_TYPE=#{card_Type} SELECT * FROM COUNTY_LIST left join TASK on COUNTY_LIST.TASK_ID = TASK.TASK_ID left join CARD_TYPE_DIC on TASK.CARD_TYPE = CARD_TYPE_DIC.CARD_TYPE_ID where CARD_TYPE_DIC.CARD_TYPE=#{card_Type}
</select> </select>
<update id="updateBoundCount" parameterType="com.yxproject.start.entity.CountyListEntity" > <update id="updateBoundCount" parameterType="String" >
update COUNTY_LIST SET OUT_STORAGE_COUNT =#{out_Storage_Count},IN_STORAGE_COUNT =#{in_Storage_Count} where COUNTY_LIST_ID =#{county_List_Id} update COUNTY_LIST SET OUT_STORAGE_COUNT =#{out_Storage_Count},IN_STORAGE_COUNT =#{in_Storage_Count} where COUNTY_LIST_ID =#{county_List_Id}
</update> </update>
<select id="getConnectList" resultType="Map" parameterType="String"> <select id="getConnectList" resultType="java.util.HashMap" parameterType="String">
SELECT COUNTY_DIC.COUNTYNAME,CARD_TYPE_DIC.CARD_TYPE,SUM(COUNTY_LIST.OUT_STORAGE_COUNT),floor(SUM(COUNTY_LIST.OUT_STORAGE_COUNT)/250)+1 FROM COUNTY_LIST LEFT JOIN (SELECT COUNTY_CODE,COUNTYNAME FROM COUNTY_DIC GROUP BY COUNTY_CODE,COUNTYNAME ) COUNTY_DIC ON COUNTY_LIST.COUNTY_CODE = COUNTY_DIC.COUNTY_CODE LEFT JOIN (SELECT TASK_ID,CARD_TYPE FROM TASK GROUP BY TASK_ID,CARD_TYPE) TASK ON COUNTY_LIST.TASK_ID = TASK.TASK_ID LEFT JOIN(SELECT CARD_TYPE_ID,CARD_TYPE FROM CARD_TYPE_DIC GROUP BY CARD_TYPE_ID,CARD_TYPE ) CARD_TYPE_DIC ON CARD_TYPE_DIC.CARD_TYPE_ID = TASK.CARD_TYPE WHERE TO_CHAR(SAVE_DATE,'yyyyMMdd') = #{save_Date} GROUP BY COUNTY_DIC.COUNTYNAME,CARD_TYPE_DIC.CARD_TYPE SELECT COUNTY_DIC.COUNTYNAME,CARD_TYPE_DIC.CARD_TYPE,SUM(COUNTY_LIST.OUT_STORAGE_COUNT),floor(SUM(COUNTY_LIST.OUT_STORAGE_COUNT)/250)+1 FROM COUNTY_LIST
LEFT JOIN (SELECT COUNTY_CODE,COUNTYNAME FROM COUNTY_DIC GROUP BY COUNTY_CODE,COUNTYNAME ) COUNTY_DIC ON COUNTY_LIST.COUNTY_CODE = COUNTY_DIC.COUNTY_CODE
LEFT JOIN (SELECT TASK_ID,CARD_TYPE FROM TASK GROUP BY TASK_ID,CARD_TYPE) TASK ON COUNTY_LIST.TASK_ID = TASK.TASK_ID
LEFT JOIN(SELECT CARD_TYPE_ID,CARD_TYPE FROM CARD_TYPE_DIC GROUP BY CARD_TYPE_ID,CARD_TYPE ) CARD_TYPE_DIC ON CARD_TYPE_DIC.CARD_TYPE_ID = TASK.CARD_TYPE
WHERE substr(TO_CHAR(SAVE_DATE,'yyyyMMdd'),0,8) >= #{startDate}
AND #{endDate} >= substr(TO_CHAR(SAVE_DATE,'yyyyMMdd'),0,8)
GROUP BY COUNTY_DIC.COUNTYNAME,CARD_TYPE_DIC.CARD_TYPE
</select>
<select id="findStorageCountByTaskListId" resultType="java.util.HashMap" parameterType="String">
SELECT TASK_ID,FINISH_COUNT,IN_STORAGE_COUNT,OUT_STORAGE_COUNT,CITY_DIC.CITYNAME||' '||COUNTY_DIC.COUNTYNAME,COUNTY_DIC.COUNTY_CODE FROM COUNTY_LIST
LEFT JOIN COUNTY_DIC ON COUNTY_LIST.COUNTY_CODE = COUNTY_DIC.COUNTY_CODE
LEFT JOIN CITY_DIC ON substr(CITY_DIC.CITYCODE,1,4) = substr(COUNTY_LIST.COUNTY_CODE,1,4)
WHERE TASK_ID=#{task_Id}
</select> </select>
<!--<select id="PrintCountyListXML" resultType="com.yxproject.start.entity.CountyListEntity" parameterType="String">--> <!--<select id="PrintCountyListXML" resultType="com.yxproject.start.entity.CountyListEntity" parameterType="String">-->
......
...@@ -33,24 +33,37 @@ ...@@ -33,24 +33,37 @@
SELECT * FROM TABLE(find_special_apply_reason_list.get_apply_reason_list(#{cyclesheetid})) SELECT * FROM TABLE(find_special_apply_reason_list.get_apply_reason_list(#{cyclesheetid}))
</select> </select>
<select id="findPoliceStationApplyReasonBySaveDate" resultType="Map" parameterType="String"> <select id="findPoliceStationApplyReasonBySaveDate" resultType="java.util.HashMap" parameterType="String">
SELECT * FROM POLICE_STATION_APPLY_REASON where TO_CHAR(SAVE_DATE,'yyyyMMdd') = #{save_Date} SELECT * FROM POLICE_STATION_APPLY_REASON WHERE substr(TO_CHAR(SAVE_DATE,'yyyyMMdd'),0,8) >= #{startDate}
AND #{endDate} >= substr(TO_CHAR(SAVE_DATE,'yyyyMMdd'),0,8)
</select> </select>
<select id="findPoliceStationApplyReasonByCardType" resultType="java.util.HashMap" parameterType="com.yxproject.start.entity.PoliceStationApplyReasonEntity"> <select id="findPoliceStationApplyReasonByCardType" resultType="java.util.HashMap" parameterType="String">
SELECT * FROM POLICE_STATION_APPLY_REASON left join TASK on POLICE_STATION_APPLY_REASON.TASK_ID = TASK.TASK_ID where CARD_TYPE=#{card_Type} SELECT * FROM POLICE_STATION_APPLY_REASON left join TASK on POLICE_STATION_APPLY_REASON.TASK_ID = TASK.TASK_ID where CARD_TYPE=#{card_Type}
</select> </select>
<select id="findPoliceStationApplyReasonByCity" resultType="java.util.HashMap" parameterType="com.yxproject.start.entity.PoliceStationApplyReasonEntity"> <select id="findPoliceStationApplyReasonByCity" resultType="java.util.HashMap" parameterType="String">
select POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,GAJG_DM.GAJG_MC,COUNTY_DIC.COUNTYNAME,CITY_DIC.CITYNAME from POLICE_STATION_APPLY_REASON left join GAJG_DM on GAJG_DM.GAJG_DM = POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,0,5) left join CITY_DIC on CITY_DIC.CITYCODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,0,3) where CITYCODE=#{citycode} select POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,GAJG_DM.GAJG_MC,COUNTY_DIC.COUNTYNAME,CITY_DIC.CITYNAME from POLICE_STATION_APPLY_REASON
left join GAJG_DM on GAJG_DM.GAJG_DM = POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE
left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,1,6)
left join CITY_DIC on substr(CITY_DIC.CITYCODE,1,4) = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,1,4)
where substr(CITY_DIC.CITYCODE,1,4)=#{citycode}
</select> </select>
<select id="findPoliceStationApplyReasonByCounty" resultType="java.util.HashMap" parameterType="com.yxproject.start.entity.PoliceStationApplyReasonEntity"> <select id="findPoliceStationApplyReasonByCounty" resultType="java.util.HashMap" parameterType="String">
select POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,GAJG_DM.GAJG_MC,COUNTY_DIC.COUNTYNAME,CITY_DIC.CITYNAME from POLICE_STATION_APPLY_REASON left join GAJG_DM on GAJG_DM.GAJG_DM = POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,0,5) left join CITY_DIC on CITY_DIC.CITYCODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,0,3) where COUNTY_CODE=#{county_Code} select POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,GAJG_DM.GAJG_MC,COUNTY_DIC.COUNTYNAME,CITY_DIC.CITYNAME from POLICE_STATION_APPLY_REASON
left join GAJG_DM on GAJG_DM.GAJG_DM = POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE
left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,1,6)
left join CITY_DIC on substr(CITY_DIC.CITYCODE,1,4) = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,1,4)
where COUNTY_CODE=#{county_Code}
</select> </select>
<select id="findPoliceStationApplyReasonByPoliceStation" resultType="java.util.HashMap" parameterType="com.yxproject.start.entity.PoliceStationApplyReasonEntity"> <select id="findPoliceStationApplyReasonByPoliceStation" resultType="java.util.HashMap" parameterType="String">
select POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,GAJG_DM.GAJG_MC,COUNTY_DIC.COUNTYNAME,CITY_DIC.CITYNAME from POLICE_STATION_APPLY_REASON left join GAJG_DM on GAJG_DM.GAJG_DM = POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,0,5) left join CITY_DIC on CITY_DIC.CITYCODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,0,3) where POLICE_STATION_CODE=#{police_Station_Code} select POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,GAJG_DM.GAJG_MC,COUNTY_DIC.COUNTYNAME,CITY_DIC.CITYNAME from POLICE_STATION_APPLY_REASON
left join GAJG_DM on GAJG_DM.GAJG_DM = POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE
left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,1,6)
left join CITY_DIC on substr(CITY_DIC.CITYCODE,1,4) = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,1,4)
where POLICE_STATION_CODE=#{police_Station_Code}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -69,23 +69,42 @@ ...@@ -69,23 +69,42 @@
</select> </select>
<update id="replaceExceptionInformation" parameterType="com.yxproject.start.entity.TaskEntity" > <update id="replaceExceptionInformation" parameterType="com.yxproject.start.entity.TaskEntity" >
update TASK SET exception_Information = NULL,IS_EXCEPTION =#{is_Exception} where TASK_ID =#{task_Id} update TASK set exception_Information = NULL and IS_EXCEPTION =#{is_Exception} where TASK_ID =#{task_Id}
</update> </update>
<select id="totalNum" resultType="Integer"> <select id="totalNum" resultType="Integer">
select nvl(SUM(VAILD_COUNT),0) FROM GROUP_NO where TASK_ID =#{task_Id} select nvl(SUM(VAILD_COUNT),0) FROM GROUP_NO
</select> </select>
<update id="updateOutStorageDate" parameterType="String">
update TASK SET OUT_STORAGE_DATE IS SYSDATE where TASK_ID =#{task_Id}
</update>
<update id="updateInStorageDate" parameterType="String">
update TASK SET IN_STORAGE_DATE =#{in_Storage_Date} where TASK_ID =#{task_Id}
</update>
<select id="findTypeListByTaskStateId" resultType="java.util.HashMap"> <select id="findTypeListByTaskStateId" resultType="java.util.HashMap">
SELECT TASK.CARD_TYPE,count(CARD_TYPE_ID),CARD_TYPE_DIC.CARD_TYPE FROM TASK left join (SELECT CARD_TYPE,count(CARD_TYPE_ID),CARD_TYPE_ID FROM CARD_TYPE_DIC GROUP BY CARD_TYPE,CARD_TYPE_ID) CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = TASK.CARD_TYPE where TASK_STATE_ID=#{task_State_Id} GROUP BY CARD_TYPE_DIC.CARD_TYPE,TASK.CARD_TYPE SELECT TASK.CARD_TYPE,count(CARD_TYPE_ID),CARD_TYPE_DIC.CARD_TYPE FROM TASK
left join (SELECT CARD_TYPE,count(CARD_TYPE_ID),CARD_TYPE_ID FROM CARD_TYPE_DIC GROUP BY CARD_TYPE,CARD_TYPE_ID) CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = TASK.CARD_TYPE
where TASK_STATE_ID=#{task_State_Id}
GROUP BY CARD_TYPE_DIC.CARD_TYPE,TASK.CARD_TYPE
</select> </select>
<select id="findCityListByCardType" resultType="java.util.HashMap"> <select id="findCityListByCardType" resultType="java.util.HashMap">
select CARD_TYPE,TASK.CITYCODE,CITYNAME,sum(VAILD_COUNT),sum(INVALID_COUNT),COUNT(GROUP_NO),GROUP_NO,TASK.TASK_ID,OLD_CARD_TYPE,SUBMIT_DATE,ISSUED_DATE,PRINT_STATE,DOWNLOAD_DATE,PRINT_OUT_DATE,POSITION_DATE,OUT_WORKSHOP_DATE,QUALITY_PEOPLE_NAME,QUALITY_TEST_DATE,EXCEPTION_INFORMATION,OUT_STORAGE_DATE,IN_STORAGE_DATE,TASK_STATE_ID,IS_EXCEPTION,PRINTER_ID from TASK left join (select sum(VAILD_COUNT),sum(INVALID_COUNT),COUNT(GROUP_NO),TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VAILD_COUNT,INVALID_COUNT from GROUP_NO group by TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VAILD_COUNT,INVALID_COUNT ) GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID left join (SELECT CITYCODE,CITYNAME FROM CITY_DIC) CITY_DIC on CITY_DIC.CITYCODE = TASK.CITYCODE where CARD_TYPE=#{card_Type} GROUP BY CARD_TYPE,TASK.CITYCODE,CITYNAME,GROUP_NO,TASK.TASK_ID,OLD_CARD_TYPE,SUBMIT_DATE,ISSUED_DATE,PRINT_STATE,DOWNLOAD_DATE,PRINT_OUT_DATE,POSITION_DATE,OUT_WORKSHOP_DATE,QUALITY_PEOPLE_NAME,QUALITY_TEST_DATE,EXCEPTION_INFORMATION,OUT_STORAGE_DATE,IN_STORAGE_DATE,TASK_STATE_ID,IS_EXCEPTION,PRINTER_ID select CARD_TYPE,TASK.CITYCODE,CITYNAME,sum(VAILD_COUNT),sum(INVALID_COUNT),COUNT(GROUP_NO),GROUP_NO,TASK.TASK_ID,OLD_CARD_TYPE,SUBMIT_DATE,ISSUED_DATE,PRINT_STATE,DOWNLOAD_DATE,PRINT_OUT_DATE,POSITION_DATE,OUT_WORKSHOP_DATE,QUALITY_PEOPLE_NAME,QUALITY_TEST_DATE,EXCEPTION_INFORMATION,OUT_STORAGE_DATE,IN_STORAGE_DATE,TASK_STATE_ID,IS_EXCEPTION,PRINTER_ID from TASK
left join (select sum(VAILD_COUNT),sum(INVALID_COUNT),COUNT(GROUP_NO),TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VAILD_COUNT,INVALID_COUNT from GROUP_NO group by TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VAILD_COUNT,INVALID_COUNT ) GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID
left join (SELECT CITYCODE,CITYNAME FROM CITY_DIC) CITY_DIC on CITY_DIC.CITYCODE = TASK.CITYCODE
where CARD_TYPE=#{card_Type}
GROUP BY CARD_TYPE,TASK.CITYCODE,CITYNAME,GROUP_NO,TASK.TASK_ID,OLD_CARD_TYPE,SUBMIT_DATE,ISSUED_DATE,PRINT_STATE,DOWNLOAD_DATE,PRINT_OUT_DATE,POSITION_DATE,OUT_WORKSHOP_DATE,QUALITY_PEOPLE_NAME,QUALITY_TEST_DATE,EXCEPTION_INFORMATION,OUT_STORAGE_DATE,IN_STORAGE_DATE,TASK_STATE_ID,IS_EXCEPTION,PRINTER_ID
</select> </select>
<select id="findCityListByTaskStateId" resultType="java.util.HashMap"> <select id="findCityListByTaskStateId" resultType="java.util.HashMap">
select CARD_TYPE,TASK.CITYCODE,CITYNAME,sum(VAILD_COUNT),sum(INVALID_COUNT),COUNT(GROUP_NO),GROUP_NO,TASK.TASK_ID,OLD_CARD_TYPE,SUBMIT_DATE,ISSUED_DATE,PRINT_STATE,DOWNLOAD_DATE,PRINT_OUT_DATE,POSITION_DATE,OUT_WORKSHOP_DATE,QUALITY_PEOPLE_NAME,QUALITY_TEST_DATE,EXCEPTION_INFORMATION,OUT_STORAGE_DATE,IN_STORAGE_DATE,TASK_STATE_ID,IS_EXCEPTION,PRINTER_ID from TASK left join (select sum(VAILD_COUNT),sum(INVALID_COUNT),COUNT(GROUP_NO),TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VAILD_COUNT,INVALID_COUNT from GROUP_NO group by TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VAILD_COUNT,INVALID_COUNT ) GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID left join (SELECT CITYCODE,CITYNAME FROM CITY_DIC) CITY_DIC on CITY_DIC.CITYCODE = TASK.CITYCODE where TASK_STATE_ID=#{task_State_Id} GROUP BY CARD_TYPE,TASK.CITYCODE,CITYNAME,GROUP_NO,TASK.TASK_ID,OLD_CARD_TYPE,SUBMIT_DATE,ISSUED_DATE,PRINT_STATE,DOWNLOAD_DATE,PRINT_OUT_DATE,POSITION_DATE,OUT_WORKSHOP_DATE,QUALITY_PEOPLE_NAME,QUALITY_TEST_DATE,EXCEPTION_INFORMATION,OUT_STORAGE_DATE,IN_STORAGE_DATE,TASK_STATE_ID,IS_EXCEPTION,PRINTER_ID select CARD_TYPE,TASK.CITYCODE,CITYNAME,sum(VAILD_COUNT),sum(INVALID_COUNT),COUNT(GROUP_NO),GROUP_NO,TASK.TASK_ID,OLD_CARD_TYPE,SUBMIT_DATE,ISSUED_DATE,PRINT_STATE,DOWNLOAD_DATE,PRINT_OUT_DATE,POSITION_DATE,OUT_WORKSHOP_DATE,QUALITY_PEOPLE_NAME,QUALITY_TEST_DATE,EXCEPTION_INFORMATION,OUT_STORAGE_DATE,IN_STORAGE_DATE,TASK_STATE_ID,IS_EXCEPTION,PRINTER_ID from TASK
left join (select sum(VAILD_COUNT),sum(INVALID_COUNT),COUNT(GROUP_NO),TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VAILD_COUNT,INVALID_COUNT from GROUP_NO group by TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VAILD_COUNT,INVALID_COUNT ) GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID
left join (SELECT CITYCODE,CITYNAME FROM CITY_DIC) CITY_DIC on CITY_DIC.CITYCODE = TASK.CITYCODE
where TASK_STATE_ID=#{task_State_Id}
GROUP BY CARD_TYPE,TASK.CITYCODE,CITYNAME,GROUP_NO,TASK.TASK_ID,OLD_CARD_TYPE,SUBMIT_DATE,ISSUED_DATE,PRINT_STATE,DOWNLOAD_DATE,PRINT_OUT_DATE,POSITION_DATE,OUT_WORKSHOP_DATE,QUALITY_PEOPLE_NAME,QUALITY_TEST_DATE,EXCEPTION_INFORMATION,OUT_STORAGE_DATE,IN_STORAGE_DATE,TASK_STATE_ID,IS_EXCEPTION,PRINTER_ID
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment