Commit a2d94781 authored by Administrator's avatar Administrator

Merge branch 'dev' of http://121.22.111.250:8000/zhangyusheng/YX_IDENT_REFACTORING into dev

# Conflicts:
#	src/main/java/com/yxproject/start/api/UserInfoApi.java
parents a25d8490 ade1220f
......@@ -63,6 +63,11 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.13</version>
</dependency>
<!--引入log4j2作为日志组件-->
<!--<dependency>-->
......
......@@ -463,11 +463,11 @@ public class UserInfoApi {
@Path("findProductionTaskListByState")
@Produces(MediaType.APPLICATION_JSON)
@RequiresPermissions("userInfo.add")//权限管理;
public String findProductionTaskListByState(@RequestParam("state") String state, @Context HttpServletResponse resp){
public String findProductionTaskListByState(@QueryParam("state") String state, @Context HttpServletResponse resp){
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
List<ProductionTaskListEntity> taskListEntityList = productionTaskListService.findProductionTaskListEntityByState(Integer.valueOf(state));
yxjsonResponse.outPutSuccess(taskListEntityList);
List<Map<String, Object>> productionTaskInfoList = productionTaskListService.findProductionTaskListEntityByState(Integer.valueOf(state));
yxjsonResponse.outPutSuccess(productionTaskInfoList);
return yxjsonResponse.toJSONString();
}
......@@ -489,7 +489,7 @@ public class UserInfoApi {
/**
* 打印装箱单
* 下载装箱单
*/
@GET
@Path("printPackingList")
......@@ -630,18 +630,18 @@ public class UserInfoApi {
row.setHeightInPoints(Short.parseShort("16"));//设置行高
//创建单元格并且添加数据
cell = row.createCell(0);
cell.setCellValue((String) map.get("countyName"));
cell.setCellValue((String) map.get("COUNTYNAME"));
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue(map.get("download").toString().equals("0") ? "" : map.get("download").toString());
cell.setCellValue(map.get("DOWNLOAD").toString().equals("0") ? "" : map.get("DOWNLOAD").toString());
cell.setCellStyle(style);
cell = row.createCell(2);
cell.setCellValue("");
cell.setCellStyle(style);
cell = row.createCell(3);
cell.setCellValue(((Integer.parseInt(map.get("download").toString()) % 250==0?Integer.parseInt(map.get("download").toString()) / 250:Integer.parseInt(map.get("download").toString()) / 250+1)) + "");
num += ((Integer.parseInt(map.get("download").toString()) % 250==0?Integer.parseInt(map.get("download").toString()) / 250:Integer.parseInt(map.get("download").toString()) / 250+1));
cell.setCellValue(((Integer.parseInt(map.get("DOWNLOAD").toString()) % 250==0?Integer.parseInt(map.get("DOWNLOAD").toString()) / 250:Integer.parseInt(map.get("DOWNLOAD").toString()) / 250+1)) + "");
num += ((Integer.parseInt(map.get("DOWNLOAD").toString()) % 250==0?Integer.parseInt(map.get("DOWNLOAD").toString()) / 250:Integer.parseInt(map.get("DOWNLOAD").toString()) / 250+1));
cell.setCellStyle(style);
cell = row.createCell(4);
cell.setCellValue("");
......@@ -844,7 +844,7 @@ public class UserInfoApi {
for (int a = 0; a < countyInfoList.size(); a++) {
Map<String, Object> map = countyInfoList.get(a);
//第二步创建sheet
if (map.get("countyName").toString().contains("区")) {
if (map.get("COUNTYNAME").toString().contains("区")) {
//第三步创建行row:添加表头0行
row = mergeSheet.createRow(0);
row.setHeightInPoints(Short.parseShort("20"));//设置行高
......@@ -899,19 +899,19 @@ public class UserInfoApi {
row.setHeightInPoints(Short.parseShort("16"));//设置行高
//创建单元格并且添加数据
cell = row.createCell(0);
cell.setCellValue(map.get("countyName").toString());
cell.setCellValue(map.get("COUNTYNAME").toString());
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue(map.get("download") + "");
mergeSum += Integer.valueOf(map.get("download") + "");
cell.setCellValue(map.get("DOWNLOAD") + "");
mergeSum += Integer.valueOf(map.get("DOWNLOAD") + "");
cell.setCellStyle(style);
cell = row.createCell(2);
cell.setCellValue("");
cell.setCellStyle(style);
cell = row.createCell(3);
cell.setCellStyle(style);
cell.setCellValue(((Integer.parseInt(map.get("download") + "") % 250==0?Integer.parseInt(map.get("download") + "") / 250:Integer.parseInt(map.get("download") + "") / 250+1)) + "");
boxNum += ((Integer.parseInt(map.get("download") + "") % 250==0?Integer.parseInt(map.get("download") + "") / 250:Integer.parseInt(map.get("download") + "") / 250+1));
cell.setCellValue(((Integer.parseInt(map.get("DOWNLOAD") + "") % 250==0?Integer.parseInt(map.get("DOWNLOAD") + "") / 250:Integer.parseInt(map.get("DOWNLOAD") + "") / 250+1)) + "");
boxNum += ((Integer.parseInt(map.get("DOWNLOAD") + "") % 250==0?Integer.parseInt(map.get("DOWNLOAD") + "") / 250:Integer.parseInt(map.get("DOWNLOAD") + "") / 250+1));
cell = row.createCell(4);
cell.setCellValue("");
cell.setCellStyle(style);
......@@ -1025,7 +1025,7 @@ public class UserInfoApi {
mergeSheet.addMergedRegion(callRangeb);
lineNum++;
} else {
sheet = wb.createSheet(a + "-" + (String) map.get("countyName"));
sheet = wb.createSheet(a + "-" + (String) map.get("COUNTYNAME"));
sheet.setColumnWidth(0, (int) 30 * 100);
sheet.setColumnWidth(1, (int) 30 * 70);
......@@ -1093,17 +1093,17 @@ public class UserInfoApi {
row.setHeightInPoints(Short.parseShort("16"));//设置行高
//创建单元格并且添加数据
cell = row.createCell(0);
cell.setCellValue(map.get("countyName").toString());
cell.setCellValue(map.get("COUNTYNAME").toString());
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue(map.get("download") + "");
cell.setCellValue(map.get("DOWNLOAD") + "");
cell.setCellStyle(style);
cell = row.createCell(2);
cell.setCellValue("");
cell.setCellStyle(style);
cell = row.createCell(3);
cell.setCellStyle(style);
cell.setCellValue(((Integer.parseInt(map.get("download") + "") % 250==0?Integer.parseInt(map.get("download") + "") / 250:Integer.parseInt(map.get("download") + "") / 250+1)) + "");
cell.setCellValue(((Integer.parseInt(map.get("DOWNLOAD") + "") % 250==0?Integer.parseInt(map.get("DOWNLOAD") + "") / 250:Integer.parseInt(map.get("DOWNLOAD") + "") / 250+1)) + "");
cell = row.createCell(4);
cell.setCellValue("");
cell.setCellStyle(style);
......@@ -1128,7 +1128,7 @@ public class UserInfoApi {
cell.setCellValue("合计");
cell.setCellStyle(style);
cell = row.createCell(1);
cell.setCellValue(Integer.valueOf(map.get("download") + ""));
cell.setCellValue(Integer.valueOf(map.get("DOWNLOAD") + ""));
cell.setCellStyle(style);
cell = row.createCell(2);
cell.setCellValue("制证车间");
......@@ -1144,7 +1144,7 @@ public class UserInfoApi {
}
cell.setCellStyle(style);
cell = row.createCell(3);
cell.setCellValue(((Integer.parseInt(map.get("download") + "") % 250==0?Integer.parseInt(map.get("download") + "") / 250:Integer.parseInt(map.get("download") + "") / 250+1)) + "");
cell.setCellValue(((Integer.parseInt(map.get("DOWNLOAD") + "") % 250==0?Integer.parseInt(map.get("DOWNLOAD") + "") / 250:Integer.parseInt(map.get("DOWNLOAD") + "") / 250+1)) + "");
cell.setCellStyle(style);
cell = row.createCell(4);
cell.setCellValue(permanentPositionDate);
......@@ -1222,8 +1222,8 @@ public class UserInfoApi {
//第六步将生成excel文件保存到指定路径下
FileOutputStream fout = null;
try {
fout = new FileOutputStream("E:\\Excel\\" + simpleDateFormat.format(new Date()) + countyInfoList.get(0).get("countyName") + ".xls");
// fout = new FileOutputStream("D:\\" + simpleDateFormat.format(new Date()) + list.get(0).getString("countyName") + ".xls");
fout = new FileOutputStream("F:\\Excel\\" + simpleDateFormat.format(new Date()) + countyInfoList.get(0).get("COUNTYNAME") + ".xls");
// fout = new FileOutputStream("D:\\" + simpleDateFormat.format(new Date()) + list.get(0).getString("COUNTYNAME") + ".xls");
wb.write(fout);
fout.close();
} catch (IOException e) {
......@@ -1231,8 +1231,8 @@ public class UserInfoApi {
}
System.out.println("Excel文件生成成功..." + new Date());
return "E:\\Excel\\" + simpleDateFormat.format(new Date()) +countyInfoList.get(0).get("countyName") + ".xls";
// return "D:\\" + simpleDateFormat.format(new Date()) + list.get(0).getString("countyName") + ".xls";
return "F:\\Excel\\" + simpleDateFormat.format(new Date()) +countyInfoList.get(0).get("COUNTYNAME") + ".xls";
// return "D:\\" + simpleDateFormat.format(new Date()) + list.get(0).getString("COUNTYNAME") + ".xls";
}
......
package com.yxproject.start.entity;
import javax.persistence.*;
import java.util.Objects;
/**
* Created by zhangyusheng on 2018/11/7 14:04
*/
@Entity
@Table(name = "ACCEPT_NO_INFO", schema = "DAHAI", catalog = "")
public class AcceptNoInfoEntity {
private String accept_No_Info_Id;
private String accept_No;
private String cyclesheetid;
private Long accept_Type;
private String group_No;
@Id
@Column(name = "ACCEPT_NO_INFO_ID", nullable = false, length = 20)
public String getAccept_No_Info_Id() {
return accept_No_Info_Id;
}
public void setAccept_No_Info_Id(String accept_No_Info_Id) {
this.accept_No_Info_Id = accept_No_Info_Id;
}
@Basic
@Column(name = "ACCEPT_NO", nullable = true, length = 20)
public String getAccept_No() {
return accept_No;
}
public void setAccept_No(String accept_No) {
this.accept_No = accept_No;
}
@Basic
@Column(name = "ACCEPT_TYPE", nullable = true, precision = 0)
public Long getAccept_Type() {
return accept_Type;
}
public void setAccept_Type(Long accept_Type) {
this.accept_Type = accept_Type;
}
@Basic
@Column(name = "CYCLESHEETID", nullable = true, length = 20)
public String getCyclesheetid() {
return cyclesheetid;
}
public void setCyclesheetid(String cyclesheetid) {
this.cyclesheetid = cyclesheetid;
}
@Basic
@Column(name = "GROUP_NO", nullable = true, length = 20)
public String getGroup_No() {
return group_No;
}
public void setGroup_No(String group_No) {
this.group_No = group_No;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
AcceptNoInfoEntity that = (AcceptNoInfoEntity) o;
return Objects.equals(accept_No_Info_Id, that.accept_No_Info_Id) &&
Objects.equals(accept_No, that.accept_No) &&
Objects.equals(cyclesheetid, that.cyclesheetid) &&
Objects.equals(group_No, that.group_No) &&
Objects.equals(accept_Type, that.accept_Type);
}
@Override
public int hashCode() {
return Objects.hash(accept_No_Info_Id, accept_No, cyclesheetid, accept_Type,group_No);
}
}
......@@ -9,10 +9,9 @@ public class GroupinfoEntity {
private String groupid;
private String groupno;
private String cyclesheetid;
private Long grouptype;
private Long valid_Count;
private Long invalid_Count;
private Long special_Card_Count;
@Id
@Column(name = "GROUPID", nullable = false, length = 20)
......@@ -44,16 +43,6 @@ public class GroupinfoEntity {
this.cyclesheetid = cyclesheetid;
}
@Basic
@Column(name = "GROUPTYPE", nullable = true, precision = 0)
public Long getGrouptype() {
return grouptype;
}
public void setGrouptype(Long grouptype) {
this.grouptype = grouptype;
}
@Basic
@Column(name = "VAILD_COUNT", nullable = true, precision = 0)
public Long getValid_Count() {
......@@ -73,7 +62,15 @@ public class GroupinfoEntity {
public void setInvalid_Count(Long invalid_Count) {
this.invalid_Count = invalid_Count;
}
@Basic
@Column(name = "SPECIAL_CARD_COUNT", nullable = true, precision = 0)
public Long getSpecial_Card_Count() {
return special_Card_Count;
}
public void setSpecial_Card_Count(Long special_Card_Count) {
this.special_Card_Count = special_Card_Count;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
......@@ -82,13 +79,14 @@ public class GroupinfoEntity {
return Objects.equals(groupid, that.groupid) &&
Objects.equals(groupno, that.groupno) &&
Objects.equals(cyclesheetid, that.cyclesheetid) &&
Objects.equals(grouptype, that.grouptype) &&
Objects.equals(valid_Count, that.valid_Count) &&
Objects.equals(special_Card_Count, that.special_Card_Count) &&
Objects.equals(invalid_Count, that.invalid_Count);
}
@Override
public int hashCode() {
return Objects.hash(groupid, groupno, cyclesheetid, grouptype, valid_Count, invalid_Count);
return Objects.hash(groupid, groupno, cyclesheetid, valid_Count, special_Card_Count,invalid_Count);
}
}
package com.yxproject.start.mapper;
import com.yxproject.start.entity.AcceptNoInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* Created by zhangyusheng on 2018/11/7 15:06
*/
@Mapper
public interface AcceptNoInfoMapper {
public List<AcceptNoInfoEntity> findAcceptNoInfoEntityByAcceptNo(String acceptNo);
public void saveAcceptNoInfoEntity(AcceptNoInfoEntity acceptNoInfoEntity);
public void updateAcceptNoInfoEntity(AcceptNoInfoEntity acceptNoInfoEntity);
public List<AcceptNoInfoEntity> findAcceptNoInfoEntityByGroupNo(String groupNo);
}
......@@ -20,10 +20,10 @@ public interface GroupinfoMapper {
public List<GroupinfoEntity> findGroupinfoEntityListByProductionTaskListId(String cyclesheetid);
public List<Map<String, Object>> findCountyInfoList8_10(String groupinfo10, String groupinfo8);
public int findGroupInfoCountByProductionTaskListId(String cyclesheetid);
public List<Map<String, Object>> findCountyInfoList8(String groupinfo8);
public List<Map<String,Object>> findSpecialCountyList(String cyclesheetid);
public List<Map<String, Object>> findCountyInfoList10(String groupinfo10);
public List<Map<String,Object>> findNormalCountyList(String cyclesheetid);
}
......@@ -26,8 +26,11 @@ public interface UtilMapper {
/**
* 查询废证信息表序列值
*/
@Select(" select FAILEDINFO_SEQ.nextval from dual")
public int findFailedinfoSequenceNextValue();
/**
* 查询受理号表序列值
*/
public int findAcceptInfoSequenceNextValue();
}
......@@ -6,6 +6,7 @@ import com.yxproject.start.entity.PoliceStationVailedInfoEntity;
import com.yxproject.start.entity.ProductionTaskListEntity;
import java.util.List;
import java.util.Map;
public interface ProductionTaskListService {
......@@ -25,7 +26,7 @@ public interface ProductionTaskListService {
public List<PoliceStationVailedInfoEntity> find(String id);
public List<ProductionTaskListEntity> findProductionTaskListEntityByState(int state);
public List<Map<String,Object>> findProductionTaskListEntityByState(int state);
}
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.GroupinfoEntity;
import com.yxproject.start.mapper.GroupinfoMapper;
import com.yxproject.start.service.GroupinfoService;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -20,46 +19,14 @@ public class GroupinfoServiceImpl implements GroupinfoService {
@Override
public List<Map<String, Object>> findCountyInfoList(String cyclesheetid) {
List<Map<String, Object>> countyInfoList = new ArrayList<>();
List<GroupinfoEntity> groupinfoEntityList = groupinfoMapper.findGroupinfoEntityListByProductionTaskListId(cyclesheetid);
List<String> groupnoLength10 = new ArrayList<String>();
List<String> groupnoLength8 = new ArrayList<String>();
for (GroupinfoEntity groupinfoEntity : groupinfoEntityList) {
if (groupinfoEntity.getGroupno().length() == 10) {
groupnoLength10.add(groupinfoEntity.getGroupno());
} else {
groupnoLength8.add(groupinfoEntity.getGroupno());
}
}
String group_no10 = "";
for (int i = 0; i < groupnoLength10.size(); i++) {
if (i != groupnoLength10.size() - 1) {
group_no10 += "'" + groupnoLength10.get(i) + "',";
} else {
group_no10 += "'" + groupnoLength10.get(i) + "'";
}
}
String group_no8 = "";
for (int i = 0; i < groupnoLength8.size(); i++) {
if (i != groupnoLength8.size() - 1) {
group_no8 += "'" + groupnoLength8.get(i) + "',";
} else {
group_no8 += "'" + groupnoLength8.get(i) + "'";
}
}
//数组中有长度为10和8 的
if (groupnoLength8.size() != 0 && groupnoLength10.size() != 0) {
countyInfoList = groupinfoMapper.findCountyInfoList8_10(group_no10, group_no8);
} else if (groupnoLength8.size() == 0 && groupnoLength10.size() != 10) {
//数组中只有长度为10 的
countyInfoList = groupinfoMapper.findCountyInfoList10(group_no10);
} else if (groupnoLength8.size() != 0 && groupnoLength10.size() == 0) {
//数组中只有长度为8 的
countyInfoList = groupinfoMapper.findCountyInfoList8(group_no8);
}
return countyInfoList;
int count = groupinfoMapper.findGroupInfoCountByProductionTaskListId(cyclesheetid);
List<Map<String,Object>> list = new ArrayList<>();
if (count==0){
list = groupinfoMapper.findSpecialCountyList(cyclesheetid);
}else{
list = groupinfoMapper.findNormalCountyList(cyclesheetid);
}
return list;
}
}
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.AcceptNoInfoEntity;
import com.yxproject.start.entity.GroupinfoEntity;
import com.yxproject.start.entity.PoliceStationVailedInfoEntity;
import com.yxproject.start.entity.ProductionTaskListEntity;
......@@ -13,10 +14,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* @author Administrator
......@@ -42,9 +40,14 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
@Autowired
public PoliceStationVailedInfoMapper policeStationVailedInfoMapper;
@Autowired
public AcceptNoInfoMapper acceptNoInfoMapper;
/**
* 查询任务单
* 通过任务单ID
*
* @param id
* @return
*/
......@@ -56,13 +59,43 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
/**
* 更新任务单信息
* 通过新的任务单信息
*
* @param productionTaskListEntity
* @return
*/
@Override
public int updateProductionTask(ProductionTaskListEntity productionTaskListEntity) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
//todo 状态更新时间
Long state = productionTaskListEntity.getState();
switch (Integer.valueOf(state.toString())) {
case 1:
productionTaskListEntity.setHandout_Date(simpleDateFormat.format(new Date()));
break;
case 2:
productionTaskListEntity.setDownload_Date(simpleDateFormat.format(new Date()));
break;
case 3:
productionTaskListEntity.setPrint_Out(simpleDateFormat.format(new Date()));
break;
case 4:
productionTaskListEntity.setPermanent_Position_Date(simpleDateFormat.format(new Date()));
break;
case 5:
productionTaskListEntity.setRoll_Out_Workshop_Date(simpleDateFormat.format(new Date()));
break;
case 6:
productionTaskListEntity.setQualityinspection_Date(simpleDateFormat.format(new Date()));
break;
case 7:
productionTaskListEntity.setPutinstorage_Date(simpleDateFormat.format(new Date()));
break;
case 8:
productionTaskListEntity.setOutbound_Date(simpleDateFormat.format(new Date()));
break;
default:
break;
}
return productionTaskListMapper.updateProductionTask(productionTaskListEntity);
}
......@@ -74,17 +107,17 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
* @return
*/
@Override
@Transactional(rollbackFor=Exception.class)
@Transactional(rollbackFor = Exception.class)
public int addProductionTaskListEntity(ProductionTaskListEntity productionTaskListEntity, List<GroupinfoEntity> groupinfoEntities) {
int production_task_list_seq = utilMapper.findProductionTaskListSequenceNextValue();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
productionTaskListEntity.setProduction_Task_List_Id(simpleDateFormat.format(new Date())+production_task_list_seq);
productionTaskListEntity.setProduction_Task_List_Id(simpleDateFormat.format(new Date()) + production_task_list_seq);
productionTaskListMapper.insertProductionTaskListEntity(productionTaskListEntity);
for (GroupinfoEntity groupinfoEntity:groupinfoEntities) {
for (GroupinfoEntity groupinfoEntity : groupinfoEntities) {
int groupInfoSequenceValue = utilMapper.findGroupInfoSequenceNextValue();
groupinfoEntity.setGroupid(simpleDateFormat.format(new Date())+groupInfoSequenceValue);
groupinfoEntity.setCyclesheetid(simpleDateFormat.format(new Date())+production_task_list_seq);
groupinfoEntity.setGroupid(simpleDateFormat.format(new Date()) + groupInfoSequenceValue);
groupinfoEntity.setCyclesheetid(simpleDateFormat.format(new Date()) + production_task_list_seq);
groupinfoMapper.insertGroupinfoEntity(groupinfoEntity);
}
......@@ -94,25 +127,26 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
/**
* 查询证件信息(搜索框)
* 包括受理库、制证库的证件信息,以及该证件所在任务单的详细情况
*
* @param cardInfo
* @return
*/
@Override
public List<Object> findCardInfoByCardIDOrAcceptNo(String cardInfo) {
List<Object> list= new ArrayList<>();
String accept_no ="";
List<Object> list = new ArrayList<>();
String accept_no = "";
List<AccCardTEntity> accCardTEntityByCardIdOrAcceptNo = accCardTMapper.findAccCardTEntityByCardIdOrAcceptNo(cardInfo);
if (accCardTEntityByCardIdOrAcceptNo.size()!=0){
if (accCardTEntityByCardIdOrAcceptNo.size() != 0) {
list.addAll(accCardTEntityByCardIdOrAcceptNo);
for (AccCardTEntity accCardTEntity :accCardTEntityByCardIdOrAcceptNo) {
accept_no=accCardTEntity.getAccept_No();
for (AccCardTEntity accCardTEntity : accCardTEntityByCardIdOrAcceptNo) {
accept_no = accCardTEntity.getAccept_No();
}
}
List<ProdCardTEntity> prodCardTEntityByCardIdOrAcceptNo = prodCardTMapper.findCardInfo(cardInfo);
if (prodCardTEntityByCardIdOrAcceptNo.size()!=0){
if (prodCardTEntityByCardIdOrAcceptNo.size() != 0) {
list.addAll(prodCardTEntityByCardIdOrAcceptNo);
for (ProdCardTEntity prodCardTEntity:prodCardTEntityByCardIdOrAcceptNo) {
accept_no = prodCardTEntity.getAccept_No() ;
for (ProdCardTEntity prodCardTEntity : prodCardTEntityByCardIdOrAcceptNo) {
accept_no = prodCardTEntity.getAccept_No();
}
}
List<ProductionTaskListEntity> productionTaskListEntityByAcceptNo = productionTaskListMapper.findProductionTaskListEntityByAcceptNo(accept_no);
......@@ -123,37 +157,39 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
/**
* 添加快证
* 包含已经下发的任务单、没有下发的任务单
*
* @param cardInfo
* @return
*/
@Override
@Transactional(rollbackFor=Exception.class)
@Transactional(rollbackFor = Exception.class)
public int addQuickCyclesheetInfo(String cardInfo) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
/**
* 查询证件的受理号
*/
String accept_no ="";
String accept_no = "";
List<AccCardTEntity> accCardTEntityByCardIdOrAcceptNo = accCardTMapper.findAccCardTEntityByCardIdOrAcceptNo(cardInfo);
if (accCardTEntityByCardIdOrAcceptNo.size()!=0){
for (AccCardTEntity accCardTEntity :accCardTEntityByCardIdOrAcceptNo) {
accept_no=accCardTEntity.getAccept_No();
if (accCardTEntityByCardIdOrAcceptNo.size() != 0) {
for (AccCardTEntity accCardTEntity : accCardTEntityByCardIdOrAcceptNo) {
accept_no = accCardTEntity.getAccept_No();
}
}
List<ProdCardTEntity> prodCardTEntityByCardIdOrAcceptNo = prodCardTMapper.findCardInfo(cardInfo);
if (prodCardTEntityByCardIdOrAcceptNo.size()!=0){
for (ProdCardTEntity prodCardTEntity:prodCardTEntityByCardIdOrAcceptNo) {
accept_no = prodCardTEntity.getAccept_No() ;
if (prodCardTEntityByCardIdOrAcceptNo.size() != 0) {
for (ProdCardTEntity prodCardTEntity : prodCardTEntityByCardIdOrAcceptNo) {
accept_no = prodCardTEntity.getAccept_No();
}
}
List<GroupinfoEntity> groupinfoEntityByAcceptNo = groupinfoMapper.findGroupinfoEntityByAcceptNo(accept_no);
List<AcceptNoInfoEntity> acceptNoInfoEntityList = acceptNoInfoMapper.findAcceptNoInfoEntityByAcceptNo(accept_no);
/**
* 没有下发任务单的情况
* 即 在组号列表中没有没有该受理组号
*/
if (groupinfoEntityByAcceptNo.size()==0){
if (groupinfoEntityByAcceptNo.size() == 0) {
List<Map<String, Object>> entity = accCardTMapper.findAccGroupTEntityByCardIdOrAcceptNo(accept_no);
for (Map<String,Object> map :entity){
for (Map<String, Object> map : entity) {
Object group_no = map.get("GROUP_NO");
Object valid_count = map.get("VALID_COUNT");
Object invalid_count = map.get("INVALID_COUNT");
......@@ -163,130 +199,165 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
*/
ProductionTaskListEntity productionTaskListEntity = new ProductionTaskListEntity();
int production_task_list_seq = utilMapper.findProductionTaskListSequenceNextValue();
productionTaskListEntity.setProduction_Task_List_Id(simpleDateFormat.format(new Date())+production_task_list_seq);
productionTaskListEntity.setCitycode(original_no.toString().substring(0,6));
productionTaskListEntity.setMake_Type(Long.valueOf(original_no.toString().substring(20,21)));
productionTaskListEntity.setProduction_Task_List_Id(simpleDateFormat.format(new Date()) + production_task_list_seq);
productionTaskListEntity.setCitycode(original_no.toString().substring(0, 6));
productionTaskListEntity.setMake_Type(Long.valueOf(original_no.toString().substring(20, 21)));
productionTaskListEntity.setSubmit_Date(simpleDateFormat.format(new Date()));
productionTaskListMapper.insertProductionTaskListEntity(productionTaskListEntity);
/**
* 生成原来任务单的组号列表
* 原组号和快证组号
* 原组号
*/
int groupInfoSequenceValue = utilMapper.findGroupInfoSequenceNextValue();
GroupinfoEntity groupinfoEntity = new GroupinfoEntity();
groupinfoEntity.setGroupid(simpleDateFormat.format(new Date())+groupInfoSequenceValue);
groupinfoEntity.setCyclesheetid(simpleDateFormat.format(new Date())+production_task_list_seq);
groupinfoEntity.setGroupid(simpleDateFormat.format(new Date()) + groupInfoSequenceValue);
groupinfoEntity.setCyclesheetid(simpleDateFormat.format(new Date()) + production_task_list_seq);
groupinfoEntity.setGroupno(group_no.toString());
groupinfoEntity.setInvalid_Count(Long.valueOf(invalid_count.toString()));
groupinfoEntity.setValid_Count(Long.valueOf(valid_count.toString()));
groupinfoEntity.setSpecial_Card_Count((long) 1);
groupinfoMapper.insertGroupinfoEntity(groupinfoEntity);
int groupInfoSequenceValue2 = utilMapper.findGroupInfoSequenceNextValue();
GroupinfoEntity groupinfoEntity2 = new GroupinfoEntity();
groupinfoEntity2.setGroupid(simpleDateFormat.format(new Date())+groupInfoSequenceValue2);
groupinfoEntity2.setCyclesheetid(simpleDateFormat.format(new Date())+production_task_list_seq);
groupinfoEntity2.setGroupno(accept_no);
groupinfoEntity2.setGrouptype((long)1);
groupinfoEntity2.setInvalid_Count((long)0);
groupinfoEntity2.setValid_Count((long)-1);
groupinfoMapper.insertGroupinfoEntity(groupinfoEntity2);
/**
* 生成快证任务单并下发
*/
ProductionTaskListEntity productionTaskListEntityQ = new ProductionTaskListEntity();
int production_task_list_seqQ = utilMapper.findProductionTaskListSequenceNextValue();
productionTaskListEntityQ.setProduction_Task_List_Id(simpleDateFormat.format(new Date())+production_task_list_seqQ);
productionTaskListEntityQ.setCitycode(original_no.toString().substring(0,6));
productionTaskListEntityQ.setMake_Type((long)1);
productionTaskListEntityQ.setOld_Make_Type(Long.valueOf(original_no.toString().substring(20,21)));
productionTaskListEntityQ.setProduction_Task_List_Id(simpleDateFormat.format(new Date()) + production_task_list_seqQ);
productionTaskListEntityQ.setCitycode(original_no.toString().substring(0, 6));
productionTaskListEntityQ.setMake_Type((long) 1);
productionTaskListEntityQ.setOld_Make_Type(Long.valueOf(original_no.toString().substring(20, 21)));
productionTaskListEntityQ.setSubmit_Date(simpleDateFormat.format(new Date()));
productionTaskListEntityQ.setHandout_Date(simpleDateFormat.format(new Date()));
productionTaskListMapper.insertProductionTaskListEntity(productionTaskListEntityQ);
// /**
// * 生成快证任务单的组号列表
// * 快证组号
// */
// int groupInfoSequenceValueQ = utilMapper.findGroupInfoSequenceNextValue();
// GroupinfoEntity groupinfoEntityQ = new GroupinfoEntity();
// groupinfoEntityQ.setGroupid(simpleDateFormat.format(new Date())+groupInfoSequenceValueQ);
// groupinfoEntityQ.setCyclesheetid(simpleDateFormat.format(new Date())+production_task_list_seqQ);
// groupinfoEntityQ.setGroupno(accept_no);
// groupinfoEntityQ.setInvalid_Count((long)0);
// groupinfoEntityQ.setValid_Count((long)1);
// groupinfoMapper.insertGroupinfoEntity(groupinfoEntityQ);
/**
* 生成快证任务单的组号列表
* 快证组号
* 生成快证任务单的受理号信息
*/
int groupInfoSequenceValueQ = utilMapper.findGroupInfoSequenceNextValue();
GroupinfoEntity groupinfoEntityQ = new GroupinfoEntity();
groupinfoEntityQ.setGroupid(simpleDateFormat.format(new Date())+groupInfoSequenceValueQ);
groupinfoEntityQ.setCyclesheetid(simpleDateFormat.format(new Date())+production_task_list_seqQ);
groupinfoEntityQ.setGroupno(accept_no);
groupinfoEntityQ.setGrouptype((long)1);
groupinfoEntityQ.setInvalid_Count((long)0);
groupinfoEntityQ.setValid_Count((long)1);
groupinfoMapper.insertGroupinfoEntity(groupinfoEntityQ);
int acceptInfoSequenceNextValue = utilMapper.findAcceptInfoSequenceNextValue();
AcceptNoInfoEntity acceptNoInfoEntity = new AcceptNoInfoEntity();
acceptNoInfoEntity.setAccept_No_Info_Id(simpleDateFormat.format(new Date()) + acceptInfoSequenceNextValue);
acceptNoInfoEntity.setAccept_No(accept_no);
//设置受理类型为快证
acceptNoInfoEntity.setAccept_Type((long) 1);
acceptNoInfoEntity.setCyclesheetid(simpleDateFormat.format(new Date()) + production_task_list_seq);
acceptNoInfoEntity.setGroup_No(accept_no.substring(0, 8));
acceptNoInfoMapper.saveAcceptNoInfoEntity(acceptNoInfoEntity);
}
}else if (groupinfoEntityByAcceptNo.size()==1){
} else if (groupinfoEntityByAcceptNo.size() == 1 && acceptNoInfoEntityList.size() == 0) {
/**
* 下发任务单 但没有产生余证的情况
* 即 在组号列表中只有一个受理组号
* 即 只有一个受理组号
*/
List<ProductionTaskListEntity> productionTaskListEntity = productionTaskListMapper.findProductionTaskListEntity(groupinfoEntityByAcceptNo.get(0).getCyclesheetid());
// /**
// * 从原来的任务单中减去快证
// * 即从原来任务单组号列表中插入一条-1的组号
// */
// int groupInfoSequenceValue2 = utilMapper.findGroupInfoSequenceNextValue();
// GroupinfoEntity groupinfoEntity2 = new GroupinfoEntity();
// groupinfoEntity2.setGroupid(simpleDateFormat.format(new Date())+groupInfoSequenceValue2);
// groupinfoEntity2.setCyclesheetid(productionTaskListEntity.get(0).getProduction_Task_List_Id());
// groupinfoEntity2.setGroupno(accept_no);
// groupinfoEntity2.setInvalid_Count((long)0);
// groupinfoEntity2.setValid_Count((long)-1);
// groupinfoMapper.insertGroupinfoEntity(groupinfoEntity2);
/**
* 从原来的任务单中减去快证
* 即从原来任务单组号列表中插入一条-1的组号
* 更新组号信息表中的特殊证数量
*/
int groupInfoSequenceValue2 = utilMapper.findGroupInfoSequenceNextValue();
GroupinfoEntity groupinfoEntity2 = new GroupinfoEntity();
groupinfoEntity2.setGroupid(simpleDateFormat.format(new Date())+groupInfoSequenceValue2);
groupinfoEntity2.setCyclesheetid(productionTaskListEntity.get(0).getProduction_Task_List_Id());
groupinfoEntity2.setGroupno(accept_no);
groupinfoEntity2.setGrouptype((long)1);
groupinfoEntity2.setInvalid_Count((long)0);
groupinfoEntity2.setValid_Count((long)-1);
groupinfoMapper.insertGroupinfoEntity(groupinfoEntity2);
GroupinfoEntity groupinfoEntity = groupinfoEntityByAcceptNo.get(1);
groupinfoEntity.setSpecial_Card_Count(groupinfoEntity.getSpecial_Card_Count() + 1);
groupinfoMapper.updateGroupinfoEntity(groupinfoEntity);
/**
* 生成快证任务单并下发
*/
ProductionTaskListEntity productionTaskListEntityQ = new ProductionTaskListEntity();
int production_task_list_seqQ = utilMapper.findProductionTaskListSequenceNextValue();
productionTaskListEntityQ.setProduction_Task_List_Id(simpleDateFormat.format(new Date())+production_task_list_seqQ);
productionTaskListEntityQ.setProduction_Task_List_Id(simpleDateFormat.format(new Date()) + production_task_list_seqQ);
productionTaskListEntityQ.setCitycode(productionTaskListEntity.get(0).getCitycode());
productionTaskListEntityQ.setMake_Type((long)1);
productionTaskListEntityQ.setMake_Type((long) 1);
productionTaskListEntityQ.setOld_Make_Type(productionTaskListEntity.get(0).getMake_Type());
productionTaskListEntityQ.setSubmit_Date(simpleDateFormat.format(new Date()));
productionTaskListEntityQ.setHandout_Date(simpleDateFormat.format(new Date()));
productionTaskListMapper.insertProductionTaskListEntity(productionTaskListEntityQ);
// /**
// * 生成快证任务单的组号列表
// * 快证组号
// */
// int groupInfoSequenceValueQ = utilMapper.findGroupInfoSequenceNextValue();
// GroupinfoEntity groupinfoEntityQ = new GroupinfoEntity();
// groupinfoEntityQ.setGroupid(simpleDateFormat.format(new Date())+groupInfoSequenceValueQ);
// groupinfoEntityQ.setCyclesheetid(simpleDateFormat.format(new Date())+production_task_list_seqQ);
// groupinfoEntityQ.setGroupno(accept_no);
// groupinfoEntityQ.setGrouptype((long)1);
// groupinfoEntityQ.setInvalid_Count((long)0);
// groupinfoEntityQ.setValid_Count((long)1);
// groupinfoMapper.insertGroupinfoEntity(groupinfoEntityQ);
/**
* 生成快证任务单的组号列表
* 快证组号
* 生成快证任务单的受理号信息
*/
int groupInfoSequenceValueQ = utilMapper.findGroupInfoSequenceNextValue();
GroupinfoEntity groupinfoEntityQ = new GroupinfoEntity();
groupinfoEntityQ.setGroupid(simpleDateFormat.format(new Date())+groupInfoSequenceValueQ);
groupinfoEntityQ.setCyclesheetid(simpleDateFormat.format(new Date())+production_task_list_seqQ);
groupinfoEntityQ.setGroupno(accept_no);
groupinfoEntityQ.setGrouptype((long)1);
groupinfoEntityQ.setInvalid_Count((long)0);
groupinfoEntityQ.setValid_Count((long)1);
groupinfoMapper.insertGroupinfoEntity(groupinfoEntityQ);
}else {
int acceptInfoSequenceNextValue = utilMapper.findAcceptInfoSequenceNextValue();
AcceptNoInfoEntity acceptNoInfoEntity = new AcceptNoInfoEntity();
acceptNoInfoEntity.setAccept_No_Info_Id(simpleDateFormat.format(new Date()) + acceptInfoSequenceNextValue);
acceptNoInfoEntity.setAccept_No(accept_no);
//设置受理类型为快证
acceptNoInfoEntity.setAccept_Type((long) 1);
acceptNoInfoEntity.setCyclesheetid(simpleDateFormat.format(new Date()) + production_task_list_seqQ);
acceptNoInfoEntity.setGroup_No(accept_no.substring(0, 8));
acceptNoInfoMapper.saveAcceptNoInfoEntity(acceptNoInfoEntity);
} else {
// /**
// * 下发任务单 存在产生余证的情况
// *即更新组号列表的组号类型
// * 以及更新余证任务单的制证类型和原制证类型
// */
// List<GroupinfoEntity> groupinfoEntities = groupinfoMapper.findGroupinfoEntityByAcceptNo(accept_no);
// for (GroupinfoEntity groupinfoEntity:groupinfoEntities){
// /*
// 找到余证任务单 并更新制证类型和原制证类型
// */
// if (accept_no.equals(groupinfoEntity.getGroupno()) &&groupinfoEntity.getValid_Count()==1){
// /**
// * 找到余证任务单
// */
// List<ProductionTaskListEntity> productionTaskListEntities = productionTaskListMapper.findProductionTaskListEntity(groupinfoEntity.getCyclesheetid());
// for (ProductionTaskListEntity productionTaskListEntity:productionTaskListEntities){
// productionTaskListEntity.setOld_Make_Type(productionTaskListEntity.getMake_Type());
// productionTaskListEntity.setMake_Type((long)1);
// productionTaskListMapper.updateProductionTask(productionTaskListEntity);
// }
// groupinfoEntity.setGrouptype((long)1);
// groupinfoMapper.updateGroupinfoEntity(groupinfoEntity);
// }else if (accept_no.equals(groupinfoEntity.getGroupno())){
// groupinfoEntity.setGrouptype((long)1);
// groupinfoMapper.updateGroupinfoEntity(groupinfoEntity);
// }
// }
/**
* 下发任务单 存在产生余证的情况
*即更新组号列表的组号类型 以及更新余证任务单的制证类型和原制证类型
*/
List<GroupinfoEntity> groupinfoEntities = groupinfoMapper.findGroupinfoEntityByAcceptNo(accept_no);
for (GroupinfoEntity groupinfoEntity:groupinfoEntities){
/*
找到余证任务单 并更新制证类型和原制证类型
* 更新余证任务单的制证类型以及更新受理号信息的受理类型
*/
if (accept_no.equals(groupinfoEntity.getGroupno()) &&groupinfoEntity.getValid_Count()==1){
/**
* 找到余证任务单
*/
List<ProductionTaskListEntity> productionTaskListEntities = productionTaskListMapper.findProductionTaskListEntity(groupinfoEntity.getCyclesheetid());
for (ProductionTaskListEntity productionTaskListEntity:productionTaskListEntities){
List<ProductionTaskListEntity> productionTaskListEntities = productionTaskListMapper.findProductionTaskListEntity(groupinfoEntityByAcceptNo.get(0).getCyclesheetid());
for (ProductionTaskListEntity productionTaskListEntity : productionTaskListEntities) {
productionTaskListEntity.setOld_Make_Type(productionTaskListEntity.getMake_Type());
productionTaskListEntity.setMake_Type((long)1);
productionTaskListEntity.setMake_Type((long) 1);
productionTaskListMapper.updateProductionTask(productionTaskListEntity);
}
groupinfoEntity.setGrouptype((long)1);
groupinfoMapper.updateGroupinfoEntity(groupinfoEntity);
}else if (accept_no.equals(groupinfoEntity.getGroupno())){
groupinfoEntity.setGrouptype((long)1);
groupinfoMapper.updateGroupinfoEntity(groupinfoEntity);
}
for (AcceptNoInfoEntity acceptNoInfoEntity : acceptNoInfoEntityList) {
acceptNoInfoEntity.setAccept_Type((long) 1);
acceptNoInfoMapper.updateAcceptNoInfoEntity(acceptNoInfoEntity);
}
}
return 1;
......@@ -295,27 +366,29 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
/**
* 查询受理库制证信息
* 按查询处理时间
*
* @param importDate
* @return
*/
@Override
@Transactional(rollbackFor=Exception.class)
@Transactional(rollbackFor = Exception.class)
public List<Object> findAccuProductionInfo(String importDate) {
return new ArrayList<>();
}
/**
* 保持派出所照片质量详情
*
* @param policeStationVailedInfoEntities
* @return
*/
@Override
@Transactional(rollbackFor=Exception.class)
@Transactional(rollbackFor = Exception.class)
public int savePoliceStationVailedInfoEntity(List<PoliceStationVailedInfoEntity> policeStationVailedInfoEntities) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
for (PoliceStationVailedInfoEntity policeEntity:policeStationVailedInfoEntities) {
for (PoliceStationVailedInfoEntity policeEntity : policeStationVailedInfoEntities) {
int policeStationVailedSequenceNextValue = utilMapper.findPoliceStationVailedSequenceNextValue();
policeEntity.setPolice_Station_Vailed_Info_Id(simpleDateFormat.format(new Date())+policeStationVailedSequenceNextValue);
policeEntity.setPolice_Station_Vailed_Info_Id(simpleDateFormat.format(new Date()) + policeStationVailedSequenceNextValue);
policeStationVailedInfoMapper.savePoliceStationVailedInfoEntity(policeEntity);
}
return 1;
......@@ -324,11 +397,30 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
/**
* 查询任务单详情
* 通过查询任务单状态
*
* @param state
* @return
*/
@Override
public List<ProductionTaskListEntity> findProductionTaskListEntityByState(int state) {
public List<Map<String, Object>> findProductionTaskListEntityByState(int state) {
List<ProductionTaskListEntity> productionTaskListEntities = productionTaskListMapper.findProductionTaskListEntityByState(state);
List<Map<String, Object>> productionTaskMapList = new ArrayList<>();
for (ProductionTaskListEntity productionTaskListEntity : productionTaskListEntities) {
Map<String, Object> map = new HashMap<>();
map.put("productionTaskListEntity", productionTaskListEntity);
List<Map<String, Object>> groupinfoMapList = new ArrayList<>();
List<GroupinfoEntity> groupinfoEntityList = groupinfoMapper.findGroupinfoEntityListByProductionTaskListId(productionTaskListEntity.getProduction_Task_List_Id());
for (GroupinfoEntity groupinfoEntity : groupinfoEntityList) {
Map<String, Object> groupinfoMap = new HashMap<>();
groupinfoMap.put("groupinfoEntity", groupinfoEntity);
List<AcceptNoInfoEntity> acceptNoInfoEntity = acceptNoInfoMapper.findAcceptNoInfoEntityByGroupNo(groupinfoEntity.getGroupno());
groupinfoMap.put("acceptNoInfoEntity", acceptNoInfoEntity);
groupinfoMapList.add(groupinfoMap);
}
map.put("groupinfoMapList", groupinfoMapList);
productionTaskMapList.add(map);
}
return null;
......@@ -336,6 +428,7 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
/**
* 测试查询
*
* @param id
* @return
*/
......
<?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.AcceptNoInfoMapper">
<resultMap id="AcceptNoInfoMapper" type="com.yxproject.start.entity.AcceptNoInfoEntity">
<id column="ACCEPT_NO_INFO_ID" property="accept_No_Info_Id" jdbcType="VARCHAR"/>
<result column="ACCEPT_NO" property="accept_No" jdbcType="VARCHAR"/>
<result column="CYCLESHEETID" property="cyclesheetid" jdbcType="VARCHAR"/>
<result column="GROUP_NO" property="group_No" jdbcType="VARCHAR"/>
<result column="ACCEPT_TYPE" property="accept_Type" jdbcType="NUMERIC"/>
</resultMap>
<select id="findAcceptNoInfoEntityByAcceptNo" resultType="com.yxproject.start.entity.AcceptNoInfoEntity" parameterType="String">
select * from ACCEPT_NO_INFO where ACCEPT_NO =#{accept_No}
</select>
<insert id="saveAcceptNoInfoEntity" parameterType="com.yxproject.start.entity.AcceptNoInfoEntity">
INSERT INTO ACCEPT_NO_INFO (ACCEPT_NO_INFO_ID, ACCEPT_NO, CYCLESHEETID, ACCEPT_TYPE,GROUP_NO) VALUES (#{accept_No_Info_Id}, #{accept_No}, #{cyclesheetid}, #{accept_Type},#{group_No})
</insert>
<update id="updateAcceptNoInfoEntity" parameterType="com.yxproject.start.entity.AcceptNoInfoEntity">
update ACCEPT_NO_INFO
<set>
<if test="accept_No" >accept_No=#{accept_No} </if>
<if test="cyclesheetid" >cyclesheetid=#{cyclesheetid} </if>
<if test="group_No" >group_No=#{group_No} </if>
<if test="accept_Type" >accept_Type=#{accept_Type} </if>
</set>
where accept_No_Info_Id =#{accept_No_Info_Id}
</update>
<select id="findAcceptNoInfoEntityByGroupNo" resultType="com.yxproject.start.entity.AcceptNoInfoEntity" parameterType="String">
select * from ACCEPT_NO_INFO where GROUP_NO =#{group_No}
</select>
</mapper>
\ No newline at end of file
......@@ -34,6 +34,7 @@ update FAILEDINFO
<if test="print_Date" >print_Date=#{print_Date} </if>
<if test="state" >state=#{state} </if>
</set>
where failedinfoid =#{failedinfoid}
</update>
</mapper>
\ No newline at end of file
......@@ -5,9 +5,9 @@
<id column="GROUPID" property="groupid" jdbcType="VARCHAR"/>
<result column="GROUPNO" property="groupno" jdbcType="VARCHAR"/>
<result column="CYCLESHEETID" property="cyclesheetid" jdbcType="VARCHAR"/>
<result column="GROUPTYPE" property="grouptype" jdbcType="NUMERIC"/>
<result column="VAILD_COUNT" property="vaildCount" jdbcType="NUMERIC"/>
<result column="INVALID_COUNT" property="invalidCount" jdbcType="NUMERIC"/>
<result column="VAILD_COUNT" property="vaild_Count" jdbcType="NUMERIC"/>
<result column="INVALID_COUNT" property="invalid_Count" jdbcType="NUMERIC"/>
<result column="SPECIAL_CARD_COUNT" property="special_Card_Count" jdbcType="NUMERIC"/>
</resultMap>
<select id="findGroupinfoEntityListByProductionTaskListId" resultType="com.yxproject.start.entity.GroupinfoEntity" parameterType="String">
......@@ -15,32 +15,35 @@
</select>
<insert id="insertGroupinfoEntity" parameterType="com.yxproject.start.entity.GroupinfoEntity">
Insert into GROUPINFO (GROUPID,GROUPNO,CYCLESHEETID,GROUPTYPE,VAILD_COUNT,INVALID_COUNT) values
(#{groupid},#{groupno},#{grouptype},#{cyclesheetid},#{grouptype},#{vaildCount},#{invalidCount})
Insert into GROUPINFO (GROUPID,GROUPNO,CYCLESHEETID,VAILD_COUNT,INVALID_COUNT,special_Card_Count) values
(#{groupid},#{groupno},#{grouptype},#{cyclesheetid},#{vaildCount},#{invalidCount},#{special_Card_Count})
</insert>
<select id="findGroupinfoEntityByAcceptNo" resultType="com.yxproject.start.entity.GroupinfoEntity" parameterType="String">
select * from GROUPINFO where GROUPNO =#{acceptNo} or GROUPNO =substr(#{acceptNo},0,8)
select * from GROUPINFO where GROUPNO =substr(#{acceptNo},0,8)
</select>
<update id="updateGroupinfoEntity" parameterType="com.yxproject.start.entity.GroupinfoEntity">
update GROUPINFO set GROUPID=#{groupid}
<if test="groupno">,groupno =#{groupno}</if>
<if test="makeType">,MAKE_TYPE =#{makeType}</if>
<if test="cyclesheetid">,cyclesheetid =#{cyclesheetid}</if>
<if test="grouptype">,grouptype =#{grouptype}</if>
<if test="valid_Count">,valid_Count =#{valid_Count}</if>
<if test="invalid_Count">,invalid_Count =#{invalid_Count}</if>
<if test="special_Card_Count">,special_Card_Count =#{special_Card_Count}</if>
where GROUPID=#{groupid}
</update>
<select id="findCountyInfoList8_10" resultType="java.util.HashMap" parameterType="String">
select * from FINDPRODCOUNTYLIST8_10_VIEW where p_view_param.set_param(#{groupinfo10})=#{groupinfo10} AND p_view_param.set_param2(#{groupinfo8})=#{groupinfo8}
<select id="findGroupInfoCountByProductionTaskListId" parameterType="String" resultType="int">
select count(GROUPNO) from GROUPINFO where CYCLESHEETID =#{cyclesheetid}
</select>
<select id="findCountyInfoList8" resultType="java.util.HashMap" parameterType="String">
select * from FINDPRODCOUNTYLIST8_VIEW where p_view_param.set_param2(#{groupinfo8})=#{groupinfo8}
<select id="findSpecialCountyList" resultType="java.util.HashMap" parameterType="String">
SELECT * FROM TABLE(FIND_SPECIAL_COUNTY_LIST.GET_county_infos(#{cyclesheetid}))
</select>
<select id="findCountyInfoList10" resultType="java.util.HashMap" parameterType="String">
select * from FINDPRODCOUNTYLIST10_VIEW where p_view_param.set_param(#{groupinfo10})=#{groupinfo10}
<select id="findNormalCountyList" resultType="java.util.HashMap" parameterType="String">
SELECT * FROM TABLE(find_normal_county_list.GET_county_infos(#{cyclesheetid}))
</select>
</mapper>
\ No newline at end of file
......@@ -24,4 +24,5 @@
select * from PROD_CARD_T@PROD_LINK where ACCEPT_NO=#{card} or ID_NO =#{card}
</select>
</mapper>
\ No newline at end of file
......@@ -10,6 +10,12 @@
<select id="findPoliceStationVailedSequenceNextValue" resultType="int" >
select POLICE_STATION_VAILED_SEQ.nextval from dual
</select>
<select id="findFailedinfoSequenceNextValue" resultType="int">
select FAILEDINFO_SEQ.nextval from dual
</select>
<select id="findAcceptInfoSequenceNextValue" resultType="int">
select ACCEPTINFO_SEQ.nextval from dual
</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