Commit a25d8490 authored by Administrator's avatar Administrator

push

parent 77a372e3
This diff is collapsed.
......@@ -1222,7 +1222,7 @@ public class UserInfoApi {
//第六步将生成excel文件保存到指定路径下
FileOutputStream fout = null;
try {
fout = new FileOutputStream("F:\\Excel\\" + simpleDateFormat.format(new Date()) + countyInfoList.get(0).get("countyName") + ".xls");
fout = new FileOutputStream("E:\\Excel\\" + simpleDateFormat.format(new Date()) + countyInfoList.get(0).get("countyName") + ".xls");
// fout = new FileOutputStream("D:\\" + simpleDateFormat.format(new Date()) + list.get(0).getString("countyName") + ".xls");
wb.write(fout);
fout.close();
......@@ -1231,7 +1231,7 @@ public class UserInfoApi {
}
System.out.println("Excel文件生成成功..." + new Date());
return "F:\\Excel\\" + simpleDateFormat.format(new Date()) +countyInfoList.get(0).get("countyName") + ".xls";
return "E:\\Excel\\" + simpleDateFormat.format(new Date()) +countyInfoList.get(0).get("countyName") + ".xls";
// return "D:\\" + simpleDateFormat.format(new Date()) + list.get(0).getString("countyName") + ".xls";
}
......
package com.yxproject.start.config;
import com.yxproject.start.api.AdminApi;
import com.yxproject.start.api.UserInfoApi;
import org.glassfish.jersey.server.ResourceConfig;
public class JerseyConfig extends ResourceConfig {
public JerseyConfig() {
register(UserInfoApi.class);
register(AdminApi.class);
}
}
package com.yxproject.start.entity;
import javax.persistence.*;
import java.util.Objects;
/**
* Created liuxinben on 2018/11/7.9:21
*/
@Entity
@Table(name = "CARD_BODY_INFO", schema = "DAHAI", catalog = "")
public class CardBodyInfoEntity {
private String card_Body_Info_Id;
private String card_Body_Info_Save_Date;
private String card_Body_Type;
private String cyclesheetid;
private Long is_Active;
private Long card_Body_Count;
@Id
@Column(name = "CARD_BODY_INFO_ID",nullable = false, length = 20)
public String getCardBodyInfoId() {
return card_Body_Info_Id;
}
public void setCardBodyInfoId(String cardBodyInfoId) {
this.card_Body_Info_Id = cardBodyInfoId;
}
@Basic
@Column(name = "CARD_BODY_INFO_SAVE_DATE",nullable = false, length = 20)
public String getCardBodyInfoSaveDate() {
return card_Body_Info_Save_Date;
}
public void setCardBodyInfoSaveDate(String cardBodyInfoSaveDate) {
this.card_Body_Info_Save_Date = cardBodyInfoSaveDate;
}
@Basic
@Column(name = "CARD_BODY_TYPE",nullable = false, length = 20)
public String getCardBodyType() {
return card_Body_Type;
}
public void setCardBodyType(String cardBodyType) {
this.card_Body_Type = cardBodyType;
}
@Basic
@Column(name = "CYCLESHEETID", nullable = true, length = 20)
public String getCyclesheetid() {
return cyclesheetid;
}
public void setCyclesheetid(String cyclesheetid) {
this.cyclesheetid = cyclesheetid;
}
@Basic
@Column(name = "IS_ACTIVE",nullable = false, length = 20)
public Long getIsActive() {
return is_Active;
}
public void setIsActive(Long isActive) {
this.is_Active = isActive;
}
@Basic
@Column(name = "CARD_BODY_COUNT",nullable = false, length = 20)
public Long getCardBodyCount() {
return card_Body_Count;
}
public void setCardBodyCount(Long cardBodyCount) {
this.card_Body_Count = cardBodyCount;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CardBodyInfoEntity that = (CardBodyInfoEntity) o;
return Objects.equals(card_Body_Info_Id, that.card_Body_Info_Id) &&
Objects.equals(card_Body_Info_Save_Date, that.card_Body_Info_Save_Date) &&
Objects.equals(is_Active, that.is_Active) &&
Objects.equals(cyclesheetid, that.cyclesheetid) &&
Objects.equals(card_Body_Type, that.card_Body_Type) &&
Objects.equals(card_Body_Count, that.card_Body_Count) ;
}
@Override
public int hashCode() {
return Objects.hash(card_Body_Info_Id, card_Body_Info_Save_Date, is_Active, card_Body_Count, cyclesheetid, card_Body_Type);
}
}
package com.yxproject.start.entity;
import javax.persistence.*;
import java.util.List;
import java.util.Objects;
/**
* Created by liuxinben on 2018/11/6.10:14
*/
@Entity
@Table(name = "COUNTY_LIST_INFO", schema = "DAHAI", catalog = "")
public class CountyListInfoEntity {
private String county_List_Id;
private String save_Date;
private String cyclesheetid;
private String county_Code;
private Long finish_Count;
private Long put_In_Storage_Count;
private Long out_Bound_Count;
@Id
@Column(name = "COUNTY_LIST_ID", nullable = false, length = 20)
public String getCountyListId() {
return county_List_Id;
}
public void setCountyListId(String countyListId) {
this.county_List_Id = countyListId;
}
@Basic
@Column(name = "SAVE_DATE", nullable = true, length = 20)
public String getSaveDate() { return save_Date;}
public void setSaveDate(String saveDate) {
this.save_Date = saveDate;
}
@Basic
@Column(name = "CYCLESHEETID", nullable = true, length = 20)
public String getCyclesheetid() {
return cyclesheetid;
}
public void setCyclesheetid(String cyclesheetid) {
this.cyclesheetid = cyclesheetid;
}
@Basic
@Column(name = "COUNTY_CODE", nullable = true, length = 20)
public String getCountyCode() {
return county_Code;
}
public void setCountyCode(String county_Code) { this.county_Code = county_Code;}
@Basic
@Column(name = "FINISH_COUNT", nullable = true, precision = 0)
public Long getFinishCount() {
return finish_Count;
}
public void setFinishCount(Long finishCount) {
this.finish_Count = finishCount;
}
@Basic
@Column(name = "PUT_IN_STORAGE_COUNT", nullable = true, precision = 0)
public Long getPutInStorageCount() {
return put_In_Storage_Count;
}
public void setPutInStorageCount(Long putInStorageCount) {
this.put_In_Storage_Count = putInStorageCount;
}
@Basic
@Column(name = "OUT_BOUND_COUNT", nullable = true, precision = 0)
public Long getOutBoundCount() {
return out_Bound_Count;
}
public void setOutBoundCount(Long outBoundCount) {
this.out_Bound_Count = outBoundCount;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CountyListInfoEntity that = (CountyListInfoEntity) o;
return Objects.equals(county_List_Id, that.county_List_Id) &&
Objects.equals(save_Date, that.save_Date) &&
Objects.equals(cyclesheetid, that.cyclesheetid) &&
Objects.equals(county_Code, that.county_Code) &&
Objects.equals(finish_Count, that.finish_Count) &&
Objects.equals(put_In_Storage_Count, that.put_In_Storage_Count) &&
Objects.equals(out_Bound_Count, that.out_Bound_Count) ;
}
@Override
public int hashCode() {
return Objects.hash(county_List_Id, save_Date, cyclesheetid, county_Code, finish_Count, put_In_Storage_Count, out_Bound_Count);
}
}
package com.yxproject.start.mapper;
import com.yxproject.start.entity.CardBodyInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* Created by liuxinben on 2018/11/6.10:26
*/
@Mapper
public interface CardBodyInfoMapper {
public int insertCardBodyInfoEntity(CardBodyInfoEntity cardBodyInfoEntity);
public int updateCardBodyInfo(CardBodyInfoEntity cardBodyInfoEntity);
}
\ No newline at end of file
package com.yxproject.start.mapper;
import com.yxproject.start.entity.CountyListInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* Created by liuxinben on 2018/11/6.10:26
*/
@Mapper
public interface CountyListInfoMapper {
public List<CountyListInfoEntity> findCountyListByTaskListID(String tasklistID);
}
......@@ -29,3 +29,24 @@ public interface PoliceStationVailedInfoMapper {
@Result(property = "sava_Date",column = "sava_Date")})
public List<PoliceStationVailedInfoEntity> findPoliceStationVailedInfoEntityByID(String id);
}
//@Mapper
//interface Inter {
// public static final int num=3;
// public abstract void show();
//}
//
//class Test implements Inter {
// public void show(){
//
// }
//}
//public class InterfaceDome{
//// public static void mian(String[] args){
//// Test t = new Test();
//// System.out.println(t.num);
//// System.out.println(Test.num);
//// System.out.println(Inter.num);
//// }
//
//}
\ No newline at end of file
......@@ -82,3 +82,5 @@ public interface UserInfoMapper {
@Update("UPDATE USER_INFO SET USERNAME=#{username},NAME=#{name} where ID=#{id}")
public void updateUserInfo(UserInfo userInfo);
}
......@@ -12,17 +12,22 @@ public interface UtilMapper {
* 查询任务单序列值
*/
public int findProductionTaskListSequenceNextValue();
/**
* 查询组号信息序列值
*/
public int findGroupInfoSequenceNextValue();
/**
* 查询派出所照片质量表序列值
*/
public int findPoliceStationVailedSequenceNextValue();
/**
* 查询废证信息表序列值
*/
@Select(" select FAILEDINFO_SEQ.nextval from dual")
public int findFailedinfoSequenceNextValue();
}
package com.yxproject.start.service;
import com.yxproject.start.entity.CardBodyInfoEntity;
import com.yxproject.start.entity.GroupinfoEntity;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Created by Administrator on 2018/11/7.
*/
public interface CardBodyInfoService {
public int addCardBodyInfoEntity(CardBodyInfoEntity cardBodyInfoEntity, List<GroupinfoEntity> groupinfoEntities);
public int updateCardBodyInfo(CardBodyInfoEntity map);
}
package com.yxproject.start.service;
import com.yxproject.start.entity.CountyListInfoEntity;
import java.util.List;
/**
* Created by liuxinben on 2018/11/6.10:30
*/
public interface CountyListInfoService {
public List<CountyListInfoEntity> findCountyListByTaskListID(String tasklistID);
}
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.CardBodyInfoEntity;
import com.yxproject.start.entity.GroupinfoEntity;
import com.yxproject.start.mapper.CardBodyInfoMapper;
import com.yxproject.start.mapper.GroupinfoMapper;
import com.yxproject.start.mapper.UtilMapper;
import com.yxproject.start.service.CardBodyInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* Created by Administrator on 2018/11/7.
*/
@Service
public class CardBodyInfoServiceImpl implements CardBodyInfoService {
@Autowired
public CardBodyInfoMapper cardBodyInfoMapper;
@Autowired
private UtilMapper utilMapper;
@Autowired
public GroupinfoMapper groupinfoMapper;
@Override
public int updateCardBodyInfo(CardBodyInfoEntity cardBodyInfoEntity) {
//todo 状态更新时间
return cardBodyInfoMapper.updateCardBodyInfo(cardBodyInfoEntity);
}
@Override
@Transactional(rollbackFor=Exception.class)
public int addCardBodyInfoEntity(CardBodyInfoEntity cardBodyInfoEntity, List<GroupinfoEntity> groupinfoEntities) {
int production_task_list_seq = utilMapper.findProductionTaskListSequenceNextValue();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
cardBodyInfoEntity.setCardBodyInfoId(simpleDateFormat.format(new Date()) + production_task_list_seq);
cardBodyInfoMapper.insertCardBodyInfoEntity(cardBodyInfoEntity);
for (GroupinfoEntity groupinfoEntity : groupinfoEntities) {
int groupInfoSequenceValue = utilMapper.findGroupInfoSequenceNextValue();
groupinfoEntity.setGroupid(simpleDateFormat.format(new Date()) + groupInfoSequenceValue);
groupinfoEntity.setCyclesheetid(simpleDateFormat.format(new Date()) + production_task_list_seq);
groupinfoMapper.insertGroupinfoEntity(groupinfoEntity);
}
return 1;
}
}
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.CountyListInfoEntity;
import com.yxproject.start.mapper.CountyListInfoMapper;
import com.yxproject.start.service.CountyListInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Created by liuxinben on 2018/11/6.13:42
*/
@Service
public class CountyListInfoServiceImpl implements CountyListInfoService {
@Autowired
public CountyListInfoMapper countyListInfoMapper;
@Override
public List<CountyListInfoEntity> findCountyListByTaskListID(String tasklistid) {
List<CountyListInfoEntity> byTaskListID = countyListInfoMapper.findCountyListByTaskListID(tasklistid);
return byTaskListID;
}
}
\ 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.CardBodyInfoMapper">
<resultMap id="CardBodyInfoMapper" type="com.yxproject.start.entity.CardBodyInfoEntity">
<id column="card_Body_Info_Id" property="card_Body_Info_Id" />
<result column="card_Body_Info_Save_Date" property="card_Body_Info_Save_Date"/>
<result column="is_Active" property="is_Active"/>
<result column="card_Body_Count" property="card_Body_Count"/>
<result column="card_Body_Type" property="card_Body_Type"/>
<result column="cyclesheetid" property="cyclesheetid"/>
</resultMap>
<insert id="insertCardBodyInfoEntity" parameterType="com.yxproject.start.entity.CardBodyInfoEntity">
Insert into CARD_BODY_INFO (CARD_BODY_INFO_ID,CARD_BODY_INFO_SAVE_DATE,CARD_BODY_COUNT,CARD_BODY_TYPE,CYCLESHEETID,IS_ACTIVE)
values (#{card_Body_Info_Id},#{card_Body_Info_Save_Date},#{is_Active},#{card_Body_Count},#{card_Body_Type},#{cyclesheetid})
</insert>
<update id="updateCardBodyInfo" parameterType="com.yxproject.start.entity.CardBodyInfoEntity">
update CARD_BODY_INFO
<set>
<if test="card_Body_Info_Save_Date ">CARD_BODY_INFO_SAVE_DATE =#{card_Body_Info_Save_Date},</if>
<if test="is_Active ">IS_ACTIVE =#{is_Active},</if>
<if test="card_Body_Count ">CARD_BODY_COUNT =#{card_Body_Count},</if>
<if test="card_Body_Type">CARD_BODY_TYPE =#{card_Body_Type},</if>
<if test="cyclesheetid ">CYCLESHEETID =#{cyclesheetid},</if>
<if test="state!=null">STATE =#{state},</if>
<if test="putinstorage_Date!=null">PUTINSTORAGE_DATE =#{putinstorage_Date},</if>
</set>
where CARD_BODY_INFO_ID =#{card_Body_Info_Id}
</update>
</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.CountyListInfoMapper">
<resultMap id="CountyListInfoMapper" type="com.yxproject.start.entity.CountyListInfoEntity">
<id column="county_List_Id" property="county_List_Id" />
<result column="save_Date" property="save_Date"/>
<result column="cyclesheetid" property="cyclesheetid"/>
<result column="county_Code" property="county_Code"/>
<result column="finish_Count" property="finish_Count"/>
<result column="put_In_Storage_Count" property="put_In_Storage_Count"/>
<result column="out_Bound_Count" property="out_Bound_Count"/>
</resultMap>
<!--<insert id="addPermissionByMap" parameterType="com.yxproject.start.entity.SysPermission">-->
<!--Insert into DAHAI.SYS_PERMISSION (ID,AVAILABLE,NAME,PARENT_ID,PARENT_IDS,PERMISSION,RESOURCE_TYPE,URL) values (PERMISSION_seq.nextval,0,#{name},#{parentId},#{parentIds},#{permission},#{resourceType},#{url})-->
<!--</insert>-->
<select id="findCountyListByTaskListID" resultType="com.yxproject.start.entity.CountyListInfoEntity" parameterType="String">
SELECT * FROM COUNTY_LIST_INFO where CYCLESHEETID=#{tasklistID}
</select>
</mapper>
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