Commit 5106a0eb authored by Administrator's avatar Administrator

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

parents beded389 5bed5387
...@@ -386,10 +386,10 @@ public class UserApi { ...@@ -386,10 +386,10 @@ public class UserApi {
* *
* @return * @return
*/ */
@RequestMapping("getGroupNoByTaskListId") @RequestMapping("getGroupListByTaskListId")
// @RequiresPermissions("userInfo.add")//权限管理; // @RequiresPermissions("userInfo.add")//权限管理;
public String getGroupNoByTaskListId(@RequestParam("taskListID") String tasklistid, HttpServletResponse resp) { public String getGroupListByTaskListId(@RequestParam("taskListID") String tasklistid, HttpServletResponse resp) {
List<GroupNoEntity> groupNoEntity = groupNoService.findGroupNoByTaskListID(tasklistid); List<GroupNoEntity> groupNoEntity = groupNoService.findGroupListByTaskListID(tasklistid);
YXJSONResponse yxjsonResponse = new YXJSONResponse(); YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8"); resp.setCharacterEncoding("UTF-8");
yxjsonResponse.outPutSuccess(groupNoEntity); yxjsonResponse.outPutSuccess(groupNoEntity);
...@@ -405,8 +405,8 @@ public class UserApi { ...@@ -405,8 +405,8 @@ public class UserApi {
*/ */
@RequestMapping("getGroupNoByTaskStateId") @RequestMapping("getGroupNoByTaskStateId")
// @RequiresPermissions("userInfo.add")//权限管理; // @RequiresPermissions("userInfo.add")//权限管理;
public String findGroupNoByTaskStateId(@RequestParam("taskStateId") String taskStateId, HttpServletResponse resp) { public String findGroupListByTaskStateId(@RequestParam("taskStateId") String taskStateId, HttpServletResponse resp) {
List<GroupNoEntity> groupNoEntity = groupNoService.findGroupNoByTaskStateId(taskStateId); List<GroupNoEntity> groupNoEntity = groupNoService.findGroupListByTaskStateId(taskStateId);
YXJSONResponse yxjsonResponse = new YXJSONResponse(); YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8"); resp.setCharacterEncoding("UTF-8");
yxjsonResponse.outPutSuccess(groupNoEntity); yxjsonResponse.outPutSuccess(groupNoEntity);
...@@ -422,8 +422,8 @@ public class UserApi { ...@@ -422,8 +422,8 @@ public class UserApi {
*/ */
@RequestMapping("getGroupNoByCardType") @RequestMapping("getGroupNoByCardType")
// @RequiresPermissions("userInfo.add")//权限管理; // @RequiresPermissions("userInfo.add")//权限管理;
public String getGroupNoByCardType(@RequestParam("cardType") String cardType, HttpServletResponse resp) { public String getGroupListByCardType(@RequestParam("cardType") String cardType, HttpServletResponse resp) {
List<GroupNoEntity> groupNoEntity = groupNoService.findGroupNoByCardType(cardType); List<GroupNoEntity> groupNoEntity = groupNoService.findGroupListByCardType(cardType);
YXJSONResponse yxjsonResponse = new YXJSONResponse(); YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8"); resp.setCharacterEncoding("UTF-8");
yxjsonResponse.outPutSuccess(groupNoEntity); yxjsonResponse.outPutSuccess(groupNoEntity);
...@@ -440,10 +440,10 @@ public class UserApi { ...@@ -440,10 +440,10 @@ public class UserApi {
@RequestMapping("getTypeListByTaskStateId") @RequestMapping("getTypeListByTaskStateId")
// @RequiresPermissions("userInfo.add")//权限管理; // @RequiresPermissions("userInfo.add")//权限管理;
public String getTypeListByTaskStateId(@RequestParam("taskStateId") String taskStateId, HttpServletResponse resp) { public String getTypeListByTaskStateId(@RequestParam("taskStateId") String taskStateId, HttpServletResponse resp) {
List <Map <String, Object>> taskEntity = taskService.findTypeListByTaskStateId(taskStateId); List<TypeListEntity> typeListEntity = taskService.findTypeListByTaskStateId(taskStateId);
YXJSONResponse yxjsonResponse = new YXJSONResponse(); YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8"); resp.setCharacterEncoding("UTF-8");
yxjsonResponse.outPutSuccess(taskEntity); yxjsonResponse.outPutSuccess(typeListEntity);
Map map = new HashMap(); Map map = new HashMap();
// map.put("MakeType",productionTaskListEntity); // map.put("MakeType",productionTaskListEntity);
return yxjsonResponse.toJSONString(); return yxjsonResponse.toJSONString();
......
package com.yxproject.start.entity;
/**
* Created by Administrator on 2018/12/18.
*/
import javax.persistence.*;
import java.sql.Time;
import java.util.Date;
import java.util.Objects;
@Entity
@Table(name = "TYPE_LIST", schema = "DAHAI")
public class TypeListEntity {
private long typeCode;
private long typeCount;
private String typeName;
@Id
@Column(name = "typeCode", nullable = false, precision = 0)
public long getTypeCode() {
return typeCode;
}
public void setTypeCode(long typeCode) {
this.typeCode = typeCode;
}
@Basic
@Column(name = "typeCount", nullable = false, precision = 0)
public long getTypeCount() {
return typeCount;
}
public void setTypeCount(long typeCount) {
this.typeCount = typeCount;
}
@Basic
@Column(name = "typeName", nullable = false, precision = 0)
public String getTypeName() {
return typeName;
}
public void setTypeName(String typeName) {
this.typeName = typeName;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
TypeListEntity that = (TypeListEntity) o;
return typeCode == that.typeCode &&
typeCount == that.typeCount &&
Objects.equals(typeName, that.typeName);
}
@Override
public int hashCode() {
return Objects.hash(typeCode, typeCount, typeName);
}
}
...@@ -18,8 +18,8 @@ public interface GroupNoMapper { ...@@ -18,8 +18,8 @@ public interface GroupNoMapper {
public int findGroupNoCountByTaskId(String task_Id); public int findGroupNoCountByTaskId(String task_Id);
public List<Map<String,Object>> findSpecialCountyList(String task_Id); public List<Map<String,Object>> findSpecialCountyList(String task_Id);
public List<Map<String,Object>> findNormalCountyList(String task_Id); public List<Map<String,Object>> findNormalCountyList(String task_Id);
public List<GroupNoEntity> findGroupNoByTaskListID(String tasklistID); public List<GroupNoEntity> findGroupListByTaskListID(String tasklistID);
public List<GroupNoEntity> findGroupNoByTaskStateId(String taskStateId); public List<GroupNoEntity> findGroupListByTaskStateId(String taskStateId);
public List<GroupNoEntity> findGroupNoByCardType(String cardType); public List<GroupNoEntity> findGroupListByCardType(String cardType);
} }
package com.yxproject.start.mapper; package com.yxproject.start.mapper;
import com.yxproject.start.entity.TaskEntity; import com.yxproject.start.entity.*;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -19,7 +19,7 @@ public interface TaskMapper { ...@@ -19,7 +19,7 @@ public interface TaskMapper {
public List<TaskEntity> findTaskEntityByState(int state); public List<TaskEntity> findTaskEntityByState(int state);
public int replaceExceptionInformation(TaskEntity taskEntity); 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<TypeListEntity> 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 updateOutStorageDate( @Param("taskId")String taskId, @Param("inStorageCount")String inStorageCount, @Param("outStorageCount")String outStorageCount);
......
...@@ -10,8 +10,8 @@ import java.util.Map; ...@@ -10,8 +10,8 @@ import java.util.Map;
*/ */
public interface GroupNoService { public interface GroupNoService {
public List<Map<String, Object>> findCountyInfoList(String taskID); public List<Map<String, Object>> findCountyInfoList(String taskID);
public List<GroupNoEntity> findGroupNoByTaskListID(String tasklistID); public List<GroupNoEntity> findGroupListByTaskListID(String tasklistID);
public List<GroupNoEntity> findGroupNoByTaskStateId(String taskStateId); public List<GroupNoEntity> findGroupListByTaskStateId(String taskStateId);
public List<GroupNoEntity> findGroupNoByCardType(String cardType); public List<GroupNoEntity> findGroupListByCardType(String cardType);
} }
...@@ -30,7 +30,7 @@ public interface TaskService { ...@@ -30,7 +30,7 @@ public interface TaskService {
public int updateStorageDate(String taskId,String inStorageCount,String outStorageCount); public int updateStorageDate(String taskId,String inStorageCount,String outStorageCount);
public List<Map<String,Object>> findTypeListByTaskStateId( String taskStateId); public List<TypeListEntity> findTypeListByTaskStateId(String taskStateId);
public List<Map<String,Object>> findCityListByTaskStateId(String taskStateId); public List<Map<String,Object>> findCityListByTaskStateId(String taskStateId);
......
...@@ -31,20 +31,20 @@ public class GroupNoServiceImpl implements GroupNoService { ...@@ -31,20 +31,20 @@ public class GroupNoServiceImpl implements GroupNoService {
} }
@Override @Override
public List<GroupNoEntity> findGroupNoByTaskListID( String tasklistid) { public List<GroupNoEntity> findGroupListByTaskListID( String tasklistid) {
List<GroupNoEntity> byTaskListID = groupNoMapper.findGroupNoByTaskListID(tasklistid); List<GroupNoEntity> byTaskListID = groupNoMapper.findGroupListByTaskListID(tasklistid);
return byTaskListID; return byTaskListID;
} }
@Override @Override
public List <GroupNoEntity> findGroupNoByTaskStateId(String taskStateId) { public List <GroupNoEntity> findGroupListByTaskStateId(String taskStateId) {
List<GroupNoEntity> TaskStateId = groupNoMapper.findGroupNoByTaskStateId(taskStateId); List<GroupNoEntity> TaskStateId = groupNoMapper.findGroupListByTaskStateId(taskStateId);
return TaskStateId; return TaskStateId;
} }
@Override @Override
public List <GroupNoEntity> findGroupNoByCardType( String cardType ) { public List <GroupNoEntity> findGroupListByCardType( String cardType ) {
List<GroupNoEntity> CardType = groupNoMapper.findGroupNoByCardType(cardType); List<GroupNoEntity> CardType = groupNoMapper.findGroupListByCardType(cardType);
return CardType; return CardType;
} }
......
...@@ -458,9 +458,25 @@ public class TaskServiceImpl implements TaskService { ...@@ -458,9 +458,25 @@ public class TaskServiceImpl implements TaskService {
* @return * @return
*/ */
@Override @Override
public List <Map <String, Object>> findTypeListByTaskStateId( String taskStateId ) { public List<TypeListEntity> findTypeListByTaskStateId( String taskStateId ) {
List <Map <String, Object>> TaskStateId =taskMapper.findTypeListByTaskStateId(taskStateId); List<TypeListEntity> typeListEntity = taskMapper.findTypeListByTaskStateId(taskStateId);
return TaskStateId; // List <Map <String, Object>> list = new ArrayList <>();
// int i;
// for(i=0; i<TaskStateId.size();i++){
// Map <String, Object> map = new HashMap <>();
// map.put("typeCode",TaskStateId. ("TASK.CARD_TYPE"));
// map.put("typeCount",TaskStateId.("count(CARD_TYPE_ID)"));
// map.put("typeName",TaskStateId.("CARD_TYPE_DIC.CARD_TYPE"));
// list.add(map);
// }
// for (Map map: typeListByTaskStateId) {
// Map <String, Object> newMap = new HashMap <>();
// newMap.put("typeCode",map.get("TYPE_CODE"));
// newMap.put("typeCount",map.get("TYPE_COUNT"));
// newMap.put("typeName",map.get("TYPE_NAME"));
// list.add(newMap);
// }
return typeListEntity;
} }
/** /**
......
...@@ -43,16 +43,28 @@ ...@@ -43,16 +43,28 @@
SELECT * FROM TABLE(find_normal_county_list.GET_county_infos(#{task_Id})) SELECT * FROM TABLE(find_normal_county_list.GET_county_infos(#{task_Id}))
</select> </select>
<select id="findGroupNoByTaskListID" resultType="com.yxproject.start.entity.GroupNoEntity" parameterType="String"> <select id="findGroupListByTaskListID" resultType="com.yxproject.start.entity.GroupNoEntity" parameterType="String">
select GROUP_NO,sum(valid_Count),sum(INVALID_COUNT),sum(SPECIAL_CARD_COUNT),COUNT(GROUP_NO) from TASK left join (select sum(valid_Count),sum(INVALID_COUNT),sum(SPECIAL_CARD_COUNT),COUNT(GROUP_NO),TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,valid_Count,INVALID_COUNT from GROUP_NO group by TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,valid_Count,INVALID_COUNT ) GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID where TASK.TASK_ID=#{task_Id} GROUP BY GROUP_NO select GROUP_NO as groupNo,sum(VALID_COUNT) as validCount,sum(INVALID_COUNT) as invalidCount,sum(SPECIAL_CARD_COUNT) as specialCardCount,COUNT(GROUP_NO) from TASK
left join (select sum(VALID_COUNT),sum(INVALID_COUNT),sum(SPECIAL_CARD_COUNT),COUNT(GROUP_NO),TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VALID_COUNT,INVALID_COUNT from GROUP_NO
group by TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VALID_COUNT,INVALID_COUNT ) GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID
where TASK.TASK_ID=#{task_Id}
group by GROUP_NO
</select> </select>
<select id="findGroupNoByTaskStateId" resultType="com.yxproject.start.entity.GroupNoEntity" parameterType="String"> <select id="findGroupListByTaskStateId" resultType="com.yxproject.start.entity.GroupNoEntity" parameterType="String">
select GROUP_NO,sum(valid_Count),sum(INVALID_COUNT),sum(SPECIAL_CARD_COUNT),COUNT(GROUP_NO) from TASK left join (select sum(valid_Count),sum(INVALID_COUNT),sum(SPECIAL_CARD_COUNT),COUNT(GROUP_NO),TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,valid_Count,INVALID_COUNT from GROUP_NO group by TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,valid_Count,INVALID_COUNT ) GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID where TASK.TASK_STATE_ID=#{task_State_Id} GROUP BY GROUP_NO select GROUP_NO as groupNo,sum(VALID_COUNT) as validCount,sum(INVALID_COUNT) as invalidCount,sum(SPECIAL_CARD_COUNT) as specialCardCount,COUNT(GROUP_NO) from TASK
left join (select sum(VALID_COUNT),sum(INVALID_COUNT),sum(SPECIAL_CARD_COUNT),COUNT(GROUP_NO),TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VALID_COUNT,INVALID_COUNT from GROUP_NO
group by TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VALID_COUNT,INVALID_COUNT ) GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID
where TASK.TASK_STATE_ID=#{task_State_Id}
group by GROUP_NO
</select> </select>
<select id="findGroupNoByCardType" resultType="com.yxproject.start.entity.GroupNoEntity" parameterType="String"> <select id="findGroupListByCardType" resultType="com.yxproject.start.entity.GroupNoEntity" parameterType="String">
select GROUP_NO,sum(valid_Count),sum(INVALID_COUNT),sum(SPECIAL_CARD_COUNT),COUNT(GROUP_NO) from TASK left join (select sum(valid_Count),sum(INVALID_COUNT),sum(SPECIAL_CARD_COUNT),COUNT(GROUP_NO),TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,valid_Count,INVALID_COUNT from GROUP_NO group by TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,valid_Count,INVALID_COUNT ) GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID where TASK.CARD_TYPE=#{card_type} GROUP BY GROUP_NO select GROUP_NO as groupNo,sum(VALID_COUNT) as validCount,sum(INVALID_COUNT) as invalidCount,sum(SPECIAL_CARD_COUNT) as specialCardCount,COUNT(GROUP_NO) from TASK
left join (select sum(VALID_COUNT),sum(INVALID_COUNT),sum(SPECIAL_CARD_COUNT),COUNT(GROUP_NO),TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VALID_COUNT,INVALID_COUNT from GROUP_NO
group by TASK_ID,GROUP_NO,SPECIAL_CARD_COUNT,VALID_COUNT,INVALID_COUNT ) GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID
where TASK.CARD_TYPE=#{card_type}
group by GROUP_NO
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -77,15 +77,15 @@ ...@@ -77,15 +77,15 @@
</select> </select>
<update id="updateOutStorageDate" parameterType="String"> <update id="updateOutStorageDate" parameterType="String">
update TASK SET OUT_STORAGE_DATE IS SYSDATE where TASK_ID =#{task_Id} update TASK SET OUT_STORAGE_DATE = SYSDATE where TASK_ID =#{task_Id}
</update> </update>
<update id="updateInStorageDate" parameterType="String"> <update id="updateInStorageDate" parameterType="String">
update TASK SET IN_STORAGE_DATE =#{in_Storage_Date} where TASK_ID =#{task_Id} update TASK SET IN_STORAGE_DATE = SYSDATE where TASK_ID =#{task_Id}
</update> </update>
<select id="findTypeListByTaskStateId" resultType="java.util.HashMap"> <select id="findTypeListByTaskStateId" resultType="com.yxproject.start.entity.TypeListEntity" parameterType="String">
SELECT TASK.CARD_TYPE,count(CARD_TYPE_ID),CARD_TYPE_DIC.CARD_TYPE FROM TASK SELECT TASK.CARD_TYPE AS typeCode,count(CARD_TYPE_ID) AS typeCount,CARD_TYPE_DIC.CARD_TYPE AS typeName 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 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} where TASK_STATE_ID=#{task_State_Id}
GROUP BY CARD_TYPE_DIC.CARD_TYPE,TASK.CARD_TYPE GROUP BY CARD_TYPE_DIC.CARD_TYPE,TASK.CARD_TYPE
......
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