Commit 5ff0201b authored by Administrator's avatar Administrator

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

修改mybatis注解改为xml
添加查询任务单详情通过状态
添加查询废证详情通过状态
添加保存废证、更新废证
parent f645c760
package com.yxproject.start.SqlProvider;
import com.alibaba.druid.sql.ast.statement.SQLForeignKeyImpl;
import com.alibaba.druid.sql.visitor.functions.If;
import javafx.beans.binding.When;
import com.yxproject.start.entity.FailedinfoEntity;
import org.apache.ibatis.jdbc.SQL;
/**
* Created by zhangyusheng on 2018/10/23 13:52
*/
public class SqlProvider {
public String findCardInfoByCardIDOrAcceptNoAtPRODSql(String card) {
return new SQL() {
{
SELECT("*") ;
FROM("PROD_card_t@PROD_LINK");
if (card.length()==18){
WHERE("id_No=#{idNo}");
}
if (card.length()==10){
WHERE("PROD_card_t.accept_No=#{acceptNo}");
}
// public String findCardInfoByCardIDOrAcceptNoAtPRODSql(String card) {
// return new SQL() {
// {
// SELECT("*") ;
// FROM("PROD_card_t@PROD_LINK");
// if (card.length()==18){
// WHERE("id_No=#{idNo}");
// }
// if (card.length()==10){
// 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;
import com.yxproject.start.entity.*;
import com.yxproject.start.service.ProductionTaskListService;
import com.yxproject.start.service.SysPermissionService;
import com.yxproject.start.service.SysRoleService;
import com.yxproject.start.service.UserInfoService;
import com.yxproject.start.service.*;
import com.yxproject.start.utils.YXJSONResponse;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
......@@ -23,7 +20,11 @@ import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
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.MediaType;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
......@@ -47,6 +48,9 @@ public class ShiroApi {
@Autowired
private SysPermissionService sysPermissionService;
@Autowired
private FailedinfoService failedinfoService;
@RequestMapping(value={"/","/index"})
public String index(Map<String,Object> map){
System.out.println("HomeController.index()");
......@@ -216,7 +220,7 @@ public class ShiroApi {
@RequiresPermissions("userInfo.add")//权限管理;
@ResponseBody
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);
ProductionTaskListEntity productionTaskListEntity = (ProductionTaskListEntity)jsonObject.toBean(jsonObject, ProductionTaskListEntity.class);
YXJSONResponse yxjsonResponse = new YXJSONResponse();
......@@ -317,6 +321,10 @@ public class ShiroApi {
return yxjsonResponse.toJSONString();
}
/**
* test
* @return
......@@ -335,4 +343,5 @@ public class ShiroApi {
}
package com.yxproject.start.api;
import com.yxproject.start.entity.*;
import com.yxproject.start.service.ProductionTaskListService;
import com.yxproject.start.service.SysPermissionService;
import com.yxproject.start.service.SysRoleService;
import com.yxproject.start.service.UserInfoService;
import com.yxproject.start.service.*;
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.authc.IncorrectCredentialsException;
import org.apache.shiro.authc.UnknownAccountException;
......@@ -13,8 +13,8 @@ import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.subject.Subject;
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.RequestParam;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
......@@ -42,6 +42,9 @@ public class UserInfoApi {
@Autowired
private ProductionTaskListService productionTaskListService;
@Autowired
private FailedinfoService failedinfoService;
@GET
@Path("login")
@Produces(MediaType.APPLICATION_JSON)
......@@ -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;
@Entity
@Table(name = "PRODUCTION_TASK_LIST", schema = "DAHAI", catalog = "")
public class ProductionTaskListEntity {
private String production_TaskList_Id;
private String production_Task_List_Id;
private long make_Type;
private Long old_Make_Type;
private String workshop;
......@@ -23,15 +23,18 @@ public class ProductionTaskListEntity {
private String exception_Information;
private String outbound_Date;
private String putinstorage_Date;
private Long state;
@Id
@Column(name = "PRODUCTION_TASK_LIST_ID", nullable = false, length = 20)
public String getProduction_TaskList_Id() {
return production_TaskList_Id;
public String getProduction_Task_List_Id() {
return production_Task_List_Id;
}
public void setProduction_TaskList_Id(String production_TaskList_Id) {
this.production_TaskList_Id = production_TaskList_Id;
public void setProduction_Task_List_Id(String production_Task_List_Id) {
this.production_Task_List_Id = production_Task_List_Id;
}
@Basic
@Column(name = "MAKE_TYPE", nullable = false, precision = 0)
public long getMake_Type() {
......@@ -41,6 +44,7 @@ public class ProductionTaskListEntity {
public void setMake_Type(long make_Type) {
this.make_Type = make_Type;
}
@Basic
@Column(name = "OLD_MAKE_TYPE", nullable = true, precision = 0)
public Long getOld_Make_Type() {
......@@ -50,6 +54,7 @@ public class ProductionTaskListEntity {
public void setOld_Make_Type(Long old_Make_Type) {
this.old_Make_Type = old_Make_Type;
}
@Basic
@Column(name = "CITYCODE",nullable = true, length = 8)
public String getCitycode() {
......@@ -60,7 +65,6 @@ public class ProductionTaskListEntity {
this.citycode = citycode;
}
@Basic
@Column(name = "WORKSHOP", nullable = true, length = 2)
public String getWorkshop() {
......@@ -70,6 +74,7 @@ public class ProductionTaskListEntity {
public void setWorkshop(String workshop) {
this.workshop = workshop;
}
@Basic
@Column(name = "SUBMIT_DATE", nullable = true, length = 8)
public String getSubmit_Date() {
......@@ -79,6 +84,7 @@ public class ProductionTaskListEntity {
public void setSubmit_Date(String submit_Date) {
this.submit_Date = submit_Date;
}
@Basic
@Column(name = "HANDOUT_DATE", nullable = true, length = 8)
public String getHandout_Date() {
......@@ -88,6 +94,7 @@ public class ProductionTaskListEntity {
public void setHandout_Date(String handout_Date) {
this.handout_Date = handout_Date;
}
@Basic
@Column(name = "IS_PRINT", nullable = true, precision = 0)
public Long getIs_Print() {
......@@ -97,6 +104,7 @@ public class ProductionTaskListEntity {
public void setIs_Print(Long is_Print) {
this.is_Print = is_Print;
}
@Basic
@Column(name = "DOWNLOAD_DATE", nullable = true, length = 8)
public String getDownload_Date() {
......@@ -106,6 +114,7 @@ public class ProductionTaskListEntity {
public void setDownload_Date(String download_Date) {
this.download_Date = download_Date;
}
@Basic
@Column(name = "PRINT_OUT", nullable = true, length = 8)
public String getPrint_Out() {
......@@ -115,6 +124,7 @@ public class ProductionTaskListEntity {
public void setPrint_Out(String print_Out) {
this.print_Out = print_Out;
}
@Basic
@Column(name = "PERMANENT_POSITION_DATE", nullable = true, length = 8)
public String getPermanent_Position_Date() {
......@@ -124,6 +134,7 @@ public class ProductionTaskListEntity {
public void setPermanent_Position_Date(String permanent_Position_Date) {
this.permanent_Position_Date = permanent_Position_Date;
}
@Basic
@Column(name = "ROLL_OUT_WORKSHOP_DATE", nullable = true, length = 8)
public String getRoll_Out_Workshop_Date() {
......@@ -133,6 +144,7 @@ public class ProductionTaskListEntity {
public void setRoll_Out_Workshop_Date(String roll_Out_Workshop_Date) {
this.roll_Out_Workshop_Date = roll_Out_Workshop_Date;
}
@Basic
@Column(name = "QUALITYINSPECTION_NAME", nullable = true, length = 20)
public String getQualityinspection_Name() {
......@@ -142,6 +154,7 @@ public class ProductionTaskListEntity {
public void setQualityinspection_Name(String qualityinspection_Name) {
this.qualityinspection_Name = qualityinspection_Name;
}
@Basic
@Column(name = "QUALITYINSPECTION_DATE", nullable = true, length = 8)
public String getQualityinspection_Date() {
......@@ -151,6 +164,7 @@ public class ProductionTaskListEntity {
public void setQualityinspection_Date(String qualityinspection_Date) {
this.qualityinspection_Date = qualityinspection_Date;
}
@Basic
@Column(name = "EXCEPTION_INFORMATION", nullable = true, length = 120)
public String getException_Information() {
......@@ -160,6 +174,7 @@ public class ProductionTaskListEntity {
public void setException_Information(String exception_Information) {
this.exception_Information = exception_Information;
}
@Basic
@Column(name = "OUTBOUND_DATE", nullable = true, length = 8)
public String getOutbound_Date() {
......@@ -169,6 +184,7 @@ public class ProductionTaskListEntity {
public void setOutbound_Date(String outbound_Date) {
this.outbound_Date = outbound_Date;
}
@Basic
@Column(name = "PUTINSTORAGE_DATE", nullable = true, length = 8)
public String getPutinstorage_Date() {
......@@ -178,14 +194,22 @@ public class ProductionTaskListEntity {
public void setPutinstorage_Date(String 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
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ProductionTaskListEntity that = (ProductionTaskListEntity) o;
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(citycode, that.citycode) &&
Objects.equals(workshop, that.workshop) &&
......@@ -200,11 +224,15 @@ public class ProductionTaskListEntity {
Objects.equals(qualityinspection_Date, that.qualityinspection_Date) &&
Objects.equals(exception_Information, that.exception_Information) &&
Objects.equals(outbound_Date, that.outbound_Date) &&
Objects.equals(state, that.state) &&
Objects.equals(putinstorage_Date, that.putinstorage_Date);
}
@Override
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;
*/
@Mapper
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);
}
......@@ -17,5 +17,6 @@ public interface ProductionTaskListMapper {
public int insertProductionTaskListEntity(ProductionTaskListEntity productionTaskListEntity);
public int updateProductionTask(ProductionTaskListEntity productionTaskListEntity);
public List<ProductionTaskListEntity> findProductionTaskListEntityByAcceptNo(String acceptNo);
public List<ProductionTaskListEntity> findProductionTaskListEntityByState(int state);
}
package com.yxproject.start.mapper;
import com.yxproject.start.entity.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
/**
* @author zhangyusheng
......@@ -21,4 +20,9 @@ public interface UtilMapper {
* 查询派出所照片质量表序列值
*/
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 {
public int savePoliceStationVailedInfoEntity(List<PoliceStationVailedInfoEntity> policeStationVailedInfoEntities);
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
*/
@Override
public int updateProductionTask(ProductionTaskListEntity productionTaskListEntity) {
//todo 状态更新时间
return productionTaskListMapper.updateProductionTask(productionTaskListEntity);
}
......@@ -78,7 +79,7 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
int production_task_list_seq = utilMapper.findProductionTaskListSequenceNextValue();
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);
for (GroupinfoEntity groupinfoEntity:groupinfoEntities) {
int groupInfoSequenceValue = utilMapper.findGroupInfoSequenceNextValue();
......@@ -163,7 +164,7 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
ProductionTaskListEntity productionTaskListEntity = new ProductionTaskListEntity();
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.setMake_Type(Long.valueOf(original_no.toString().substring(20,21)));
productionTaskListEntity.setSubmit_Date(simpleDateFormat.format(new Date()));
......@@ -195,7 +196,7 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
*/
ProductionTaskListEntity productionTaskListEntityQ = new ProductionTaskListEntity();
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.setMake_Type((long)1);
productionTaskListEntityQ.setOld_Make_Type(Long.valueOf(original_no.toString().substring(20,21)));
......@@ -229,7 +230,7 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
int groupInfoSequenceValue2 = utilMapper.findGroupInfoSequenceNextValue();
GroupinfoEntity groupinfoEntity2 = new GroupinfoEntity();
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.setGrouptype((long)1);
groupinfoEntity2.setInvalid_Count((long)0);
......@@ -240,7 +241,7 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
*/
ProductionTaskListEntity productionTaskListEntityQ = new ProductionTaskListEntity();
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.setMake_Type((long)1);
productionTaskListEntityQ.setOld_Make_Type(productionTaskListEntity.get(0).getMake_Type());
......@@ -320,6 +321,19 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
return 1;
}
/**
* 查询任务单详情
* 通过查询任务单状态
* @param state
* @return
*/
@Override
public List<ProductionTaskListEntity> findProductionTaskListEntityByState(int state) {
return null;
}
/**
* 测试查询
* @param id
......
......@@ -26,20 +26,15 @@
</select>
<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
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 * from findAccGroupTEntityList_view where view_param.set_param(#{dealDate})=#{dealDate}
</select>
<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)
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 * from FINDACCGROUPT_VIEW where view_param.set_param(#{acceptNo})=#{acceptNo}
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yxproject.start.mapper.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 @@
<insert id="insertGroupinfoEntity" parameterType="com.yxproject.start.entity.GroupinfoEntity">
Insert into GROUPINFO (GROUPID,GROUPNO,CYCLESHEETID,GROUPTYPE,VAILD_COUNT,INVALID_COUNT) values
(#{groupid}
<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>)
(#{groupid},#{groupno},#{grouptype},#{cyclesheetid},#{grouptype},#{vaildCount},#{invalidCount})
</insert>
<select id="findGroupinfoEntityByAcceptNo" resultType="com.yxproject.start.entity.GroupinfoEntity" parameterType="String">
......@@ -37,12 +25,12 @@
<update id="updateGroupinfoEntity" parameterType="com.yxproject.start.entity.GroupinfoEntity">
update GROUPINFO set GROUPID=#{groupid}
<if test="groupno != null">,groupno =#{groupno}</if>
<if test="makeType != null">,MAKE_TYPE =#{makeType}</if>
<if test="cyclesheetid != null">,cyclesheetid =#{cyclesheetid}</if>
<if test="grouptype != null">,grouptype =#{grouptype}</if>
<if test="valid_Count != null">,valid_Count =#{valid_Count}</if>
<if test="invalid_Count != null">,invalid_Count =#{invalid_Count}</if>
<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>
where GROUPID=#{groupid}
</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
......@@ -2,89 +2,70 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yxproject.start.mapper.ProductionTaskListMapper">
<resultMap id="ProductionTaskListMap" type="com.yxproject.start.entity.ProductionTaskListEntity">
<id column="PRODUCTION_TASK_LIST_ID" property="productionTaskListId" jdbcType="VARCHAR"/>
<result column="MAKE_TYPE" property="makeType" jdbcType="NUMERIC"/>
<result column="OLD_MAKE_TYPE" property="oldMakeType" jdbcType="NUMERIC"/>
<id column="PRODUCTION_TASK_LIST_ID" property="production_Task_List_Id" jdbcType="VARCHAR"/>
<result column="MAKE_TYPE" property="make_Type" jdbcType="NUMERIC"/>
<result column="OLD_MAKE_TYPE" property="old_Make_Type" jdbcType="NUMERIC"/>
<result column="CITYCODE" property="citycode" jdbcType="VARCHAR"/>
<result column="WORKSHOP" property="workshop" jdbcType="VARCHAR"/>
<result column="SUBMIT_DATE" property="submitDate" jdbcType="VARCHAR"/>
<result column="HANDOUT_DATE" property="handoutDate" jdbcType="VARCHAR"/>
<result column="IS_PRINT" property="isPrint" jdbcType="NUMERIC"/>
<result column="DOWNLOAD_DATE" property="downloadDate" jdbcType="VARCHAR"/>
<result column="PRINT_OUT" property="printOut" jdbcType="VARCHAR"/>
<result column="PERMANENT_POSITION_DATE" property="permanentPositionDate" jdbcType="VARCHAR"/>
<result column="ROLL_OUT_WORKSHOP_DATE" property="rollOutWorkshopDate" jdbcType="VARCHAR"/>
<result column="QUALITYINSPECTION_NAME" property="qualityinspectionName" jdbcType="VARCHAR"/>
<result column="QUALITYINSPECTION_DATE" property="qualityinspectionDate" jdbcType="VARCHAR"/>
<result column="EXCEPTION_INFORMATION" property="exceptionInformation" jdbcType="VARCHAR"/>
<result column="OUTBOUND_DATE" property="outboundDate" jdbcType="VARCHAR"/>
<result column="PUTINSTORAGE_DATE" property="putinstorageDate" jdbcType="VARCHAR"/>
<result column="SUBMIT_DATE" property="submit_Date" jdbcType="VARCHAR"/>
<result column="HANDOUT_DATE" property="handout_Date" jdbcType="VARCHAR"/>
<result column="IS_PRINT" property="is_Print" jdbcType="NUMERIC"/>
<result column="DOWNLOAD_DATE" property="download_Date" jdbcType="VARCHAR"/>
<result column="PRINT_OUT" property="print_Out" jdbcType="VARCHAR"/>
<result column="PERMANENT_POSITION_DATE" property="permanent_Position_Date" jdbcType="VARCHAR"/>
<result column="ROLL_OUT_WORKSHOP_DATE" property="roll_Out_Workshop_Date" jdbcType="VARCHAR"/>
<result column="QUALITYINSPECTION_NAME" property="qualityinspection_Name" jdbcType="VARCHAR"/>
<result column="QUALITYINSPECTION_DATE" property="qualityinspection_Date" jdbcType="VARCHAR"/>
<result column="EXCEPTION_INFORMATION" property="exception_Information" jdbcType="VARCHAR"/>
<result column="OUTBOUND_DATE" property="outbound_Date" jdbcType="VARCHAR"/>
<result column="PUTINSTORAGE_DATE" property="putinstorage_Date" jdbcType="VARCHAR"/>
<result column="STATE" property="state" jdbcType="NUMERIC"/>
</resultMap>
<select id="findProductionTaskListEntity" resultType="com.yxproject.start.entity.ProductionTaskListEntity" parameterType="String">
select 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 from PRODUCTION_TASK_LIST where PRODUCTION_TASK_LIST_ID like #{id}
select * from PRODUCTION_TASK_LIST where PRODUCTION_TASK_LIST_ID like #{id}
</select>
<insert id="insertProductionTaskListEntity" parameterType="com.yxproject.start.entity.ProductionTaskListEntity">
Insert into PRODUCTION_TASK_LIST (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)
values (#{productionTaskListId}
<if test="makeType != null">,#{makeType}</if>
<if test="makeType == null">,null </if>
<if test="oldMakeType != null">,#{oldMakeType}</if>
<if test="oldMakeType == null">,null </if>
<if test="citycode != null">,#{citycode}</if>
<if test="citycode == null">,null </if>
<if test="workshop != null">,#{workshop}</if>
<if test="workshop == null">,null </if>
<if test="submitDate != null">,#{submitDate}</if>
<if test="submitDate == null">,null </if>
<if test="handoutDate != null">,#{handoutDate}</if>
<if test="handoutDate == null">,null </if>
<if test="isPrint != null">,#{isPrint}</if>
<if test="isPrint == null">,null </if>
<if test="downloadDate != null">,#{downloadDate}</if>
<if test="downloadDate == null">,null </if>
<if test="printOut != null">,#{printOut}</if>
<if test="printOut == null">,null </if>
<if test="permanentPositionDate != null">,#{permanentPositionDate}</if>
<if test="permanentPositionDate == null">,null </if>
<if test="rollOutWorkshopDate != null">,#{rollOutWorkshopDate}</if>
<if test="rollOutWorkshopDate == null">,null </if>
<if test="qualityinspectionName != null">,#{qualityinspectionName}</if>
<if test="qualityinspectionName == null">,null </if>
<if test="qualityinspectionDate != null">,#{qualityinspectionDate}</if>
<if test="qualityinspectionDate == null">,null </if>
<if test="exceptionInformation != null">,#{exceptionInformation}</if>
<if test="exceptionInformation == null">,null </if>
<if test="outboundDate != null">,#{outboundDate}</if>
<if test="outboundDate == null">,null </if>
<if test="putinstorageDate != null">,#{putinstorageDate}</if>
<if test="putinstorageDate == null">,null </if>)
Insert into PRODUCTION_TASK_LIST (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)
values (#{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})
</insert>
<update id="updateProductionTask" parameterType="com.yxproject.start.entity.ProductionTaskListEntity">
update PRODUCTION_TASK_LIST set PRODUCTION_TASK_LIST_ID=#{productionTaskListId}
<if test="oldMakeType != null">,OLD_MAKE_TYPE =#{oldMakeType}</if>
<if test="makeType != null">,MAKE_TYPE =#{makeType}</if>
<if test="citycode != null">,CITYCODE =#{citycode}</if>
<if test="workshop != null">,WORKSHOP =#{workshop}</if>
<if test="submitDate != null">,SUBMIT_DATE =#{submitDate}</if>
<if test="handoutDate != null">,HANDOUT_DATE =#{handoutDate}</if>
<if test="isPrint != null">,IS_PRINT =#{isPrint}</if>
<if test="downloadDate != null">,DOWNLOAD_DATE =#{downloadDate}</if>
<if test="printOut != null">,PRINT_OUT =#{printOut}</if>
<if test="permanentPositionDate != null">,PERMANENT_POSITION_DATE =#{permanentPositionDate}</if>
<if test="rollOutWorkshopDate != null">,ROLL_OUT_WORKSHOP_DATE =#{rollOutWorkshopDate}</if>
<if test="qualityinspectionName != null">,QUALITYINSPECTION_NAME =#{qualityinspectionName}</if>
<if test="qualityinspectionDate != null">,QUALITYINSPECTION_DATE =#{qualityinspectionDate}</if>
<if test="exceptionInformation != null">,EXCEPTION_INFORMATION =#{exceptionInformation}</if>
<if test="outboundDate != null">,OUTBOUND_DATE =#{outboundDate}</if>
<if test="putinstorageDate != null">,PUTINSTORAGE_DATE =#{putinstorageDate}</if>
where PRODUCTION_TASK_LIST_ID=#{productionTaskListId}
update PRODUCTION_TASK_LIST
<set>
<if test="old_Make_Type ">OLD_MAKE_TYPE =#{old_Make_Type},</if>
<if test="make_Type ">MAKE_TYPE =#{make_Type},</if>
<if test="citycode ">CITYCODE =#{citycode},</if>
<if test="workshop">WORKSHOP =#{workshop},</if>
<if test="submit_Date ">SUBMIT_DATE =#{submit_Date},</if>
<if test="handout_Date ">HANDOUT_DATE =#{handout_Date},</if>
<if test="is_Print">IS_PRINT =#{is_Print},</if>
<if test="download_Date">DOWNLOAD_DATE =#{download_Date},</if>
<if test="print_Out">PRINT_OUT =#{print_Out},</if>
<if test="permanent_Position_Date">PERMANENT_POSITION_DATE =#{permanent_Position_Date},</if>
<if test="roll_Out_Workshop_Date ">ROLL_OUT_WORKSHOP_DATE =#{roll_Out_Workshop_Date},</if>
<if test="qualityinspection_Name">QUALITYINSPECTION_NAME =#{qualityinspection_Name},</if>
<if test="qualityinspection_Date">QUALITYINSPECTION_DATE =#{qualityinspection_Date},</if>
<if test="exception_Information">EXCEPTION_INFORMATION =#{exception_Information},</if>
<if test="outbound_Date">OUTBOUND_DATE =#{outbound_Date},</if>
<if test="state!=null">STATE =#{state},</if>
<if test="putinstorage_Date!=null">PUTINSTORAGE_DATE =#{putinstorage_Date},</if>
</set>
where PRODUCTION_TASK_LIST_ID =#{production_Task_List_Id}
</update>
<select id="findProductionTaskListEntityByAcceptNo" resultType="com.yxproject.start.entity.ProductionTaskListEntity" parameterType="String">
select 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 from PRODUCTION_TASK_LIST left join GROUPINFO on GROUPINFO.CYCLESHEETID = PRODUCTION_TASK_LIST.PRODUCTION_TASK_LIST_ID where GROUPINFO.GROUPNO =#{acceptNo} or GROUPINFO.GROUPNO =substr (#{acceptNo},0,8)
</select>
<select id="findProductionTaskListEntityByState" resultType="com.yxproject.start.entity.ProductionTaskListEntity" parameterType="Integer">
select * from PRODUCTION_TASK_LIST where STATE =#{state }
</select>
......
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