Commit 5ff0201b authored by Administrator's avatar Administrator

修改查询受理库证件信息 (改用视图)

修改mybatis注解改为xml
添加查询任务单详情通过状态
添加查询废证详情通过状态
添加保存废证、更新废证
parent f645c760
package com.yxproject.start.SqlProvider; package com.yxproject.start.SqlProvider;
import com.alibaba.druid.sql.ast.statement.SQLForeignKeyImpl; import com.yxproject.start.entity.FailedinfoEntity;
import com.alibaba.druid.sql.visitor.functions.If;
import javafx.beans.binding.When;
import org.apache.ibatis.jdbc.SQL; import org.apache.ibatis.jdbc.SQL;
/** /**
* Created by zhangyusheng on 2018/10/23 13:52 * Created by zhangyusheng on 2018/10/23 13:52
*/ */
public class SqlProvider { public class SqlProvider {
public String findCardInfoByCardIDOrAcceptNoAtPRODSql(String card) { // public String findCardInfoByCardIDOrAcceptNoAtPRODSql(String card) {
return new SQL() { // return new SQL() {
{ // {
SELECT("*") ; // SELECT("*") ;
FROM("PROD_card_t@PROD_LINK"); // FROM("PROD_card_t@PROD_LINK");
if (card.length()==18){ // if (card.length()==18){
WHERE("id_No=#{idNo}"); // WHERE("id_No=#{idNo}");
} // }
if (card.length()==10){ // if (card.length()==10){
WHERE("PROD_card_t.accept_No=#{acceptNo}"); // WHERE("PROD_card_t.accept_No=#{acceptNo}");
} // }
//
// }
// }.toString();
// }
// public String saveFailedinfoEntity(FailedinfoEntity failedinfoEntity) {
// return new SQL() {
// {
// INSERT_INTO("FAILEDINFO");
// VALUES("failedinfoid","#{failedinfoid}");
// VALUES("failed_Reason","#{failed_Reason}");
// VALUES("groupno","#{groupno}");
// VALUES("cyclesheetid","#{cyclesheetid}");
// VALUES("state","#{state}");
// if (failedinfoEntity.getPosition_Date()!=null){
// VALUES("position_Date","#{position_Date}");
// }
// if (failedinfoEntity.getFinish_Date()!=null){
// VALUES("finish_Date","#{finish_Date}");
// }
// if (failedinfoEntity.getAllot_Date()!=null){
// VALUES("allot_Date","#{allot_Date}");
// }
// if (failedinfoEntity.getPrint_Date()!=null){
// VALUES("print_Date","#{print_Date}");
// }
// }
// }.toString();
// }
//
// public String updateFailedinfoEntity(FailedinfoEntity failedinfoEntity) {
// return new SQL() {
// {
// UPDATE("tb_employee");
// SET("failedinfoid=#{failedinfoid}");
// SET("failed_Reason=#{failed_Reason}");
// SET("groupno=#{groupno}");
// SET("cyclesheetid=#{cyclesheetid}");
// SET("state=#{state}");
// if (failedinfoEntity.getPosition_Date()!=null){
// SET("position_Date=#{position_Date}");
// }
// if (failedinfoEntity.getFinish_Date()!=null){
// SET("finish_Date=#{finish_Date}");
// }
// if (failedinfoEntity.getAllot_Date()!=null){
// SET("allot_Date=#{allot_Date}");
// }
// if (failedinfoEntity.getPrint_Date()!=null){
// SET("print_Date=#{print_Date}");
// }
// }
// }.toString();
// }
//
// public String selectFailedinfoBycolumnName(String columnName) {
// String failedinfo = new SQL() {
// {
// SELECT("*");
// FROM("failedinfo");
// WHERE("decode(#{columnName},null,0,1) =1");
//
// }
// }.toString();
// System.out.println(failedinfo+"---------------------");
// return failedinfo;
// }
}
}.toString();
}
} }
package com.yxproject.start.api; package com.yxproject.start.api;
import com.yxproject.start.entity.*; import com.yxproject.start.entity.*;
import com.yxproject.start.service.ProductionTaskListService; import com.yxproject.start.service.*;
import com.yxproject.start.service.SysPermissionService;
import com.yxproject.start.service.SysRoleService;
import com.yxproject.start.service.UserInfoService;
import com.yxproject.start.utils.YXJSONResponse; import com.yxproject.start.utils.YXJSONResponse;
import net.sf.json.JSONArray; import net.sf.json.JSONArray;
import net.sf.json.JSONObject; import net.sf.json.JSONObject;
...@@ -23,7 +20,11 @@ import org.springframework.web.bind.annotation.ResponseBody; ...@@ -23,7 +20,11 @@ import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context; import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -47,6 +48,9 @@ public class ShiroApi { ...@@ -47,6 +48,9 @@ public class ShiroApi {
@Autowired @Autowired
private SysPermissionService sysPermissionService; private SysPermissionService sysPermissionService;
@Autowired
private FailedinfoService failedinfoService;
@RequestMapping(value={"/","/index"}) @RequestMapping(value={"/","/index"})
public String index(Map<String,Object> map){ public String index(Map<String,Object> map){
System.out.println("HomeController.index()"); System.out.println("HomeController.index()");
...@@ -216,7 +220,7 @@ public class ShiroApi { ...@@ -216,7 +220,7 @@ public class ShiroApi {
@RequiresPermissions("userInfo.add")//权限管理; @RequiresPermissions("userInfo.add")//权限管理;
@ResponseBody @ResponseBody
public String updateProductionTask(@RequestParam("id") String id,@Context HttpServletResponse resp){ public String updateProductionTask(@RequestParam("id") String id,@Context HttpServletResponse resp){
String map ="{\"productionTaskListId\":\"20181016001\",\"makeType\":4,\"oldMakeType\":7}"; String map ="{\"production_Task_List_Id\":\"20181016001\",\"make_Type\":8,\"old_Make_Type\":8,} ";
JSONObject jsonObject = JSONObject.fromObject(map); JSONObject jsonObject = JSONObject.fromObject(map);
ProductionTaskListEntity productionTaskListEntity = (ProductionTaskListEntity)jsonObject.toBean(jsonObject, ProductionTaskListEntity.class); ProductionTaskListEntity productionTaskListEntity = (ProductionTaskListEntity)jsonObject.toBean(jsonObject, ProductionTaskListEntity.class);
YXJSONResponse yxjsonResponse = new YXJSONResponse(); YXJSONResponse yxjsonResponse = new YXJSONResponse();
...@@ -317,6 +321,10 @@ public class ShiroApi { ...@@ -317,6 +321,10 @@ public class ShiroApi {
return yxjsonResponse.toJSONString(); return yxjsonResponse.toJSONString();
} }
/** /**
* test * test
* @return * @return
...@@ -335,4 +343,5 @@ public class ShiroApi { ...@@ -335,4 +343,5 @@ public class ShiroApi {
} }
package com.yxproject.start.api; package com.yxproject.start.api;
import com.yxproject.start.entity.*; import com.yxproject.start.entity.*;
import com.yxproject.start.service.ProductionTaskListService; import com.yxproject.start.service.*;
import com.yxproject.start.service.SysPermissionService;
import com.yxproject.start.service.SysRoleService;
import com.yxproject.start.service.UserInfoService;
import com.yxproject.start.utils.Md5Utils; import com.yxproject.start.utils.Md5Utils;
import com.yxproject.start.utils.YXJSONResponse;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.IncorrectCredentialsException; import org.apache.shiro.authc.IncorrectCredentialsException;
import org.apache.shiro.authc.UnknownAccountException; import org.apache.shiro.authc.UnknownAccountException;
...@@ -13,8 +13,8 @@ import org.apache.shiro.authc.UsernamePasswordToken; ...@@ -13,8 +13,8 @@ import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.subject.Subject; import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -42,6 +42,9 @@ public class UserInfoApi { ...@@ -42,6 +42,9 @@ public class UserInfoApi {
@Autowired @Autowired
private ProductionTaskListService productionTaskListService; private ProductionTaskListService productionTaskListService;
@Autowired
private FailedinfoService failedinfoService;
@GET @GET
@Path("login") @Path("login")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
...@@ -383,4 +386,84 @@ public class UserInfoApi { ...@@ -383,4 +386,84 @@ public class UserInfoApi {
} }
/**
* 保存废证详情;
* @return
*/
@GET
@Path("addFailedinfo")
@Produces(MediaType.APPLICATION_JSON)
@RequiresPermissions("userInfo.add")//权限管理;
public String addFailedinfo(@RequestParam("id") String id, @Context HttpServletResponse resp){
String map ="[{\"failedinfoid\":\"20181016002\",\"failed_Reason\":1,\"groupno\":\"41108201\",\"cyclesheetid\":\"20181016001\"}]";
JSONArray jsonArray = JSONArray.fromObject(map);
List<FailedinfoEntity> failedinfoEntityList = new ArrayList<>();
for (Object object: jsonArray) {
FailedinfoEntity o = (FailedinfoEntity) JSONObject.toBean((JSONObject) object, FailedinfoEntity.class);
failedinfoEntityList.add(o);
}
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = failedinfoService.saveFailedinfo(failedinfoEntityList);
yxjsonResponse.outPutSuccess(i+"添加成功");
return yxjsonResponse.toJSONString();
}
/**
* 更新废证详情;
* @return
*/
@GET
@Path("updateFailedinfo")
@Produces(MediaType.APPLICATION_JSON)
@RequiresPermissions("userInfo.add")//权限管理;
public String updateFailedinfo(@RequestParam("id") String id, @Context HttpServletResponse resp){
String map ="[{\"failedinfoid\":\"201810302\",\"failed_Reason\":1,\"groupno\":\"411081\",\"cyclesheetid\":\"20181016001\"}]";
JSONArray jsonArray = JSONArray.fromObject(map);
List<FailedinfoEntity> failedinfoEntityList = new ArrayList<>();
for (Object object: jsonArray) {
FailedinfoEntity o = (FailedinfoEntity) JSONObject.toBean((JSONObject) object, FailedinfoEntity.class);
failedinfoEntityList.add(o);
}
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = failedinfoService.updateFailedinfo(failedinfoEntityList);
yxjsonResponse.outPutSuccess(i+"更新成功");
return yxjsonResponse.toJSONString();
}
/**
* 查询废证详情;
* @return
*/
@GET
@Path("findFailedinfo")
@Produces(MediaType.APPLICATION_JSON)
@RequiresPermissions("userInfo.add")//权限管理;
public String findFailedinfo(@RequestParam("id") String id, @Context HttpServletResponse resp){
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
List<Map<String, Object>> maps = failedinfoService.selectFailedinfo(Integer.valueOf(id));
yxjsonResponse.outPutSuccess(maps+"------添加成功---"+maps.size());
return yxjsonResponse.toJSONString();
}
/**
* 查询任务单详情;
* @return
*/
@GET
@Path("findProductionTaskListByState")
@Produces(MediaType.APPLICATION_JSON)
@RequiresPermissions("userInfo.add")//权限管理;
public String findProductionTaskListByState(@RequestParam("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);
return yxjsonResponse.toJSONString();
}
} }
package com.yxproject.start.entity;
import javax.persistence.*;
import java.util.Objects;
/**
* Created by zhangyusheng on 2018/10/30 9:02
*/
@Entity
@Table(name = "FAILEDINFO", schema = "DAHAI", catalog = "")
public class FailedinfoEntity {
private String failedinfoid;
private long failed_Reason;
private String groupno;
private String cyclesheetid;
private String position_Date;
private String finish_Date;
private String allot_Date;
private String print_Date;
private long state;
@Id
@Column(name = "FAILEDINFOID", nullable = false, length = 20)
public String getFailedinfoid() {
return failedinfoid;
}
public void setFailedinfoid(String failedinfoid) {
this.failedinfoid = failedinfoid;
}
@Basic
@Column(name = "FAILED_REASON", nullable = true, precision = 0)
public long getFailed_Reason() {
return failed_Reason;
}
public void setFailed_Reason(long failed_Reason) {
this.failed_Reason = failed_Reason;
}
@Basic
@Column(name = "GROUPNO", nullable = true, length = 20)
public String getGroupno() {
return groupno;
}
public void setGroupno(String groupno) {
this.groupno = groupno;
}
@Basic
@Column(name = "CYCLESHEETID", nullable = true, length = 20)
public String getCyclesheetid() {
return cyclesheetid;
}
public void setCyclesheetid(String cyclesheetid) {
this.cyclesheetid = cyclesheetid;
}
@Basic
@Column(name = "POSITION_DATE", nullable = true, length = 20)
public String getPosition_Date() {
return position_Date;
}
public void setPosition_Date(String position_Date) {
this.position_Date = position_Date;
}
@Basic
@Column(name = "FINISH_DATE", nullable = true, length = 20)
public String getFinish_Date() {
return finish_Date;
}
public void setFinish_Date(String finish_Date) {
this.finish_Date = finish_Date;
}
@Basic
@Column(name = "ALLOT_DATE", nullable = true, length = 20)
public String getAllot_Date() {
return allot_Date;
}
public void setAllot_Date(String allot_Date) {
this.allot_Date = allot_Date;
}
@Basic
@Column(name = "PRINT_DATE", nullable = true, length = 20)
public String getPrint_Date() {
return print_Date;
}
public void setPrint_Date(String print_Date) {
this.print_Date = print_Date;
}
@Basic
@Column(name = "STATE", nullable = false, precision = 0)
public long getState() {
return state;
}
public void setState(long state) {
this.state = state;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
FailedinfoEntity that = (FailedinfoEntity) o;
return Objects.equals(failedinfoid, that.failedinfoid) &&
Objects.equals(failed_Reason, that.failed_Reason) &&
Objects.equals(groupno, that.groupno) &&
Objects.equals(cyclesheetid, that.cyclesheetid) &&
Objects.equals(position_Date, that.position_Date) &&
Objects.equals(allot_Date, that.allot_Date) &&
Objects.equals(print_Date, that.print_Date) &&
Objects.equals(state, that.state) &&
Objects.equals(finish_Date, that.finish_Date);
}
@Override
public int hashCode() {
return Objects.hash(failedinfoid,failed_Reason, groupno,cyclesheetid, position_Date, finish_Date,allot_Date,print_Date,state);
}
}
...@@ -6,7 +6,7 @@ import java.util.Objects; ...@@ -6,7 +6,7 @@ import java.util.Objects;
@Entity @Entity
@Table(name = "PRODUCTION_TASK_LIST", schema = "DAHAI", catalog = "") @Table(name = "PRODUCTION_TASK_LIST", schema = "DAHAI", catalog = "")
public class ProductionTaskListEntity { public class ProductionTaskListEntity {
private String production_TaskList_Id; private String production_Task_List_Id;
private long make_Type; private long make_Type;
private Long old_Make_Type; private Long old_Make_Type;
private String workshop; private String workshop;
...@@ -23,15 +23,18 @@ public class ProductionTaskListEntity { ...@@ -23,15 +23,18 @@ public class ProductionTaskListEntity {
private String exception_Information; private String exception_Information;
private String outbound_Date; private String outbound_Date;
private String putinstorage_Date; private String putinstorage_Date;
private Long state;
@Id @Id
@Column(name = "PRODUCTION_TASK_LIST_ID", nullable = false, length = 20) @Column(name = "PRODUCTION_TASK_LIST_ID", nullable = false, length = 20)
public String getProduction_TaskList_Id() { public String getProduction_Task_List_Id() {
return production_TaskList_Id; return production_Task_List_Id;
} }
public void setProduction_TaskList_Id(String production_TaskList_Id) { public void setProduction_Task_List_Id(String production_Task_List_Id) {
this.production_TaskList_Id = production_TaskList_Id; this.production_Task_List_Id = production_Task_List_Id;
} }
@Basic @Basic
@Column(name = "MAKE_TYPE", nullable = false, precision = 0) @Column(name = "MAKE_TYPE", nullable = false, precision = 0)
public long getMake_Type() { public long getMake_Type() {
...@@ -41,6 +44,7 @@ public class ProductionTaskListEntity { ...@@ -41,6 +44,7 @@ public class ProductionTaskListEntity {
public void setMake_Type(long make_Type) { public void setMake_Type(long make_Type) {
this.make_Type = make_Type; this.make_Type = make_Type;
} }
@Basic @Basic
@Column(name = "OLD_MAKE_TYPE", nullable = true, precision = 0) @Column(name = "OLD_MAKE_TYPE", nullable = true, precision = 0)
public Long getOld_Make_Type() { public Long getOld_Make_Type() {
...@@ -50,6 +54,7 @@ public class ProductionTaskListEntity { ...@@ -50,6 +54,7 @@ public class ProductionTaskListEntity {
public void setOld_Make_Type(Long old_Make_Type) { public void setOld_Make_Type(Long old_Make_Type) {
this.old_Make_Type = old_Make_Type; this.old_Make_Type = old_Make_Type;
} }
@Basic @Basic
@Column(name = "CITYCODE",nullable = true, length = 8) @Column(name = "CITYCODE",nullable = true, length = 8)
public String getCitycode() { public String getCitycode() {
...@@ -60,7 +65,6 @@ public class ProductionTaskListEntity { ...@@ -60,7 +65,6 @@ public class ProductionTaskListEntity {
this.citycode = citycode; this.citycode = citycode;
} }
@Basic @Basic
@Column(name = "WORKSHOP", nullable = true, length = 2) @Column(name = "WORKSHOP", nullable = true, length = 2)
public String getWorkshop() { public String getWorkshop() {
...@@ -70,6 +74,7 @@ public class ProductionTaskListEntity { ...@@ -70,6 +74,7 @@ public class ProductionTaskListEntity {
public void setWorkshop(String workshop) { public void setWorkshop(String workshop) {
this.workshop = workshop; this.workshop = workshop;
} }
@Basic @Basic
@Column(name = "SUBMIT_DATE", nullable = true, length = 8) @Column(name = "SUBMIT_DATE", nullable = true, length = 8)
public String getSubmit_Date() { public String getSubmit_Date() {
...@@ -79,6 +84,7 @@ public class ProductionTaskListEntity { ...@@ -79,6 +84,7 @@ public class ProductionTaskListEntity {
public void setSubmit_Date(String submit_Date) { public void setSubmit_Date(String submit_Date) {
this.submit_Date = submit_Date; this.submit_Date = submit_Date;
} }
@Basic @Basic
@Column(name = "HANDOUT_DATE", nullable = true, length = 8) @Column(name = "HANDOUT_DATE", nullable = true, length = 8)
public String getHandout_Date() { public String getHandout_Date() {
...@@ -88,6 +94,7 @@ public class ProductionTaskListEntity { ...@@ -88,6 +94,7 @@ public class ProductionTaskListEntity {
public void setHandout_Date(String handout_Date) { public void setHandout_Date(String handout_Date) {
this.handout_Date = handout_Date; this.handout_Date = handout_Date;
} }
@Basic @Basic
@Column(name = "IS_PRINT", nullable = true, precision = 0) @Column(name = "IS_PRINT", nullable = true, precision = 0)
public Long getIs_Print() { public Long getIs_Print() {
...@@ -97,6 +104,7 @@ public class ProductionTaskListEntity { ...@@ -97,6 +104,7 @@ public class ProductionTaskListEntity {
public void setIs_Print(Long is_Print) { public void setIs_Print(Long is_Print) {
this.is_Print = is_Print; this.is_Print = is_Print;
} }
@Basic @Basic
@Column(name = "DOWNLOAD_DATE", nullable = true, length = 8) @Column(name = "DOWNLOAD_DATE", nullable = true, length = 8)
public String getDownload_Date() { public String getDownload_Date() {
...@@ -106,6 +114,7 @@ public class ProductionTaskListEntity { ...@@ -106,6 +114,7 @@ public class ProductionTaskListEntity {
public void setDownload_Date(String download_Date) { public void setDownload_Date(String download_Date) {
this.download_Date = download_Date; this.download_Date = download_Date;
} }
@Basic @Basic
@Column(name = "PRINT_OUT", nullable = true, length = 8) @Column(name = "PRINT_OUT", nullable = true, length = 8)
public String getPrint_Out() { public String getPrint_Out() {
...@@ -115,6 +124,7 @@ public class ProductionTaskListEntity { ...@@ -115,6 +124,7 @@ public class ProductionTaskListEntity {
public void setPrint_Out(String print_Out) { public void setPrint_Out(String print_Out) {
this.print_Out = print_Out; this.print_Out = print_Out;
} }
@Basic @Basic
@Column(name = "PERMANENT_POSITION_DATE", nullable = true, length = 8) @Column(name = "PERMANENT_POSITION_DATE", nullable = true, length = 8)
public String getPermanent_Position_Date() { public String getPermanent_Position_Date() {
...@@ -124,6 +134,7 @@ public class ProductionTaskListEntity { ...@@ -124,6 +134,7 @@ public class ProductionTaskListEntity {
public void setPermanent_Position_Date(String permanent_Position_Date) { public void setPermanent_Position_Date(String permanent_Position_Date) {
this.permanent_Position_Date = permanent_Position_Date; this.permanent_Position_Date = permanent_Position_Date;
} }
@Basic @Basic
@Column(name = "ROLL_OUT_WORKSHOP_DATE", nullable = true, length = 8) @Column(name = "ROLL_OUT_WORKSHOP_DATE", nullable = true, length = 8)
public String getRoll_Out_Workshop_Date() { public String getRoll_Out_Workshop_Date() {
...@@ -133,6 +144,7 @@ public class ProductionTaskListEntity { ...@@ -133,6 +144,7 @@ public class ProductionTaskListEntity {
public void setRoll_Out_Workshop_Date(String roll_Out_Workshop_Date) { public void setRoll_Out_Workshop_Date(String roll_Out_Workshop_Date) {
this.roll_Out_Workshop_Date = roll_Out_Workshop_Date; this.roll_Out_Workshop_Date = roll_Out_Workshop_Date;
} }
@Basic @Basic
@Column(name = "QUALITYINSPECTION_NAME", nullable = true, length = 20) @Column(name = "QUALITYINSPECTION_NAME", nullable = true, length = 20)
public String getQualityinspection_Name() { public String getQualityinspection_Name() {
...@@ -142,6 +154,7 @@ public class ProductionTaskListEntity { ...@@ -142,6 +154,7 @@ public class ProductionTaskListEntity {
public void setQualityinspection_Name(String qualityinspection_Name) { public void setQualityinspection_Name(String qualityinspection_Name) {
this.qualityinspection_Name = qualityinspection_Name; this.qualityinspection_Name = qualityinspection_Name;
} }
@Basic @Basic
@Column(name = "QUALITYINSPECTION_DATE", nullable = true, length = 8) @Column(name = "QUALITYINSPECTION_DATE", nullable = true, length = 8)
public String getQualityinspection_Date() { public String getQualityinspection_Date() {
...@@ -151,6 +164,7 @@ public class ProductionTaskListEntity { ...@@ -151,6 +164,7 @@ public class ProductionTaskListEntity {
public void setQualityinspection_Date(String qualityinspection_Date) { public void setQualityinspection_Date(String qualityinspection_Date) {
this.qualityinspection_Date = qualityinspection_Date; this.qualityinspection_Date = qualityinspection_Date;
} }
@Basic @Basic
@Column(name = "EXCEPTION_INFORMATION", nullable = true, length = 120) @Column(name = "EXCEPTION_INFORMATION", nullable = true, length = 120)
public String getException_Information() { public String getException_Information() {
...@@ -160,6 +174,7 @@ public class ProductionTaskListEntity { ...@@ -160,6 +174,7 @@ public class ProductionTaskListEntity {
public void setException_Information(String exception_Information) { public void setException_Information(String exception_Information) {
this.exception_Information = exception_Information; this.exception_Information = exception_Information;
} }
@Basic @Basic
@Column(name = "OUTBOUND_DATE", nullable = true, length = 8) @Column(name = "OUTBOUND_DATE", nullable = true, length = 8)
public String getOutbound_Date() { public String getOutbound_Date() {
...@@ -169,6 +184,7 @@ public class ProductionTaskListEntity { ...@@ -169,6 +184,7 @@ public class ProductionTaskListEntity {
public void setOutbound_Date(String outbound_Date) { public void setOutbound_Date(String outbound_Date) {
this.outbound_Date = outbound_Date; this.outbound_Date = outbound_Date;
} }
@Basic @Basic
@Column(name = "PUTINSTORAGE_DATE", nullable = true, length = 8) @Column(name = "PUTINSTORAGE_DATE", nullable = true, length = 8)
public String getPutinstorage_Date() { public String getPutinstorage_Date() {
...@@ -178,14 +194,22 @@ public class ProductionTaskListEntity { ...@@ -178,14 +194,22 @@ public class ProductionTaskListEntity {
public void setPutinstorage_Date(String putinstorage_Date) { public void setPutinstorage_Date(String putinstorage_Date) {
this.putinstorage_Date = putinstorage_Date; this.putinstorage_Date = putinstorage_Date;
} }
@Basic
@Column(name = "STATE", nullable = true, precision = 0)
public Long getState() {
return state;
}
public void setState(Long state) {
this.state = state;
}
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) return true; if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false; if (o == null || getClass() != o.getClass()) return false;
ProductionTaskListEntity that = (ProductionTaskListEntity) o; ProductionTaskListEntity that = (ProductionTaskListEntity) o;
return make_Type == that.make_Type && return make_Type == that.make_Type &&
Objects.equals(production_TaskList_Id, that.production_TaskList_Id) && Objects.equals(production_Task_List_Id, that.production_Task_List_Id) &&
Objects.equals(old_Make_Type, that.old_Make_Type) && Objects.equals(old_Make_Type, that.old_Make_Type) &&
Objects.equals(citycode, that.citycode) && Objects.equals(citycode, that.citycode) &&
Objects.equals(workshop, that.workshop) && Objects.equals(workshop, that.workshop) &&
...@@ -200,11 +224,15 @@ public class ProductionTaskListEntity { ...@@ -200,11 +224,15 @@ public class ProductionTaskListEntity {
Objects.equals(qualityinspection_Date, that.qualityinspection_Date) && Objects.equals(qualityinspection_Date, that.qualityinspection_Date) &&
Objects.equals(exception_Information, that.exception_Information) && Objects.equals(exception_Information, that.exception_Information) &&
Objects.equals(outbound_Date, that.outbound_Date) && Objects.equals(outbound_Date, that.outbound_Date) &&
Objects.equals(state, that.state) &&
Objects.equals(putinstorage_Date, that.putinstorage_Date); Objects.equals(putinstorage_Date, that.putinstorage_Date);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(production_TaskList_Id, make_Type, old_Make_Type, citycode,workshop, submit_Date, handout_Date, is_Print, download_Date, print_Out, permanent_Position_Date, roll_Out_Workshop_Date, qualityinspection_Name, qualityinspection_Date, exception_Information, outbound_Date, putinstorage_Date); return Objects.hash(production_Task_List_Id, make_Type, old_Make_Type, citycode,workshop, submit_Date, handout_Date, is_Print, download_Date, print_Out, permanent_Position_Date, roll_Out_Workshop_Date, qualityinspection_Name, qualityinspection_Date, exception_Information, outbound_Date, putinstorage_Date,state);
} }
} }
package com.yxproject.start.entity.accu;
/**
* Created by zhangyusheng on 2018/10/31 15:12
*/
public class AccCardInfoEntity {
}
package com.yxproject.start.mapper;
import com.yxproject.start.entity.FailedinfoEntity;
import com.yxproject.start.entity.UserInfo;
import org.apache.ibatis.annotations.*;
import java.util.List;
import java.util.Map;
/**
* Created by zhangyusheng on 2018/10/30 9:42
*/
@Mapper
public interface FailedinfoMapper {
/**
* 新增废证
* @param failedinfoEntity
* @return
*/
// @InsertProvider(type=com.yxproject.start.SqlProvider.SqlProvider.class,method="saveFailedinfoEntity")
//// @Options(useGeneratedKeys=true,keyProperty="failedinfoid")
public void saveFailedinfoEntity(FailedinfoEntity failedinfoEntity);
/**
* 更新废证
* @param failedinfoEntity
*/
// @UpdateProvider(type=com.yxproject.start.SqlProvider.SqlProvider.class,method="updateFailedinfoEntity")
public void updateFailedinfoEntity(FailedinfoEntity failedinfoEntity);
/**
* 查询废证详情
* @return
*/
// @SelectProvider(type=com.yxproject.start.SqlProvider.SqlProvider.class,method="selectFailedinfoBycolumnName")
public List<Map<String,Object>> selectFailedinfoByState(int state);
}
...@@ -12,7 +12,7 @@ import java.util.List; ...@@ -12,7 +12,7 @@ import java.util.List;
*/ */
@Mapper @Mapper
public interface ProdCardTMapper { public interface ProdCardTMapper {
@SelectProvider(type=com.yxproject.start.SqlProvider.SqlProvider.class,method="findCardInfoByCardIDOrAcceptNoAtPRODSql") // @SelectProvider(type=com.yxproject.start.SqlProvider.SqlProvider.class,method="findCardInfoByCardIDOrAcceptNoAtPRODSql")
List<ProdCardTEntity> findCardInfo(String card); List<ProdCardTEntity> findCardInfo(String card);
} }
...@@ -17,5 +17,6 @@ public interface ProductionTaskListMapper { ...@@ -17,5 +17,6 @@ public interface ProductionTaskListMapper {
public int insertProductionTaskListEntity(ProductionTaskListEntity productionTaskListEntity); public int insertProductionTaskListEntity(ProductionTaskListEntity productionTaskListEntity);
public int updateProductionTask(ProductionTaskListEntity productionTaskListEntity); public int updateProductionTask(ProductionTaskListEntity productionTaskListEntity);
public List<ProductionTaskListEntity> findProductionTaskListEntityByAcceptNo(String acceptNo); public List<ProductionTaskListEntity> findProductionTaskListEntityByAcceptNo(String acceptNo);
public List<ProductionTaskListEntity> findProductionTaskListEntityByState(int state);
} }
package com.yxproject.start.mapper; package com.yxproject.start.mapper;
import com.yxproject.start.entity.UserInfo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select;
/** /**
* @author zhangyusheng * @author zhangyusheng
...@@ -21,4 +20,9 @@ public interface UtilMapper { ...@@ -21,4 +20,9 @@ public interface UtilMapper {
* 查询派出所照片质量表序列值 * 查询派出所照片质量表序列值
*/ */
public int findPoliceStationVailedSequenceNextValue(); public int findPoliceStationVailedSequenceNextValue();
/**
* 查询废证信息表序列值
*/
@Select(" select FAILEDINFO_SEQ.nextval from dual")
public int findFailedinfoSequenceNextValue();
} }
package com.yxproject.start.service;
import com.yxproject.start.entity.FailedinfoEntity;
import java.util.List;
import java.util.Map;
/**
* Created by zhangyusheng on 2018/10/30 10:01
*/
public interface FailedinfoService {
public int saveFailedinfo(List<FailedinfoEntity> failedinfoEntityList);
public int updateFailedinfo(List<FailedinfoEntity> failedinfoEntityList);
public List<Map<String,Object>> selectFailedinfo(int state);
}
...@@ -18,5 +18,7 @@ public interface ProductionTaskListService { ...@@ -18,5 +18,7 @@ public interface ProductionTaskListService {
public int savePoliceStationVailedInfoEntity(List<PoliceStationVailedInfoEntity> policeStationVailedInfoEntities); public int savePoliceStationVailedInfoEntity(List<PoliceStationVailedInfoEntity> policeStationVailedInfoEntities);
public List<PoliceStationVailedInfoEntity> find(String id); public List<PoliceStationVailedInfoEntity> find(String id);
public List<ProductionTaskListEntity> findProductionTaskListEntityByState(int state);
} }
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.FailedinfoEntity;
import com.yxproject.start.mapper.FailedinfoMapper;
import com.yxproject.start.mapper.UtilMapper;
import com.yxproject.start.service.FailedinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* Created by zhangyusheng on 2018/10/30 10:02
*/
@Service
public class FailedinfoServiceImpl implements FailedinfoService {
@Autowired
private UtilMapper utilMapper;
@Autowired
private FailedinfoMapper failedinfoMapper;
@Override
public int saveFailedinfo(List<FailedinfoEntity> failedinfoEntityList) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
for (FailedinfoEntity failedinfoEntity:failedinfoEntityList){
int failedinfoSequenceNextValue = utilMapper.findFailedinfoSequenceNextValue();
failedinfoEntity.setFailedinfoid(simpleDateFormat.format(new Date())+failedinfoSequenceNextValue);
failedinfoMapper.saveFailedinfoEntity(failedinfoEntity);
}
return 1;
}
@Override
public int updateFailedinfo(List<FailedinfoEntity> failedinfoEntityList) {
for (FailedinfoEntity failedinfoEntity:failedinfoEntityList){
failedinfoMapper.updateFailedinfoEntity(failedinfoEntity);
}
return 1;
}
@Override
public List<Map<String,Object>> selectFailedinfo(int state) {
List<Map<String, Object>> maps = failedinfoMapper.selectFailedinfoByState(state);
return maps;
}
}
...@@ -61,6 +61,7 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService ...@@ -61,6 +61,7 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
*/ */
@Override @Override
public int updateProductionTask(ProductionTaskListEntity productionTaskListEntity) { public int updateProductionTask(ProductionTaskListEntity productionTaskListEntity) {
//todo 状态更新时间
return productionTaskListMapper.updateProductionTask(productionTaskListEntity); return productionTaskListMapper.updateProductionTask(productionTaskListEntity);
} }
...@@ -78,7 +79,7 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService ...@@ -78,7 +79,7 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
int production_task_list_seq = utilMapper.findProductionTaskListSequenceNextValue(); int production_task_list_seq = utilMapper.findProductionTaskListSequenceNextValue();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
productionTaskListEntity.setProduction_TaskList_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); productionTaskListMapper.insertProductionTaskListEntity(productionTaskListEntity);
for (GroupinfoEntity groupinfoEntity:groupinfoEntities) { for (GroupinfoEntity groupinfoEntity:groupinfoEntities) {
int groupInfoSequenceValue = utilMapper.findGroupInfoSequenceNextValue(); int groupInfoSequenceValue = utilMapper.findGroupInfoSequenceNextValue();
...@@ -163,7 +164,7 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService ...@@ -163,7 +164,7 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
ProductionTaskListEntity productionTaskListEntity = new ProductionTaskListEntity(); ProductionTaskListEntity productionTaskListEntity = new ProductionTaskListEntity();
int production_task_list_seq = utilMapper.findProductionTaskListSequenceNextValue(); int production_task_list_seq = utilMapper.findProductionTaskListSequenceNextValue();
productionTaskListEntity.setProduction_TaskList_Id(simpleDateFormat.format(new Date())+production_task_list_seq); productionTaskListEntity.setProduction_Task_List_Id(simpleDateFormat.format(new Date())+production_task_list_seq);
productionTaskListEntity.setCitycode(original_no.toString().substring(0,6)); productionTaskListEntity.setCitycode(original_no.toString().substring(0,6));
productionTaskListEntity.setMake_Type(Long.valueOf(original_no.toString().substring(20,21))); productionTaskListEntity.setMake_Type(Long.valueOf(original_no.toString().substring(20,21)));
productionTaskListEntity.setSubmit_Date(simpleDateFormat.format(new Date())); productionTaskListEntity.setSubmit_Date(simpleDateFormat.format(new Date()));
...@@ -195,7 +196,7 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService ...@@ -195,7 +196,7 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
*/ */
ProductionTaskListEntity productionTaskListEntityQ = new ProductionTaskListEntity(); ProductionTaskListEntity productionTaskListEntityQ = new ProductionTaskListEntity();
int production_task_list_seqQ = utilMapper.findProductionTaskListSequenceNextValue(); int production_task_list_seqQ = utilMapper.findProductionTaskListSequenceNextValue();
productionTaskListEntityQ.setProduction_TaskList_Id(simpleDateFormat.format(new Date())+production_task_list_seqQ); productionTaskListEntityQ.setProduction_Task_List_Id(simpleDateFormat.format(new Date())+production_task_list_seqQ);
productionTaskListEntityQ.setCitycode(original_no.toString().substring(0,6)); productionTaskListEntityQ.setCitycode(original_no.toString().substring(0,6));
productionTaskListEntityQ.setMake_Type((long)1); productionTaskListEntityQ.setMake_Type((long)1);
productionTaskListEntityQ.setOld_Make_Type(Long.valueOf(original_no.toString().substring(20,21))); productionTaskListEntityQ.setOld_Make_Type(Long.valueOf(original_no.toString().substring(20,21)));
...@@ -229,7 +230,7 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService ...@@ -229,7 +230,7 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
int groupInfoSequenceValue2 = utilMapper.findGroupInfoSequenceNextValue(); int groupInfoSequenceValue2 = utilMapper.findGroupInfoSequenceNextValue();
GroupinfoEntity groupinfoEntity2 = new GroupinfoEntity(); GroupinfoEntity groupinfoEntity2 = new GroupinfoEntity();
groupinfoEntity2.setGroupid(simpleDateFormat.format(new Date())+groupInfoSequenceValue2); groupinfoEntity2.setGroupid(simpleDateFormat.format(new Date())+groupInfoSequenceValue2);
groupinfoEntity2.setCyclesheetid(productionTaskListEntity.get(0).getProduction_TaskList_Id()); groupinfoEntity2.setCyclesheetid(productionTaskListEntity.get(0).getProduction_Task_List_Id());
groupinfoEntity2.setGroupno(accept_no); groupinfoEntity2.setGroupno(accept_no);
groupinfoEntity2.setGrouptype((long)1); groupinfoEntity2.setGrouptype((long)1);
groupinfoEntity2.setInvalid_Count((long)0); groupinfoEntity2.setInvalid_Count((long)0);
...@@ -240,7 +241,7 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService ...@@ -240,7 +241,7 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
*/ */
ProductionTaskListEntity productionTaskListEntityQ = new ProductionTaskListEntity(); ProductionTaskListEntity productionTaskListEntityQ = new ProductionTaskListEntity();
int production_task_list_seqQ = utilMapper.findProductionTaskListSequenceNextValue(); int production_task_list_seqQ = utilMapper.findProductionTaskListSequenceNextValue();
productionTaskListEntityQ.setProduction_TaskList_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.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.setOld_Make_Type(productionTaskListEntity.get(0).getMake_Type());
...@@ -320,6 +321,19 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService ...@@ -320,6 +321,19 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
return 1; return 1;
} }
/**
* 查询任务单详情
* 通过查询任务单状态
* @param state
* @return
*/
@Override
public List<ProductionTaskListEntity> findProductionTaskListEntityByState(int state) {
return null;
}
/** /**
* 测试查询 * 测试查询
* @param id * @param id
......
...@@ -26,20 +26,15 @@ ...@@ -26,20 +26,15 @@
</select> </select>
<select id="findAccGroupTEntityByCardIdOrDealDate" resultType="java.util.HashMap" parameterType="String"> <select id="findAccGroupTEntityByCardIdOrDealDate" resultType="java.util.HashMap" parameterType="String">
SELECT ACC_GROUP_T.GROUP_NO,ACC_GROUP_RELATION_T.DEAL_DATE,ACC_GROUP_T.DEAL_FLAG,substr(ACC_GROUP_RELATION_T.ORIGINAL_NO,0,6),CITYINFO.CITYNAME,decode(substr(ACC_GROUP_RELATION_T.ORIGINAL_NO,0,6),'419900',6,substr(ACC_GROUP_RELATION_T.ORIGINAL_NO,21,1)),MAKETYPE_DIC.CARDTYPE,ACC_GROUP_T.INVALID_COUNT,ACC_GROUP_T.VALID_COUNT select * from findAccGroupTEntityList_view where view_param.set_param(#{dealDate})=#{dealDate}
FROM ACC_GROUP_T@ACCU_DBLINK LEFT join ACC_GROUP_RELATION_T@ACCU_DBLINK on ACC_GROUP_T.GROUP_NO = ACC_GROUP_RELATION_T.GROUP_NO
left join CITYINFO on CITYINFO.CITYCODE = substr(ACC_GROUP_RELATION_T.ORIGINAL_NO,0,6)
left join MAKETYPE_DIC on MAKETYPE_DIC.TYPENUM = decode(substr(ACC_GROUP_RELATION_T.ORIGINAL_NO,0,6),'419900',6,substr(ACC_GROUP_RELATION_T.ORIGINAL_NO,21,1))
where to_char(ACC_GROUP_T.import_time,'yymmdd') =#{dealDate}
and ACC_GROUP_T.group_no not in (select groupinfo.groupno from groupinfo)
</select> </select>
<select id="findAccGroupTEntityByCardIdOrAcceptNo" resultType="java.util.HashMap" parameterType="String"> <select id="findAccGroupTEntityByCardIdOrAcceptNo" resultType="java.util.HashMap" parameterType="String">
select * from acc_card_t@accu_dblink left join acc_group_t@accu_dblink on acc_group_t.group_no=substr(acc_card_t.accept_no,0,8) select * from FINDACCGROUPT_VIEW where view_param.set_param(#{acceptNo})=#{acceptNo}
left join acc_group_relation_t@accu_dblink on acc_group_t.group_no = acc_group_relation_t.group_no
where accept_no =#{accept_no} or id_no=#{accept_no}
</select> </select>
</mapper> </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.FailedinfoMapper">
<resultMap id="FailedinfoMapper" type="com.yxproject.start.entity.FailedinfoEntity">
<id column="FAILEDINFOID" property="failedinfoid" jdbcType="VARCHAR"/>
<result column="FAILED_REASON" property="failed_Reason" jdbcType="NUMERIC"/>
<result column="GROUPNO" property="groupno" jdbcType="VARCHAR"/>
<result column="CYCLESHEETID" property="cyclesheetid" jdbcType="VARCHAR"/>
<result column="POSITION_DATE" property="position_Date" jdbcType="VARCHAR"/>
<result column="FINISH_DATE" property="finish_Date" jdbcType="VARCHAR"/>
<result column="ALLOT_DATE" property="allot_Date" jdbcType="VARCHAR"/>
<result column="PRINT_DATE" property="print_Date" jdbcType="VARCHAR"/>
<result column="STATE" property="state" jdbcType="NUMERIC"/>
</resultMap>
<select id="selectFailedinfoByState" resultType="java.util.HashMap" parameterType="java.lang.Integer">
select * from failedinfo where state = #{state}
</select>
<insert id="saveFailedinfoEntity" parameterType="com.yxproject.start.entity.FailedinfoEntity" >
insert into FAILEDINFO (FAILEDINFOID,FAILED_REASON,GROUPNO,CYCLESHEETID,POSITION_DATE,FINISH_DATE,ALLOT_DATE,PRINT_DATE,STATE )
values (#{failedinfoid},#{failed_Reason},#{groupno},#{cyclesheetid},#{position_Date},#{finish_Date},#{allot_Date},#{print_Date},#{state})
</insert>
<update id="updateFailedinfoEntity" parameterType="com.yxproject.start.entity.FailedinfoEntity">
update FAILEDINFO
<set>
<if test="failed_Reason" >FAILED_REASON=#{failed_Reason} </if>
<if test="groupno" >GROUPNO=#{groupno} </if>
<if test="cyclesheetid" >cyclesheetid=#{cyclesheetid} </if>
<if test="position_Date" >position_Date=#{position_Date} </if>
<if test="finish_Date" >finish_Date=#{finish_Date} </if>
<if test="allot_Date" >allot_Date=#{allot_Date} </if>
<if test="print_Date" >print_Date=#{print_Date} </if>
<if test="state" >state=#{state} </if>
</set>
</update>
</mapper>
\ No newline at end of file
...@@ -16,19 +16,7 @@ ...@@ -16,19 +16,7 @@
<insert id="insertGroupinfoEntity" parameterType="com.yxproject.start.entity.GroupinfoEntity"> <insert id="insertGroupinfoEntity" parameterType="com.yxproject.start.entity.GroupinfoEntity">
Insert into GROUPINFO (GROUPID,GROUPNO,CYCLESHEETID,GROUPTYPE,VAILD_COUNT,INVALID_COUNT) values Insert into GROUPINFO (GROUPID,GROUPNO,CYCLESHEETID,GROUPTYPE,VAILD_COUNT,INVALID_COUNT) values
(#{groupid} (#{groupid},#{groupno},#{grouptype},#{cyclesheetid},#{grouptype},#{vaildCount},#{invalidCount})
<if test=" groupno!= null">,#{groupno}</if>
<if test="groupno == null">,null </if>
<if test="grouptype != null">,#{grouptype}</if>
<if test="grouptype == null">,null </if>
<if test="cyclesheetid != null">,#{cyclesheetid}</if>
<if test="cyclesheetid == null">,null </if>
<if test="grouptype != null">,#{grouptype}</if>
<if test="grouptype == null">,null </if>
<if test="vaildCount != null">,#{vaildCount}</if>
<if test="vaildCount == null">,null </if>
<if test="invalidCount != null">,#{invalidCount}</if>
<if test="invalidCount == null">,null </if>)
</insert> </insert>
<select id="findGroupinfoEntityByAcceptNo" resultType="com.yxproject.start.entity.GroupinfoEntity" parameterType="String"> <select id="findGroupinfoEntityByAcceptNo" resultType="com.yxproject.start.entity.GroupinfoEntity" parameterType="String">
...@@ -37,12 +25,12 @@ ...@@ -37,12 +25,12 @@
<update id="updateGroupinfoEntity" parameterType="com.yxproject.start.entity.GroupinfoEntity"> <update id="updateGroupinfoEntity" parameterType="com.yxproject.start.entity.GroupinfoEntity">
update GROUPINFO set GROUPID=#{groupid} update GROUPINFO set GROUPID=#{groupid}
<if test="groupno != null">,groupno =#{groupno}</if> <if test="groupno">,groupno =#{groupno}</if>
<if test="makeType != null">,MAKE_TYPE =#{makeType}</if> <if test="makeType">,MAKE_TYPE =#{makeType}</if>
<if test="cyclesheetid != null">,cyclesheetid =#{cyclesheetid}</if> <if test="cyclesheetid">,cyclesheetid =#{cyclesheetid}</if>
<if test="grouptype != null">,grouptype =#{grouptype}</if> <if test="grouptype">,grouptype =#{grouptype}</if>
<if test="valid_Count != null">,valid_Count =#{valid_Count}</if> <if test="valid_Count">,valid_Count =#{valid_Count}</if>
<if test="invalid_Count != null">,invalid_Count =#{invalid_Count}</if> <if test="invalid_Count">,invalid_Count =#{invalid_Count}</if>
where GROUPID=#{groupid} where GROUPID=#{groupid}
</update> </update>
......
<?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.ProdCardTMapper">
<resultMap id="ProdCardTMapper" type="com.yxproject.start.entity.prod.ProdCardTEntity">
<id column="ACCEPT_NO" property="accept_No" jdbcType="VARCHAR"/>
<result column="UPLOAD_NO" property="upload_No" jdbcType="NUMERIC"/>
<result column="PHOTO_NO" property="photoNo" jdbcType="CHAR"/>
<result column="NAME" property="name" jdbcType="VARCHAR"/>
<result column="SEX_NO" property="sexNo" jdbcType="CHAR"/>
<result column="NATION_NO" property="nationNo" jdbcType="CHAR"/>
<result column="BIRTHDAY" property="birthday" jdbcType="CHAR"/>
<result column="ID_NO" property="idNo" jdbcType="VARCHAR"/>
<result column="ADDR1" property="addr1" jdbcType="VARCHAR"/>
<result column="ADDR2" property="addr2" jdbcType="VARCHAR"/>
<result column="ADDR3" property="addr3" jdbcType="VARCHAR"/>
<result column="ADDRESS1" property="address1" jdbcType="VARCHAR"/>
<result column="SIGN_GOVT" property="signGovt" jdbcType="VARCHAR"/>
<result column="EXPIRE_DATE" property="expireDate" jdbcType="CHAR"/>
<result column="BEGIN_DATE" property="beginDate" jdbcType="CHAR"/>
<result column="APPLY_REASON" property="applyReason" jdbcType="CHAR"/>
<result column="STATUS_NO" property="statusNo" jdbcType="CHAR"/>
</resultMap>
<select id="findCardInfo" parameterType="String" resultType="com.yxproject.start.entity.prod.ProdCardTEntity">
select * from PROD_CARD_T@PROD_LINK where ACCEPT_NO=#{card} or ID_NO =#{card}
</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