Commit 50f6e2e5 authored by xuwang's avatar xuwang

Merge remote-tracking branch 'origin/dev' into dev

parents 16c34d84 b817ff81
package com.yxproject.start.entity;
import javax.persistence.*;
import java.util.Objects;
/**
* Created by zhangyusheng on 2018/11/16 10:51
*/
@Entity
@Table(name = "CITY_DIC", schema = "DAHAI", catalog = "")
public class CityDicEntity {
private String citycode;
private String cityname;
@Id
@Column(name = "CITYCODE", nullable = false, length = 6)
public String getCitycode() {
return citycode;
}
public void setCitycode(String citycode) {
this.citycode = citycode;
}
@Basic
@Column(name = "CITYNAME", nullable = false, length = 20)
public String getCityname() {
return cityname;
}
public void setCityname(String cityname) {
this.cityname = cityname;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CityDicEntity that = (CityDicEntity) o;
return Objects.equals(citycode, that.citycode) &&
Objects.equals(cityname, that.cityname);
}
@Override
public int hashCode() {
return Objects.hash(citycode, cityname);
}
}
......@@ -71,8 +71,6 @@ public class TaskEntity {
this.citycode = citycode;
}
@Basic
@Column(name = "SUBMIT_DATE", nullable = true)
public Date getSubmit_Date() {
......
......@@ -3,13 +3,15 @@ package com.yxproject.start.mapper;
import com.yxproject.start.entity.CardBodyEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* Created by liuxinben on 2018/11/6.10:26
*/
@Mapper
public interface CardBodyMapper {
public int insertCardBodyEntity(CardBodyEntity cardBodyEntity);
public List <CardBodyEntity> insertCardBody(String cardBodyId);
public int updateCardBodyInfo(CardBodyEntity cardBodyEntity);
}
\ No newline at end of file
......@@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.Mapper;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* Created by liuxinben on 2018/11/6.10:26
......@@ -14,7 +15,9 @@ import java.util.List;
public interface CountyListMapper {
public List<CountyListEntity> findCountyListByTaskListID(String tasklistID);
public List<CountyListEntity> findCountyListByTaskStateId(String taskStateId);
public List<CountyListEntity> findCountyListByCardType(String cardType);
public int updateBoundCount(CountyListEntity countyListEntity);
public List<CountyListEntity>getConnectList(String save_Date);
public List<Map<String,Object>> getConnectList(String save_Date);
}
......@@ -11,19 +11,15 @@ import java.util.Map;
*/
@Mapper
public interface GroupNoMapper {
public int insertGroupNoEntity(GroupNoEntity groupNoEntity);
public List<GroupNoEntity> findGroupNoEntityByAcceptNo(String acceptNo);
public int updateGroupinfoEntity(GroupNoEntity groupNoEntity);
public List<GroupNoEntity> findGroupNoEntityListByTaskId(long task_Id);
public int findGroupNoCountByTaskId(String task_Id);
public List<Map<String,Object>> findSpecialCountyList(String task_Id);
public List<Map<String,Object>> findNormalCountyList(String task_Id);
public List<GroupNoEntity> findGroupNoByTaskListID(String tasklistID);
public List<GroupNoEntity> findGroupNoByTaskStateId(String taskStateId);
public List<GroupNoEntity> findGroupNoByCardType(String cardType);
}
......@@ -15,4 +15,9 @@ public interface PoliceStationApplyReasonMapper {
public int updatePoliceStationApplyReasonEntity(PoliceStationApplyReasonEntity policeStationApplyReasonEntity);
public List<Map<String,Object>> findNormalApplyReasonByCyclesheetID(String cyclesheetid);
public List<Map<String,Object>> findSpecialApplyReasonByCyclesheetID(String cyclesheetid);
public List<Map<String,Object>> findPoliceStationApplyReasonBySaveDate(String saveDate);
public List<Map<String,Object>> findPoliceStationApplyReasonByCardType(String cardType);
public List<Map<String,Object>> findPoliceStationApplyReasonByCity(String city);
public List<Map<String,Object>> findPoliceStationApplyReasonByCounty(String county);
public List<Map<String,Object>> findPoliceStationApplyReasonByGajgMC(String gajgMC);
}
......@@ -4,19 +4,21 @@ import com.yxproject.start.entity.TaskEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* Created by zhangyusheng on 2018/10/13 9:36
*/
@Mapper
public interface TaskMapper {
public List<TaskEntity> findTaskEntity(long id);
public int insertTaskEntity(TaskEntity taskEntity);
public int updateTaskEntity(TaskEntity taskEntity);
public List<TaskEntity> findTaskEntityByAcceptNo(String acceptNo);
public List<TaskEntity> findTaskEntityByState(int state);
public int replaceExceptionInformation(TaskEntity taskEntity);
public int totalnum (int i);
public int totalNum (int i);
public List<Map<String,Object>> findTypeListByTaskStateId(String taskStateId);
public List<Map<String,Object>> findCityListByTaskStateId(String taskStateId);
public List<Map<String,Object>> findCityListByCardType(String cardType);
}
......@@ -9,7 +9,7 @@ import java.util.List;
* Created by Administrator on 2018/11/7.
*/
public interface CardBodyService {
public int addCardBodyEntity(CardBodyEntity cardBodyEntity);
public List<CardBodyEntity> insertCardBody(String cardBodyId);
public int updateCardBody(CardBodyEntity map);
......
......@@ -4,11 +4,14 @@ import com.yxproject.start.entity.CountyListEntity;
import java.util.Date;
import java.util.List;
import java.util.Map;
public interface CountyListService {
public List<CountyListEntity> findCountyListByTaskListID(String tasklistID);
public int reviseOutBoundCount(CountyListEntity map);
public int reviseInBoundCount(CountyListEntity map);
public List<CountyListEntity> getConnectList(String save_Date);
public List<CountyListEntity> findCountyListByTaskStateId(String taskStateId);
public int reviseOutBoundCount(CountyListEntity countyListEntity);
public int reviseInBoundCount(CountyListEntity countyListEntity);
public List<Map<String, Object>> getConnectList(String save_Date);
public List<CountyListEntity> findCountyListByCardType(String cardType);
}
package com.yxproject.start.service;
import com.yxproject.start.entity.GroupNoEntity;
import java.util.List;
import java.util.Map;
......@@ -8,4 +10,8 @@ import java.util.Map;
*/
public interface GroupNoService {
public List<Map<String, Object>> findCountyInfoList(String taskID);
public List<GroupNoEntity> findGroupNoByTaskListID(String tasklistID);
public List<GroupNoEntity> findGroupNoByTaskStateId(String taskStateId);
public List<GroupNoEntity> findGroupNoByCardType(String cardType);
}
package com.yxproject.start.service;
import java.util.List;
import java.util.Map;
/**
* Created by zhangyusheng on 2018/11/12 14:27
*/
public interface PoliceStationApplyReasonService {
public int savePoliceStationApplyReasonEntity(String cyclesheetID);
public List<Map<String,Object>> findPoliceStationApplyReasonBySaveDate(String saveDate);
public List<Map<String,Object>> findPoliceStationApplyReasonByCardType(String cardType);
public List<Map<String,Object>> findPoliceStationApplyReasonByCity(String city);
public List<Map<String,Object>> findPoliceStationApplyReasonByCounty(String county);
public List<Map<String,Object>> findPoliceStationApplyReasonByGajgMC(String gajgMC);
}
......@@ -22,15 +22,21 @@ public interface TaskService {
public int savePoliceStationVailedEntity(List<PoliceStationVailedEntity> policeStationVailedInfoEntities);
public List<PoliceStationVailedEntity> find(String id);
public List<PoliceStationVailedEntity> find( String id);
public List<Map<String,Object>> findProductionTaskListEntityByState(int state);
public int addExceptionState(TaskEntity state);
public int updateOutboundDate(TaskEntity map);
public int updateOutBoundDate(TaskEntity taskEntity, CountyListEntity countyListEntity);
public int updatePutinstorageDate(TaskEntity map);
public int updateInStorageDate(TaskEntity taskEntity, CountyListEntity countyListEntity );
public List<Map<String,Object>> findTypeListByTaskStateId(String taskStateId);
public List<Map<String,Object>> findCityListByTaskStateId(String taskStateId);
public List<Map<String,Object>> findCityListByCardType(String cardType);
}
......@@ -32,7 +32,8 @@ public class CardBodyServiceImpl implements CardBodyService {
@Override
public int addCardBodyEntity(CardBodyEntity cardBodyEntity) {
return cardBodyMapper.insertCardBodyEntity(cardBodyEntity);
public List<CardBodyEntity> insertCardBody(String cardBodyId) {
List<CardBodyEntity> cardBody = cardBodyMapper.insertCardBody(cardBodyId);
return cardBody;
}
}
......@@ -6,8 +6,10 @@ import com.yxproject.start.service.CountyListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* Created by liuxinben on 2018/11/6.13:42
......@@ -24,6 +26,18 @@ public class CountyListServiceImpl implements CountyListService {
return byTaskListID;
}
@Override
public List <CountyListEntity> findCountyListByTaskStateId(String taskStateId) {
List<CountyListEntity> TaskStateId = countyListMapper.findCountyListByTaskStateId(taskStateId);
return TaskStateId;
}
@Override
public List <CountyListEntity> findCountyListByCardType( String cardType ) {
List<CountyListEntity> CardType = countyListMapper.findCountyListByCardType(cardType);
return CardType;
}
@Override
public int reviseOutBoundCount(CountyListEntity countyListEntity) {
countyListEntity.setOut_Storage_Count(countyListEntity.getOut_Storage_Count());
......@@ -37,8 +51,9 @@ public class CountyListServiceImpl implements CountyListService {
}
@Override
public List<CountyListEntity> getConnectList(String save_Date) {
public List<Map<String, Object>> getConnectList(String save_Date) {
return countyListMapper.getConnectList(save_Date);
}
}
\ No newline at end of file
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.GroupNoEntity;
import com.yxproject.start.mapper.GroupNoMapper;
import com.yxproject.start.service.GroupNoService;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -29,4 +30,22 @@ public class GroupNoServiceImpl implements GroupNoService {
return list;
}
@Override
public List<GroupNoEntity> findGroupNoByTaskListID( String tasklistid) {
List<GroupNoEntity> byTaskListID = groupNoMapper.findGroupNoByTaskListID(tasklistid);
return byTaskListID;
}
@Override
public List <GroupNoEntity> findGroupNoByTaskStateId(String taskStateId) {
List<GroupNoEntity> TaskStateId = groupNoMapper.findGroupNoByTaskStateId(taskStateId);
return TaskStateId;
}
@Override
public List <GroupNoEntity> findGroupNoByCardType( String cardType ) {
List<GroupNoEntity> CardType = groupNoMapper.findGroupNoByCardType(cardType);
return CardType;
}
}
......@@ -48,4 +48,58 @@ public class PoliceStationApplyReasonServiceImpl implements PoliceStationApplyRe
}
return 1;
}
/**
* 查询派出所申领表通过保存时间;
* @param
* @return
*/
@Override
public List <Map <String, Object>> findPoliceStationApplyReasonBySaveDate( String saveDate ) {
List <Map <String, Object>> SaveData =policeStationApplyReasonMapper.findPoliceStationApplyReasonBySaveDate(saveDate);
return SaveData;
}
/**
* 查询派出所申领表通过制证类型;
* @param
* @return
*/
@Override
public List <Map <String, Object>> findPoliceStationApplyReasonByCardType(String cardType) {
List <Map <String, Object>> CardType =policeStationApplyReasonMapper.findPoliceStationApplyReasonByCardType(cardType);
return CardType;
}
/**
* 查询派出所申领表通过地市;
* @param
* @return
*/
@Override
public List <Map <String, Object>> findPoliceStationApplyReasonByCity(String city) {
List <Map <String, Object>> City =policeStationApplyReasonMapper.findPoliceStationApplyReasonByCity(city);
return City;
}
/**
* 查询派出所申领表通过区县;
* @param
* @return
*/
@Override
public List <Map <String, Object>> findPoliceStationApplyReasonByCounty(String county) {
List <Map <String, Object>> County =policeStationApplyReasonMapper.findPoliceStationApplyReasonByCounty(county);
return County;
}
/**
* 查询派出所申领表通过派出所;
* @param
* @return
*/
@Override
public List <Map <String, Object>> findPoliceStationApplyReasonByGajgMC(String gajgMC) {
List <Map <String, Object>> GajgMC =policeStationApplyReasonMapper.findPoliceStationApplyReasonByGajgMC(gajgMC);
return GajgMC;
}
}
......@@ -5,8 +5,6 @@ import com.yxproject.start.entity.accu.AccCardTEntity;
import com.yxproject.start.entity.prod.ProdCardTEntity;
import com.yxproject.start.mapper.*;
import com.yxproject.start.entity.CountyListEntity;
import net.sf.json.JSONObject;
import java.util.Scanner;
import com.yxproject.start.service.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -435,16 +433,18 @@ public class TaskServiceImpl implements TaskService {
return i;
}
private CountyListEntity countyListEntity;
/**
* 更新出库时间
* @param
* @param countyListEntity
* @return
*/
@Override
public int updateOutboundDate(TaskEntity taskEntity) {
public int updateOutBoundDate(TaskEntity taskEntity, CountyListEntity countyListEntity) {
int i=0;
i= taskMapper.totalnum(i);
i= taskMapper.totalNum(i);
if (countyListEntity.getOut_Storage_Count()==i){
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
taskEntity.setOut_Storage_Date(new Date());
......@@ -461,9 +461,9 @@ public class TaskServiceImpl implements TaskService {
* @return
*/
@Override
public int updatePutinstorageDate(TaskEntity taskEntity) {
public int updateInStorageDate(TaskEntity taskEntity, CountyListEntity countyListEntity ) {
int i=0;
i= taskMapper.totalnum(i);
i= taskMapper.totalNum(i);
if (countyListEntity.getIn_Storage_Count()==i){
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
taskEntity.setIn_Storage_Date(new Date());
......@@ -474,6 +474,39 @@ public class TaskServiceImpl implements TaskService {
}
}
/**
* 通过状态查找TypeList
* @param
* @return
*/
@Override
public List <Map <String, Object>> findTypeListByTaskStateId( String taskStateId ) {
List <Map <String, Object>> TaskStateId =taskMapper.findTypeListByTaskStateId(taskStateId);
return TaskStateId;
}
/**
* 通过状态查找CityList
* @param
* @return
*/
@Override
public List <Map <String, Object>> findCityListByTaskStateId( String taskStateId ) {
List <Map <String, Object>> TaskStateId =taskMapper.findCityListByTaskStateId(taskStateId);
return TaskStateId;
}
/**
* 通过制证类型查找CityList
* @param
* @return
*/
@Override
public List <Map <String, Object>> findCityListByCardType( String cardType ) {
List <Map <String, Object>> CardType =taskMapper.findCityListByCardType(cardType);
return CardType;
}
/**
* 测试查询
*
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yxproject.start.mapper.CardBodyInfoMapper">
<mapper namespace="com.yxproject.start.mapper.CardBodyMapper">
<resultMap id="CardBodyInfoMapper" type="com.yxproject.start.entity.CardBodyEntity">
<id column="CARD_BODY_ID" property="card_Body_Id" jdbcType="NUMERIC"/>
<result column="SAVE_DATE" property="save_Date" jdbcType="DATE"/>
......@@ -10,8 +10,8 @@
<result column="TOTAL_COUNT" property="total_Count" jdbcType="NUMERIC"/>
</resultMap>
<select id="insertCardBodyEntity" resultType="com.yxproject.start.entity.CardBodyEntity" parameterType="String">
select * from CARD_BODY where CARD_BODY_ID=#{card_Body_Id}
<select id="insertCardBody" resultType="com.yxproject.start.entity.CardBodyEntity" parameterType="String">
SELECT * FROM CARD_BODY where card_Body_Id=#{card_Body_Id}
</select>
<update id="updateCardBody" parameterType="com.yxproject.start.entity.CardBodyEntity">
......
......@@ -15,15 +15,23 @@
<!--Insert into DAHAI.SYS_PERMISSION (ID,AVAILABLE,NAME,PARENT_ID,PARENT_IDS,PERMISSION,RESOURCE_TYPE,URL) values (PERMISSION_seq.nextval,0,#{name},#{parentId},#{parentIds},#{permission},#{resourceType},#{url})-->
<!--</insert>-->
<select id="findCountyListByTaskListID" resultType="com.yxproject.start.entity.CountyListEntity" parameterType="String">
SELECT * FROM COUNTY_LIST where task_Id=#{task_Id}
SELECT * FROM COUNTY_LIST where TASK_ID=#{task_Id}
</select>
<select id="findCountyListByTaskStateId" resultType="com.yxproject.start.entity.CountyListEntity" parameterType="String">
SELECT * FROM COUNTY_LIST left join TASK on COUNTY_LIST.TASK_ID = TASK.TASK_ID where TASK_STATE_ID=#{task_State_Id}
</select>
<select id="findCountyListByCardType" resultType="com.yxproject.start.entity.CountyListEntity" parameterType="String">
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>
<update id="updateBoundCount" parameterType="com.yxproject.start.entity.CountyListEntity" >
update COUNTY_LIST 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>
<select id="getConnectList" resultType="com.yxproject.start.entity.CountyListEntity" parameterType="String">
SELECT OUT_STORAGE_COUNT FROM COUNTY_LIST where save_Date=#{save_Date}
SELECT OUT_STORAGE_COUNT FROM COUNTY_LIST
</select>
</mapper>
......@@ -43,4 +43,16 @@
SELECT * FROM TABLE(find_normal_county_list.GET_county_infos(#{task_Id}))
</select>
<select id="findGroupNoByTaskListID" resultType="com.yxproject.start.entity.GroupNoEntity" parameterType="String">
SELECT * FROM GROUP_NO left join TASK on GROUP_NO.TASK_ID = TASK.TASK_ID where TASK_ID=#{task_Id}
</select>
<select id="findGroupNoByTaskStateId" resultType="com.yxproject.start.entity.GroupNoEntity" parameterType="String">
SELECT * FROM GROUP_NO left join TASK on GROUP_NO.TASK_ID = TASK.TASK_ID where TASK_STATE_ID=#{task_State_Id}
</select>
<select id="findGroupNoByCardType" resultType="com.yxproject.start.entity.GroupNoEntity" parameterType="String">
SELECT * FROM GROUP_NO left join TASK on GROUP_NO.TASK_ID = TASK.TASK_ID where CARD_TYPE=#{card_type}
</select>
</mapper>
\ No newline at end of file
......@@ -3,7 +3,7 @@
<mapper namespace="com.yxproject.start.mapper.PoliceStationApplyReasonMapper">
<resultMap id="PoliceStationApplyReasonMapper" type="com.yxproject.start.entity.PoliceStationApplyReasonEntity">
<id column="POLICE_STATION_APPLY_REASON_ID" property="police_Station_Apply_Reason_Id" jdbcType="VARCHAR"/>
<result column="APPLY_REASON_SAVEDATE" property="apply_Reason_Savedate" jdbcType="VARCHAR"/>
<result column="SAVE_DATE" property="save_Date" jdbcType="VARCHAR"/>
<result column="CYCLESHEETID" property="cyclesheetid" jdbcType="VARCHAR"/>
<result column="POLICE_STATION_CODE" property="police_Station_Code" jdbcType="VARCHAR"/>
<result column="APPLY_REASON_CODE" property="apply_Reason_Code" jdbcType="NUMERIC"/>
......@@ -17,7 +17,7 @@
<update id="updatePoliceStationApplyReasonEntity" parameterType="com.yxproject.start.entity.PoliceStationApplyReasonEntity">
update POLICE_STATION_APPLY_REASON set POLICE_STATION_APPLY_REASON_ID=#{police_Station_Apply_Reason_Id}
<if test="apply_Reason_Savedate">,APPLY_REASON_SAVEDATE =#{apply_Reason_Savedate}</if>
<if test="save_Date">,save_Data =#{save_Date}</if>
<if test="cyclesheetid">,cyclesheetid =#{cyclesheetid}</if>
<if test="police_Station_Code">,police_Station_Code =#{police_Station_Code}</if>
<if test="apply_Reason_Code">,apply_Reason_Code =#{apply_Reason_Code}</if>
......@@ -33,5 +33,24 @@
SELECT * FROM TABLE(find_special_apply_reason_list.get_apply_reason_list(#{cyclesheetid}))
</select>
<select id="findPoliceStationApplyReasonBySaveDate" resultType="java.util.HashMap" parameterType="com.yxproject.start.entity.PoliceStationApplyReasonEntity">
SELECT * FROM POLICE_STATION_APPLY_REASON where SAVE_DATE=#{save_Data}
</select>
<select id="findPoliceStationApplyReasonByCardType" resultType="java.util.HashMap" parameterType="com.yxproject.start.entity.PoliceStationApplyReasonEntity">
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 id="findPoliceStationApplyReasonByCity" resultType="java.util.HashMap" parameterType="com.yxproject.start.entity.PoliceStationApplyReasonEntity">
SELECT * FROM POLICE_STATION_APPLY_REASON left join TASK on POLICE_STATION_APPLY_REASON.TASK_ID = TASK.TASK_ID left join CITY_DIC on TASK.CITYCODE = CITY_DIC.CITYCODE where CITYNAME=#{cityname}
</select>
<select id="findPoliceStationApplyReasonByCounty" resultType="java.util.HashMap" parameterType="com.yxproject.start.entity.PoliceStationApplyReasonEntity">
SELECT * FROM POLICE_STATION_APPLY_REASON left join COUNTY_LIST on POLICE_STATION_APPLY_REASON.TASK_ID=COUNTY_LIST.TASK_ID left join COUNTY_DIC on COUNTY_LIST.COUNTY_CODE = COUNTY_DIC.COUNTY_CODE where COUNTYNAME=#{countyname}
</select>
<select id="findPoliceStationApplyReasonByGajgMC" resultType="java.util.HashMap" parameterType="com.yxproject.start.entity.PoliceStationApplyReasonEntity">
SELECT * FROM POLICE_STATION_APPLY_REASON left join GAJG_DM on POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE = GAJG_DM.GAJG_DM where GAJG_MC=#{gajg_MC}
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yxproject.start.mapper.TaskMapper">
<resultMap id="TaskMap" type="com.yxproject.start.entity.TaskEntity">
<resultMap id="TaskMappper" type="com.yxproject.start.entity.TaskEntity">
<id column="TASK_ID" property="task_Id" jdbcType="NUMERIC"/>
<result column="CARD_TYPE" property="card_Type" jdbcType="NUMERIC"/>
<result column="OLD_CARD_TYPE" property="old_Card_Type" jdbcType="NUMERIC"/>
......@@ -37,17 +37,17 @@
<update id="updateTaskEntity" parameterType="com.yxproject.start.entity.TaskEntity">
update TASK
<set>
<if test="card_Type ">card_Type =#{card_Type},</if>
<if test="old_Card_Type ">old_Card_Type =#{old_Card_Type},</if>
<if test="citycode ">CITYCODE =#{citycode},</if>
<if test="card_Type">card_Type =#{card_Type},</if>
<if test="old_Card_Type">old_Card_Type =#{old_Card_Type},</if>
<if test="citycode">CITYCODE =#{citycode},</if>
<if test="submit_Date">submit_Date =#{submit_Date},</if>
<if test="issued_Date ">issued_Date =#{issued_Date},</if>
<if test="print_State ">print_State =#{print_State},</if>
<if test="issued_Date">issued_Date =#{issued_Date},</if>
<if test="print_State">print_State =#{print_State},</if>
<if test="download_Date">download_Date =#{download_Date},</if>
<if test="print_Out_Date">print_Out_Date =#{print_Out_Date},</if>
<if test="position_Date">position_Date =#{position_Date},</if>
<if test="out_Workshop_Date">out_Workshop_Date =#{out_Workshop_Date},</if>
<if test="quality_People_Name ">quality_People_Name =#{quality_People_Name},</if>
<if test="quality_People_Name">quality_People_Name =#{quality_People_Name},</if>
<if test="quality_Test_Date">quality_Test_Date =#{quality_Test_Date},</if>
<if test="exception_Information">exception_Information =#{exception_Information},</if>
<if test="out_Storage_Date">out_Storage_Date =#{out_Storage_Date},</if>
......@@ -65,15 +65,71 @@
</select>
<select id="findProductionTaskListEntityByState" resultType="com.yxproject.start.entity.TaskEntity" parameterType="Integer">
select * from TASK where TASK_STATE_ID =#{state }
select * from TASK where TASK_STATE_ID =#{task_State_Id}
</select>
<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,IS_EXCEPTION =#{is_Exception} where TASK_ID =#{task_Id}
</update>
<select id="totalnum" resultType="Int">
select SUM(VAILD_COUNT)FROM GROUP_NO where TASK_ID =#{task_Id}
<select id="totalNum" resultType="Integer">
select nvl(SUM(VAILD_COUNT),0) FROM GROUP_NO where TASK_ID =#{task_Id}
</select>
<select id="findTypeListByTaskStateId" resultType="java.util.HashMap">
WITH
t_Type_List
AS(
select CARD_TYPE_ID,CARD_TYPE_DIC.CARD_TYPE from TASK left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = TASK.CARD_TYPE where TASK_STATE_ID=#{task_State_Id}
),
t_Count_Card_Type
AS(
select CARD_TYPE_ID, count(CARD_TYPE_ID) qty from t_Type_List group by CARD_TYPE_ID
)
SELECT t1.CARD_TYPE_ID,t1.CARD_TYPE ,nvl(t2.qty,0) FROM t_Type_List t1 left join t_Count_Card_Type t2 on t1.CARD_TYPE_ID = t2.CARD_TYPE_ID
</select>
<select id="findCityListByCardType" resultType="java.util.HashMap">
WITH
t_City_List
AS(
select GROUP_NO.GROUP_NO,CITY_DIC.CITYNAME,GROUP_NO.VAILD_COUNT,GROUP_NO.INVALID_COUNT,TASK.CITYCODE from TASK left join GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID left join CITY_DIC on TASK.CITYCODE=CITY_DIC.CITYCODE where CARD_TYPE=#{card_Type}
),
t_Count_VAILD_COUNT
AS(
select VAILD_COUNT, count(VAILD_COUNT) qty1 from t_City_List group by VAILD_COUNT
),
t_Count_INVALID_COUNT
AS(
select INVALID_COUNT, count(INVALID_COUNT) qty2 from t_City_List group by INVALID_COUNT
),
t_Sum_VAILD_COUNT
AS(
select VAILD_COUNT, SUM(VAILD_COUNT) qty3 from t_City_List group by VAILD_COUNT
)
SELECT t1.GROUP_NO,t1.CITYNAME,t1.CITYCODE,t1.VAILD_COUNT,t1.INVALID_COUNT,nvl(t2.qty1,0),nvl(t3.qty2,0),nvl(t4.qty3,0) FROM t_City_List t1 left join t_Count_VAILD_COUNT t2 on t1.VAILD_COUNT = t2.VAILD_COUNT left join t_Count_INVALID_COUNT t3 on t1.INVALID_COUNT=t3.INVALID_COUNT left join t_Sum_VAILD_COUNT t4 on t1.VAILD_COUNT=t4.VAILD_COUNT
</select>
<select id="findCityListByTaskStateId" resultType="java.util.HashMap">
WITH
t_City_List
AS(
select GROUP_NO.GROUP_NO,CITY_DIC.CITYNAME,GROUP_NO.VAILD_COUNT,GROUP_NO.INVALID_COUNT,TASK.CITYCODE from TASK left join GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID left join CITY_DIC on TASK.CITYCODE=CITY_DIC.CITYCODE where TASK_STATE_ID=#{task_State_Id}
),
t_Count_VAILD_COUNT
AS(
select VAILD_COUNT, count(VAILD_COUNT) qty1 from t_City_List group by VAILD_COUNT
),
t_Count_INVALID_COUNT
AS(
select INVALID_COUNT, count(INVALID_COUNT) qty2 from t_City_List group by INVALID_COUNT
),
t_Sum_VAILD_COUNT
AS(
select VAILD_COUNT, SUM(VAILD_COUNT) qty3 from t_City_List group by VAILD_COUNT
)
SELECT t1.GROUP_NO,t1.CITYNAME,t1.CITYCODE,t1.VAILD_COUNT,t1.INVALID_COUNT,nvl(t2.qty1,0),nvl(t3.qty2,0),nvl(t4.qty3,0) FROM t_City_List t1 left join t_Count_VAILD_COUNT t2 on t1.VAILD_COUNT = t2.VAILD_COUNT left join t_Count_INVALID_COUNT t3 on t1.INVALID_COUNT=t3.INVALID_COUNT left join t_Sum_VAILD_COUNT t4 on t1.VAILD_COUNT=t4.VAILD_COUNT
</select>
</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