浏览代码

代码的提交

hbjzws 2 年之前
父节点
当前提交
d3f8f060a5

+ 5 - 1
common/pom.xml

@@ -166,7 +166,11 @@
             <systemPath>D:/taobao-sdk-java-1.0.0.jar</systemPath>
         </dependency>
         <!--短信相关 end-->
-
+        <dependency>
+            <groupId>com.intelligt.modbus</groupId>
+            <artifactId>jlibmodbus</artifactId>
+            <version>1.2.9.7</version>
+        </dependency>
 
         <!-- aliyun oss start -->
         <dependency>

+ 275 - 0
common/src/main/java/com/jpsoft/education/modules/common/utils/com/ComUtil.java

@@ -0,0 +1,275 @@
+package com.jpsoft.education.modules.common.utils.com;
+
+import java.math.BigInteger;
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ComUtil {
+    //油井A11-----modbus rtu协议解析
+    //读取到油压、套压、回压、井口温度、载荷这些数据
+    public static void read1(){
+        String str="01 03 14 3F 3C 26 E9 3F C1 00 00 00 00 1E B8 41 D7 CC CD 42 0B 00 00 C3 5F";
+        //0103143F3C26E93FC1000000001EB841D7CCCD420B0000C35F
+        str =str.replace(" ","");
+        if(str.startsWith("010314")){
+            String str1= str.substring(6, 14);
+            System.out.println(str1);
+            String str2= str.substring(14, 22);
+            System.out.println(str2);
+            String str3= str.substring(22, 30);
+            System.out.println(str3);
+            String str4= str.substring(30, 38);
+            System.out.println(str4);
+            String str5= str.substring(38, 46);
+            System.out.println(str5);
+        }
+        //System.out.println(str);
+    }
+    //读取第6项到第17项的数据
+    public static void read2(){
+        String str="01 03 30 41 E9 C0 00 41 E7 00 00 3D 00 28 00 43 65 08 00 43 66 70 00 43 65 35 88 48 35 8F 85 48 EE A8 88 40 83 CD F5 41 45 00 00 00 00 85 37 3E 99 00 00 C6 3A ";
+        //0103143F3C26E93FC1000000001EB841D7CCCD420B0000C35F
+        str =str.replace(" ","");
+        if(str.startsWith("010330")){
+            String str1= str.substring(6, 14);
+            System.out.println(str1);
+            String str2= str.substring(14, 22);
+            System.out.println(str2);
+            String str3= str.substring(22, 30);
+            System.out.println(str3);
+            String str4= str.substring(30, 38);
+            System.out.println(str4);
+            String str5= str.substring(38, 46);
+            System.out.println(str5);
+
+            String str6= str.substring(46, 54);
+            System.out.println(str6);
+            String str7= str.substring(54, 62);
+            System.out.println(str7);
+            String str8= str.substring(62, 70);
+            System.out.println(str8);
+            String str9= str.substring(70, 78);
+            System.out.println(str9);
+            String str10= str.substring(78, 86);
+            System.out.println(str10);
+
+            String str11= str.substring(86, 94);
+            System.out.println(str11);
+            String str12= str.substring(94, 102);
+            System.out.println(str12);
+        }
+        //System.out.println(str);
+    }
+//冲次和冲程
+    public static void read3(){
+        String str="01 03 08 40 9B 85 1F 40 3B 00 00 55 74";
+        //0103143F3C26E93FC1000000001EB841D7CCCD420B0000C35F
+        str =str.replace(" ","");
+        if(str.startsWith("010308")){
+            String str1= str.substring(6, 14);
+            System.out.println(str1);
+            String str2= str.substring(14, 22);
+            System.out.println(str2);
+
+        }
+        //System.out.println(str);
+    }
+    //长度100
+    public static void read4(){
+        String str="010364119B11C011D111EB1200120711D111EB12001207119B11C011D111EB1200120711D111EB12001207119B11C011D111EB1200120711D111EB12001207119B11C011D111EB1200120711D111EB12001207119B11C011D111EB1200120711D111EB12001207119B11C011D111EB1200120711D111EB12001207119B11C011D111EB1200120711D111EB12001207119B11C011D111EB1200120711D111EB12001207119B11C011D111EB1200120711D111EB12001207119B11C011D111EB1200120711D111EB12001207C35F";
+        str =str.replace(" ","");
+        if(str.startsWith("010364")&&str.endsWith("C35F")){
+             str= str.substring(6, str.length()-4);
+             System.out.println(str);
+             int allLength =str.length();
+             System.out.println(allLength);
+             int startStrPos = 0;
+             List<String> list = new ArrayList<>();
+             int k=0;
+                while (startStrPos < allLength) {
+                    String strOrg="";
+                    if(k==0){
+                        strOrg= str.substring(0,4);
+                    }else{
+                        strOrg =str.substring(startStrPos,startStrPos+4);
+                    }
+                    k++;
+                    startStrPos=startStrPos+4;
+                    System.out.println(startStrPos);
+                    list.add(strOrg);
+                }
+
+                int m=0;
+               for(String strD:list){
+                   m++;
+                   System.out.println(m+"---"+strD);
+               }
+        }
+    }
+    //长度50
+    public static void read5(){
+        String str="010332119B11C011D111EB1200120711D111EB12001207119B11C011D111EB1200120711D111EB12001207119B11C011D111EB1200120711D111EB12001207119B11C011D111EB1200120711D111EB12001207119B11C011D111EB1200120711D111EB12001207C35F";
+        str =str.replace(" ","");
+        if(str.startsWith("010332")&&str.endsWith("C35F")){
+            str= str.substring(6, str.length()-4);
+            System.out.println(str);
+            int allLength =str.length();
+            System.out.println(allLength);
+            int startStrPos = 0;
+            List<String> list = new ArrayList<>();
+            int k=0;
+            while (startStrPos < allLength) {
+                String strOrg="";
+                if(k==0){
+                    strOrg= str.substring(0,4);
+                }else{
+                    strOrg =str.substring(startStrPos,startStrPos+4);
+                }
+                k++;
+                startStrPos=startStrPos+4;
+                System.out.println(startStrPos);
+                list.add(strOrg);
+            }
+
+            int m=0;
+            for(String strD:list){
+                m++;
+                System.out.println(m+"---"+strD+"---"+Integer.parseInt(strD,16));
+            }
+        }
+    }
+
+    /**
+     * int数组转以两个为一组,一次转换成一个个的浮点数,并打印
+     * @param arry
+     */
+    public static void convertFloat(int arry[]){
+        for (int i = 0; i < arry.length; i++) {
+            if (i == 1) {
+                byte bytes1[] = new byte[2];
+                //bytes1 = int2Bytes(arry[0], 2);
+                bytes1 = Int2Bytes_LE(arry[0]);
+
+                byte bytes2[] = new byte[2];
+                //bytes2 = int2Bytes(arry[1], 2);
+                bytes2 = Int2Bytes_LE(arry[1]);
+
+                byte bytes[] = new byte[4];
+                bytes[0]=bytes1[0];
+                bytes[1]=bytes1[1];
+                bytes[2]=bytes2[0];
+                bytes[3]=bytes2[1];
+                System.out.println(hex(bytes));
+                System.out.println(sfloat(hex(bytes)));
+            } else {
+                if ((i+1)%2==0) {
+                    byte bytes1[] = new byte[2];
+                    bytes1 = Int2Bytes_LE(arry[i-1]);
+                    byte bytes2[] = new byte[2];
+                    bytes2 = Int2Bytes_LE(arry[i]);
+
+                    byte bytes[] = new byte[4];
+                    bytes[0]=bytes1[0];
+                    bytes[1]=bytes1[1];
+                    bytes[2]=bytes2[0];
+                    bytes[3]=bytes2[1];
+                    System.out.println(hex(bytes));
+                    System.out.println(sfloat(hex(bytes)));
+                }
+            }
+        }
+    }
+
+    /**
+     * 转小端,返回2个字节数组
+     * @param iValue
+     * @return
+     */
+    public static byte[] Int2Bytes_LE(int iValue){
+        byte[] rst = new byte[2];
+        // 先写int的最后一个字节
+        rst[0] = (byte)(iValue & 0xFF);
+        // int 倒数第二个字节
+        rst[1] = (byte)((iValue & 0xFF00) >> 8 );
+        return rst;
+    }
+    //转大端返回4个字节数组
+    public static byte[] intToByteBig(int n) {
+        byte[] b = new byte[4];
+        b[0] = (byte) (n >> 24 & 0xff);
+        b[1] = (byte) (n >> 16 & 0xff);
+        b[2] = (byte) (n >> 8 & 0xff);
+        b[3] = (byte) (n & 0xff);
+        return b;
+    }
+    //转小端返回4个字节数组
+    public static byte[] intToByteLittle(int n) {
+        byte[] b = new byte[4];
+        b[0] = (byte) (n & 0xff);
+        b[1] = (byte) (n >> 8 & 0xff);
+        b[2] = (byte) (n >> 16 & 0xff);
+        b[3] = (byte) (n >> 24 & 0xff);
+        return b;
+    }
+
+
+    private static String sfloat(String str){
+        int count = str.length()/2;
+        String last = "";
+        for(int i = count-1;i>=0;i--){
+            String one = str.substring(i*2,(i+1)*2);
+            last+=one;
+        }
+        if(!"".equals(last)) {
+            Float f = Float.intBitsToFloat(new BigInteger(last, 16).intValue());
+            //将科学计算值转可以看懂的数值
+            DecimalFormat fnum = new DecimalFormat("##0.000000");
+            String dd = fnum.format(f);
+            return dd;
+        }
+        return "--";
+    }
+    //将一个int数转换成几个字节数组
+    public static byte[] int2Bytes(int value, int len) {
+        byte b[] = new byte[len];
+        for (int i = 0; i < len; i++) {
+            b[len - i - 1] = (byte) ((value >> 8 * i) & 0xff);
+        }
+        return b;
+    }
+
+    public static String hex(byte[] bytes) {
+        StringBuilder result = new StringBuilder();
+        for (byte aByte : bytes) {
+            result.append(String.format("%02x", aByte));
+        }
+        return result.toString();
+    }
+
+    public static void main(String[] args) {
+        //read5();
+        int arry[] = new int[14];
+        arry[0] = 58196;
+        arry[1] = 16763;
+        arry[2] = 2097;
+        arry[3] = 15532;
+        arry[4] = 524;
+        arry[5] = 16611;
+        arry[6] = 39846;
+        arry[7] = 15300;
+        arry[8] = 35127;
+        arry[9] = 16621;
+        arry[10] = 34079;
+        arry[11] = 16907;
+        arry[12] = 11633;
+        arry[13] = 17435;
+        //convertFloat(arry);
+        System.out.println(sfloat("1f850b42"));
+        System.out.println(sfloat("3F3C26E9"));
+        System.out.println(sfloat("3FC10000"));
+        System.out.println(sfloat("00001EB8"));
+        System.out.println(sfloat("41D7CCCD"));
+        System.out.println(sfloat("420B0000"));
+    }
+}

+ 51 - 0
common/src/main/java/com/jpsoft/education/modules/common/utils/com/vo/RegisterVo.java

@@ -0,0 +1,51 @@
+package com.jpsoft.education.modules.common.utils.com.vo;
+
+public class RegisterVo {
+    private String oilPressure;//1油压
+    private String casingPressure;//2套压
+    private String returnPressure;//3回压
+    private String oilTemperature;//4井口油温
+    private String currentPolished;//5当前悬点载荷
+
+    public String getOilPressure() {
+        return oilPressure;
+    }
+
+    public void setOilPressure(String oilPressure) {
+        this.oilPressure = oilPressure;
+    }
+
+    public String getCasingPressure() {
+        return casingPressure;
+    }
+
+    public void setCasingPressure(String casingPressure) {
+        this.casingPressure = casingPressure;
+    }
+
+    public String getReturnPressure() {
+        return returnPressure;
+    }
+
+    public void setReturnPressure(String returnPressure) {
+        this.returnPressure = returnPressure;
+    }
+
+    public String getOilTemperature() {
+        return oilTemperature;
+    }
+
+    public void setOilTemperature(String oilTemperature) {
+        this.oilTemperature = oilTemperature;
+    }
+
+    public String getCurrentPolished() {
+        return currentPolished;
+    }
+
+    public void setCurrentPolished(String currentPolished) {
+        this.currentPolished = currentPolished;
+    }
+
+
+}

+ 1 - 2
common/src/main/java/com/jpsoft/education/modules/fee/dao/FeeInfoDAO.java

@@ -2,11 +2,10 @@ package com.jpsoft.education.modules.fee.dao;
 
 import java.util.List;
 
+import com.jpsoft.education.modules.common.dto.Sort;
 import com.jpsoft.education.modules.fee.entity.FeeInfo;
 import org.springframework.stereotype.Repository;
-
 import java.util.Map;
-import com.jpsoft.education.modules.common.dto.Sort;
 
 @Repository
 public interface FeeInfoDAO {

+ 23 - 103
common/src/main/java/com/jpsoft/education/modules/fee/entity/FeeInfo.java

@@ -6,112 +6,32 @@ import java.text.SimpleDateFormat;
 import java.math.BigDecimal;
 import org.springframework.format.annotation.DateTimeFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
 
 /**
   描述:t_fee_info的实体类
  */
+@Data
+@ApiModel(value = "t_fee_info的实体类")
 public class FeeInfo {
-	private String feeId;
-	private String feeName;
-	private Date createTime;
-	private Date modifyTime;
-	private String createBy;
-	private String modifyBy;
-	private Boolean delIf;
-	
-		/**
-	 *获取
-	 */
-	public String getFeeId(){
-		return feeId;
-	}
-	
-	/**
-	 *设置
-	 */
-	public void setFeeId(String feeId){
-		this.feeId = feeId;
-	}
-		/**
-	 *获取发票名称
-	 */
-	public String getFeeName(){
-		return feeName;
-	}
-	
-	/**
-	 *设置发票名称
-	 */
-	public void setFeeName(String feeName){
-		this.feeName = feeName;
-	}
-		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
-	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
-		/**
-	 *获取
-	 */
-	public Date getCreateTime(){
-		return createTime;
-	}
-	
-	/**
-	 *设置
-	 */
-	public void setCreateTime(Date createTime){
-		this.createTime = createTime;
-	}
-		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
-	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
-		/**
-	 *获取
-	 */
-	public Date getModifyTime(){
-		return modifyTime;
-	}
-	
-	/**
-	 *设置
-	 */
-	public void setModifyTime(Date modifyTime){
-		this.modifyTime = modifyTime;
-	}
-		/**
-	 *获取
-	 */
-	public String getCreateBy(){
-		return createBy;
-	}
-	
-	/**
-	 *设置
-	 */
-	public void setCreateBy(String createBy){
-		this.createBy = createBy;
-	}
-		/**
-	 *获取
-	 */
-	public String getModifyBy(){
-		return modifyBy;
-	}
-	
-	/**
-	 *设置
-	 */
-	public void setModifyBy(String modifyBy){
-		this.modifyBy = modifyBy;
-	}
-		/**
-	 *获取
-	 */
-	public Boolean getDelIf(){
-		return delIf;
-	}
-	
-	/**
-	 *设置
-	 */
-	public void setDelIf(Boolean delIf){
-		this.delIf = delIf;
-	}
+        @ApiModelProperty(value = "")
+    private String id;
+        @ApiModelProperty(value = "发票名称")
+    private String feeName;
+        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	    @ApiModelProperty(value = "")
+    private Date createTime;
+        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	    @ApiModelProperty(value = "")
+    private Date modifyTime;
+        @ApiModelProperty(value = "")
+    private String createBy;
+        @ApiModelProperty(value = "")
+    private String modifyBy;
+        @ApiModelProperty(value = "")
+    private Boolean delIf;
 }

+ 1 - 1
common/src/main/java/com/jpsoft/education/modules/fee/service/FeeInfoService.java

@@ -13,5 +13,5 @@ public interface FeeInfoService {
 	int update(FeeInfo model);
 	int delete(String id);
 	List<FeeInfo> list();
-	Page<FeeInfo> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,List<Sort> sortList);
+	Page<FeeInfo> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,boolean count,List<Sort> sortList);
 }

+ 3 - 4
common/src/main/java/com/jpsoft/education/modules/fee/service/impl/FeeInfoServiceImpl.java

@@ -11,7 +11,6 @@ import com.jpsoft.education.modules.fee.entity.FeeInfo;
 import com.jpsoft.education.modules.fee.service.FeeInfoService;
 import org.springframework.stereotype.Component;
 import org.springframework.transaction.annotation.Transactional;
-
 import com.github.pagehelper.Page;
 import com.github.pagehelper.PageHelper;
 
@@ -30,7 +29,7 @@ public class FeeInfoServiceImpl implements FeeInfoService {
 	@Override
 	public int insert(FeeInfo model) {
 		// TODO Auto-generated method stub
-		//model.setFeeId(UUID.randomUUID().toString());
+		//model.setId(UUID.randomUUID().toString());
 		
 		return feeInfoDAO.insert(model);
 	}
@@ -62,8 +61,8 @@ public class FeeInfoServiceImpl implements FeeInfoService {
 	}
 		
 	@Override
-	public Page<FeeInfo> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,List<Sort> sortList) {
-        Page<FeeInfo> page = PageHelper.startPage(1,10).doSelectPage(()->{
+	public Page<FeeInfo> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,boolean count,List<Sort> sortList) {
+        Page<FeeInfo> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
             feeInfoDAO.search(searchParams,sortList);
         });
         

+ 12 - 12
common/src/main/resources/mapper/fee/FeeInfo.xml

@@ -2,9 +2,9 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <!-- namespace必须指向DAO接口 -->
-<mapper namespace="com.jpsoft.education.modules.fee.dao.FeeInfoDAO">
-	<resultMap id="FeeInfoMap" type="com.jpsoft.education.modules.fee.entity.FeeInfo">
-		<id property="feeId" column="fee_id" />
+<mapper namespace="com.jpsoft.education.fee.dao.FeeInfoDAO">
+	<resultMap id="FeeInfoMap" type="com.jpsoft.education.fee.entity.FeeInfo">
+		<id property="id" column="id_" />
 			<result property="feeName" column="fee_name" />
 			<result property="createTime" column="create_time" />
 			<result property="modifyTime" column="modify_time" />
@@ -12,18 +12,18 @@
 			<result property="modifyBy" column="modify_by" />
 			<result property="delIf" column="del_if" />
 			</resultMap>
-	<insert id="insert" parameterType="com.jpsoft.education.modules.fee.entity.FeeInfo">
+	<insert id="insert" parameterType="com.jpsoft.education.fee.entity.FeeInfo">
 	<!--
-	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="feeId">
+	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
 		select sys_guid() from dual
 	</selectKey>
 	-->
 	<![CDATA[
 		insert into t_fee_info
-	    (fee_id,fee_name,create_time,modify_time,create_by,modify_by,del_if)
+	    (id_,fee_name,create_time,modify_time,create_by,modify_by,del_if)
 		values
 		(
-#{feeId,jdbcType=VARCHAR}
+#{id,jdbcType=VARCHAR}
 ,#{feeName,jdbcType=VARCHAR}
 ,#{createTime,jdbcType= TIMESTAMP }
 ,#{modifyTime,jdbcType= TIMESTAMP }
@@ -34,9 +34,9 @@
 	]]>
 	</insert>
 	<delete id="delete" parameterType="string">
-		delete from t_fee_info where fee_id=#{feeId,jdbcType=VARCHAR}
+		delete from t_fee_info where id_=#{id,jdbcType=VARCHAR}
 	</delete>
-	<update id="update" parameterType="com.jpsoft.education.modules.fee.entity.FeeInfo">
+	<update id="update" parameterType="com.jpsoft.education.fee.entity.FeeInfo">
 		update t_fee_info
 		<set>
 				<if test="feeName!=null">
@@ -58,14 +58,14 @@
 		del_if=#{delIf,jdbcType= NUMERIC },
 		</if>
 		</set>
-	where fee_id=#{feeId}
+	where id_=#{id}
 	</update>
 	<select id="get" parameterType="string" resultMap="FeeInfoMap">
 		select 
-fee_id,fee_name,create_time,modify_time,create_by,modify_by,del_if		from t_fee_info where fee_id=#{0}
+id_,fee_name,create_time,modify_time,create_by,modify_by,del_if		from t_fee_info where id_=#{0}
 	</select>
 	<select id="exist" parameterType="string" resultType="int">
-		select count(*) from t_fee_info where fee_id=#{0}
+		select count(*) from t_fee_info where id_=#{0}
 	</select>
 	<select id="list" resultMap="FeeInfoMap">
 		select * from t_fee_info

+ 77 - 44
web/src/main/java/com/jpsoft/education/modules/fee/controller/FeeInfoController.java

@@ -1,15 +1,14 @@
 package com.jpsoft.education.modules.fee.controller;
 
 import com.github.pagehelper.Page;
-
 import com.jpsoft.education.modules.common.dto.MessageResult;
 import com.jpsoft.education.modules.common.dto.Sort;
+import com.jpsoft.education.modules.common.utils.PojoUtils;
 import com.jpsoft.education.modules.fee.entity.FeeInfo;
 import com.jpsoft.education.modules.fee.service.FeeInfoService;
+import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-
 import org.apache.commons.lang3.StringUtils;
-import org.apache.ibatis.mapping.ResultMap;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -21,20 +20,37 @@ import java.util.*;
 
 @RestController
 @RequestMapping("/feeInfo")
+@Api(description = "feeInfo")
 public class FeeInfoController {
     private Logger logger = LoggerFactory.getLogger(getClass());
 
     @Autowired
     private FeeInfoService feeInfoService;
 
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<FeeInfo> create(){
+        MessageResult<FeeInfo> msgResult = new MessageResult<>();
+
+        FeeInfo feeInfo = new FeeInfo();
+
+        msgResult.setData(feeInfo);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
     @ApiOperation(value="添加信息")
     @PostMapping("add")
-    public MessageResult<FeeInfo> add(@ModelAttribute FeeInfo feeInfo){
+    public MessageResult<FeeInfo> add(@RequestBody FeeInfo feeInfo,@RequestAttribute String subject){
         MessageResult<FeeInfo> msgResult = new MessageResult<>();
 
         try {
-            feeInfo.setFeeId(UUID.randomUUID().toString());
-
+            feeInfo.setId(UUID.randomUUID().toString());
+            feeInfo.setDelIf(false);
+            feeInfo.setCreateBy(subject);
+            feeInfo.setCreateTime(new Date());
+            
             int affectCount = feeInfoService.insert(feeInfo);
 
             if (affectCount > 0) {
@@ -56,8 +72,8 @@ public class FeeInfoController {
     }
 
     @ApiOperation(value="获取信息")
-    @GetMapping("detail/{id}")
-    public MessageResult<FeeInfo> detail(@PathVariable("id") String id){
+    @GetMapping("edit/{id}")
+    public MessageResult<FeeInfo> edit(@PathVariable("id") String id){
         MessageResult<FeeInfo> msgResult = new MessageResult<>();
 
         try {
@@ -83,10 +99,13 @@ public class FeeInfoController {
 
     @ApiOperation(value="更新用户")
     @PostMapping("update")
-    public MessageResult<FeeInfo> update(@ModelAttribute FeeInfo feeInfo){
+    public MessageResult<FeeInfo> update(@RequestBody FeeInfo feeInfo,@RequestAttribute String subject){
         MessageResult<FeeInfo> msgResult = new MessageResult<>();
 
         try {
+            feeInfo.setModifyBy(subject);
+            feeInfo.setModifyTime(new Date());
+            
             int affectCount = feeInfoService.update(feeInfo);
 
             if (affectCount > 0) {
@@ -107,19 +126,25 @@ public class FeeInfoController {
         return msgResult;
     }
 
-    @ApiOperation(value="删除用户")
+	@ApiOperation(value="删除")
     @PostMapping("delete/{id}")
-    public MessageResult<FeeInfo> delete(@PathVariable("id") String id){
-        MessageResult<FeeInfo> msgResult = new MessageResult<>();
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
 
         try {
-            int affectCount = feeInfoService.delete(id);
+            FeeInfo feeInfo = feeInfoService.get(id);
+            feeInfo.setDelIf(true);
+            feeInfo.setModifyBy(subject);
+            feeInfo.setModifyTime(new Date());
+
+            int affectCount = feeInfoService.update(feeInfo);
 
             if (affectCount > 0) {
                 msgResult.setResult(true);
+                msgResult.setData(affectCount);
             } else {
                 msgResult.setResult(false);
-                msgResult.setMessage("数据库删除失败");
+                msgResult.setMessage("删除失败");
             }
         }
         catch(Exception ex){
@@ -134,58 +159,66 @@ public class FeeInfoController {
 
 
     @ApiOperation(value="批量删除")
-    @PostMapping("batchDelete/{id}")
-    public MessageResult<FeeInfo> batchDelete(@PathVariable("id") String id){
-        MessageResult<FeeInfo> msgResult = new MessageResult<>();
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
 
-        msgResult.setResult(false);
-        msgResult.setMessage("未实现");
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                FeeInfo feeInfo = feeInfoService.get(id);
+                feeInfo.setDelIf(true);
+                feeInfo.setModifyBy(subject);
+                feeInfo.setModifyTime(new Date());
+
+                affectCount += feeInfoService.update(feeInfo);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
 
         return msgResult;
     }
 
     @ApiOperation(value="列表")
-    @RequestMapping(value = "list",method = RequestMethod.POST)
-    public MessageResult<Map> list(
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
             String id,
-            @RequestParam(value="draw",defaultValue="1") int draw,
-            @RequestParam(value="start",defaultValue="1") int start,
-            @RequestParam(value="length",defaultValue="20") int length,
-            HttpServletRequest request){
-        String subject = (String)request.getAttribute("subject");
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
 
         //当前用户ID
         System.out.println(subject);
 
         MessageResult<Map> msgResult = new MessageResult<>();
 
-        Map<String,Object> searchParms = new HashMap<>();
+        Map<String,Object> searchParams = new HashMap<>();
 
         List<Sort> sortList = new ArrayList<>();
         sortList.add(new Sort("id_","asc"));
 
         if (StringUtils.isNotEmpty(id)) {
-            searchParms.put("id","%" + id + "%");
+            searchParams.put("id","%" + id + "%");
         }
 
-        int pageNum = start / length;
-
-        if (start % length != 0) {
-            pageNum++;
-        }
-
-        int pageSize = length;
-
-        Page<FeeInfo> page = feeInfoService.pageSearch(searchParms,pageNum,pageSize,sortList);
-
-        HashMap<String, Object> wrapper = new HashMap<String, Object>();
-        wrapper.put("draw",draw);
-        wrapper.put("recordsTotal", page.getTotal());
-        wrapper.put("recordsFiltered", page.getTotal());
-        wrapper.put("data", page.getResult());
+        Page<FeeInfo> page = feeInfoService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
 
         msgResult.setResult(true);
-        msgResult.setData(wrapper);
+        msgResult.setData(PojoUtils.pageWrapper(page));
 
         return msgResult;
     }