Selaa lähdekoodia

Merge remote-tracking branch 'origin/V1' into V1

jz.kai 5 vuotta sitten
vanhempi
commit
f107ff1f24

+ 1 - 0
common/src/main/java/com/jpsoft/smart/modules/base/dao/CompanyPositionDAO.java

@@ -13,6 +13,7 @@ public interface CompanyPositionDAO {
 	int exist(String id);
 	CompanyPosition get(String id);
 	int delete(String id);
+	List<CompanyPosition> findByCompanyId(String companyId);
 	List<CompanyPosition> list();
 	List<CompanyPosition> search(Map<String, Object> searchParams, List<Sort> sortList);
 }

+ 5 - 0
common/src/main/java/com/jpsoft/smart/modules/base/entity/AlarmConfig.java

@@ -23,6 +23,11 @@ public class AlarmConfig {
      */
     @ApiModelProperty(value = "单位编号")
     private String companyId;
+    /**
+     * 单位名称
+     */
+    @ApiModelProperty(value = "单位名称")
+    private String companyName;
     /**
      * 星期几提醒,可以设置多个
      */

+ 1 - 0
common/src/main/java/com/jpsoft/smart/modules/base/service/CompanyPositionService.java

@@ -12,6 +12,7 @@ public interface CompanyPositionService {
 	int insert(CompanyPosition model);
 	int update(CompanyPosition model);
 	int delete(String id);
+	List<CompanyPosition> findByCompanyId(String companyId);
 	List<CompanyPosition> list();
 	Page<CompanyPosition> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize,boolean count, List<Sort> sortList);
 }

+ 5 - 0
common/src/main/java/com/jpsoft/smart/modules/base/service/impl/CompanyPositionServiceImpl.java

@@ -52,6 +52,11 @@ public class CompanyPositionServiceImpl implements CompanyPositionService {
 		
 		return count > 0 ? true : false;
 	}
+
+	@Override
+	public List<CompanyPosition> findByCompanyId(String companyId){
+		return companyPositionDAO.findByCompanyId(companyId);
+	}
 	
 	@Override
 	public List<CompanyPosition> list() {

+ 17 - 17
common/src/main/java/com/jpsoft/smart/modules/base/service/impl/PersonDeviceLogServiceImpl.java

@@ -131,23 +131,23 @@ public class PersonDeviceLogServiceImpl implements PersonDeviceLogService {
                 throw new Exception(personDeviceLog.getDeviceNo() + "设备不存在");
             }
             List<WarningPusher> warningPusherList = warningPusherService.findByCompanyId(personInfo.getCompanyId());
-            if (warningPusherList.size() <= 0) {
-                throw new Exception("对应公司没有体温报警监管者");
-            }
-
-            for (WarningPusher warningPusher : warningPusherList) {
-                Map<String, Object> searchParams = new HashMap<>();
-                searchParams.put("deviceNo", personDeviceLog.getDeviceNo());
-                searchParams.put("personId", personDeviceLog.getPersonId());
-                searchParams.put("minTemperature", warningPusher.getTemperature());
-                searchParams.put("beginTime", new Date(personDeviceLog.getRecordTime().getTime() - 300000));
-                List<Sort> sortList = new ArrayList<>();
-                sortList.add(new Sort("record_time", "desc"));
-                List<PersonDeviceLog> personDeviceLogList = personDeviceLogDAO.search(searchParams, sortList);
-
-                if (personDeviceLogList.size() >= warningPusher.getTimes()) {
-                    log.warn("开始发送模板消息");
-                    WechatMessageUtil.sendTemperatureAlarmInfo(warningPusher.getOpenId(), companyInfo.getName() + "_" + deviceInfo.getAliasName(), wxConfig.getAppId(), wxConfig.getAppSecret(),personDeviceLog.getId());
+            if (warningPusherList.size() > 0) {
+
+
+                for (WarningPusher warningPusher : warningPusherList) {
+                    Map<String, Object> searchParams = new HashMap<>();
+                    searchParams.put("deviceNo", personDeviceLog.getDeviceNo());
+                    searchParams.put("personId", personDeviceLog.getPersonId());
+                    searchParams.put("minTemperature", warningPusher.getTemperature());
+                    searchParams.put("beginTime", new Date(personDeviceLog.getRecordTime().getTime() - 300000));
+                    List<Sort> sortList = new ArrayList<>();
+                    sortList.add(new Sort("record_time", "desc"));
+                    List<PersonDeviceLog> personDeviceLogList = personDeviceLogDAO.search(searchParams, sortList);
+
+                    if (personDeviceLogList.size() >= warningPusher.getTimes()) {
+                        log.warn("开始发送模板消息");
+                        WechatMessageUtil.sendTemperatureAlarmInfo(warningPusher.getOpenId(), companyInfo.getName() + "_" + deviceInfo.getAliasName(), wxConfig.getAppId(), wxConfig.getAppSecret(), personDeviceLog.getId());
+                    }
                 }
             }
 

+ 24 - 17
common/src/main/java/com/jpsoft/smart/modules/common/utils/LApiUtil.java

@@ -144,26 +144,32 @@ public class LApiUtil {
     }
 
     public static Integer getPersonCode(cn.hutool.json.JSONObject libMatInfoListJson, cn.hutool.json.JSONObject matchPersonInfo){
-        if (!libMatInfoListJson.getStr("MatchPersonID").equals("0") && org.apache.commons.lang3.StringUtils.isNotBlank(matchPersonInfo.getStr("PersonCode"))){
-            return matchPersonInfo.getInt("PersonCode");
-
-        }else if (!libMatInfoListJson.getStr("MatchPersonID").equals("0") && org.apache.commons.lang3.StringUtils.isBlank(matchPersonInfo.getStr("PersonCode")) && StringUtils.isNotBlank(matchPersonInfo.getStr("PersonName"))){
-            String personName = matchPersonInfo.getStr("PersonName");
-            if (personName.contains("_")){
-                log.warn(personName+"校验成功但未找到personCode");
-                Integer personId =Integer.valueOf(personName.substring(personName.indexOf("_")+1)) ;
-                return personId;
-            }else {
-                log.warn(personName+"校验成功但姓名中无personCode后缀");
-                return 0;
-            }
+        if (org.apache.commons.lang.StringUtils.isNotBlank(libMatInfoListJson.getStr("MatchPersonID"))){
+            if (!libMatInfoListJson.getStr("MatchPersonID").equals("0") && org.apache.commons.lang3.StringUtils.isNotBlank(matchPersonInfo.getStr("PersonCode"))){
+                return matchPersonInfo.getInt("PersonCode");
+
+            }else if (!libMatInfoListJson.getStr("MatchPersonID").equals("0") && org.apache.commons.lang3.StringUtils.isBlank(matchPersonInfo.getStr("PersonCode")) && StringUtils.isNotBlank(matchPersonInfo.getStr("PersonName"))){
+                String personName = matchPersonInfo.getStr("PersonName");
+                if (personName.contains("_")){
+                    log.warn(personName+"校验成功但未找到personCode");
+                    Integer personId =Integer.valueOf(personName.substring(personName.indexOf("_")+1)) ;
+                    return personId;
+                }else {
+                    log.warn(personName+"校验成功但姓名中无personCode后缀");
+                    return 0;
+                }
 
 
-        }
+            }
 
-        else {
+            else {
+                return 0;
+            }
+        }else {
             return 0;
         }
+
+
     }
 
     public static boolean compareToInterval(BigDecimal bigDecimal, Integer min,Integer max){
@@ -185,8 +191,9 @@ public class LApiUtil {
       // long time = date.getTime();
      //   System.out.println(date);
       //  192.168.11.13:80/V1.0/PeopleLibraries/1584409665/People/1111?LastChange=1584428390872
-        boolean success = LApiUtil.compareToInterval(new BigDecimal(36.3),36,37);
-        System.out.println(success);
+        cn.hutool.json.JSONObject jsonObject = new cn.hutool.json.JSONObject();
+        Integer integer = getPersonCode(jsonObject,jsonObject);
+        System.out.println(integer);
 
     }
 

+ 6 - 0
common/src/main/java/com/jpsoft/smart/modules/common/utils/WeixinUtil.java

@@ -265,6 +265,12 @@ public class WeixinUtil {
 	}
 
 
+	/**
+	 * 创建微信菜单
+	 * @param appid
+	 * @param appSecret
+	 * @return
+	 */
 	public static String createMenu(String appid,String appSecret){
 		AccessToken token = WeixinUtil.getAccessToken(appid, appSecret);
 

+ 12 - 8
common/src/main/resources/mapper/base/AlarmConfig.xml

@@ -6,6 +6,7 @@
     <resultMap id="AlarmConfigMap" type="com.jpsoft.smart.modules.base.entity.AlarmConfig">
         <result property="id" column="id_"/>
         <result property="companyId" column="company_id"/>
+        <result property="companyName" column="company_name"/>
         <result property="weekdays" column="weekdays_"/>
         <result property="startTime" column="start_time"/>
         <result property="endTime" column="end_time"/>
@@ -40,7 +41,7 @@
 	]]>
     </insert>
     <delete id="delete" parameterType="string">
-        delete from base_alarm_config where ${pkField.columnName}=#{$pkFieldName,jdbcType=VARCHAR}
+        delete from base_alarm_config where id_=#{id,jdbcType=VARCHAR}
     </delete>
     <update id="update" parameterType="com.jpsoft.smart.modules.base.entity.AlarmConfig">
         update base_alarm_config
@@ -76,26 +77,29 @@
                 update_time=#{updateTime,jdbcType= TIMESTAMP },
             </if>
         </set>
-        where ${pkField.ColumnName}=#{$pkFieldName}
+        where id_=#{id}
     </update>
     <select id="get" parameterType="string" resultMap="AlarmConfigMap">
-        select
-        id_,company_id,weekdays_,start_time,end_time,del_flag,create_by,create_time,update_by,update_time from
-        base_alarm_config where ${pkField.ColumnName}=#{0}
+        select * from base_alarm_config where id_=#{0}  and del_flag=0
     </select>
     <select id="exist" parameterType="string" resultType="int">
-        select count(*) from base_alarm_config where ${pkField.ColumnName}=#{0}
+        select count(*) from base_alarm_config where id_=#{0}  and del_flag=0
     </select>
     <select id="list" resultMap="AlarmConfigMap">
         select * from base_alarm_config where del_flag=0
     </select>
     <select id="search" parameterType="hashmap" resultMap="AlarmConfigMap">
         <![CDATA[
-			select * from base_alarm_config
+			select a.*,b.name_ as company_name from base_alarm_config a left join base_company_info b
+			on a.company_id = b.id_
 		]]>
         <where>
+            a.del_flag = 0
             <if test="searchParams.id != null">
-                and ID_ like #{searchParams.id}
+                and a.ID_ like #{searchParams.id}
+            </if>
+            <if test="searchParams.companyId != null">
+                and a.company_id = #{searchParams.companyId}
             </if>
         </where>
         <foreach item="sort" collection="sortList" open="order by" separator=",">

+ 8 - 4
common/src/main/resources/mapper/base/CompanyPosition.xml

@@ -86,20 +86,20 @@
 	where id_=#{id}
 	</update>
 	<select id="get" parameterType="string" resultMap="CompanyPositionMap">
-		select 
-id_,company_id,position1_name,position2_name,position3_name,position4_name,position5_name,create_by,create_time,update_by,update_time,del_flag		from base_company_position where id_=#{0}
+		select * from base_company_position where id_=#{0} and del_flag = 0
 	</select>
 	<select id="exist" parameterType="string" resultType="int">
-		select count(*) from base_company_position where id_=#{0}
+		select count(*) from base_company_position where id_=#{0} and del_flag = 0
 	</select>
 	<select id="list" resultMap="CompanyPositionMap">
-		select * from base_company_position
+		select * from base_company_position and del_flag = 0
 	</select>
 	<select id="search" parameterType="hashmap" resultMap="CompanyPositionMap">
 		<![CDATA[
 			select * from base_company_position
 		]]>
 		<where>
+			del_flag = 0
 			<if test="searchParams.companyId != null">
 				and company_id like #{searchParams.companyId}
 			</if>
@@ -108,4 +108,8 @@ id_,company_id,position1_name,position2_name,position3_name,position4_name,posit
 	        ${sort.name} ${sort.order}
 	 	</foreach>
 	</select>
+
+	<select id="findByCompanyId" parameterType="string" resultMap="CompanyPositionMap">
+		select * from base_company_position where company_id=#{companyId} and del_flag = 0
+	</select>
 </mapper>

+ 234 - 0
web/src/main/java/com/jpsoft/smart/modules/base/controller/AlarmConfigController.java

@@ -0,0 +1,234 @@
+package com.jpsoft.smart.modules.base.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.smart.modules.base.entity.AlarmConfig;
+import com.jpsoft.smart.modules.base.entity.OwnerInfo;
+import com.jpsoft.smart.modules.base.service.AlarmConfigService;
+import com.jpsoft.smart.modules.base.service.AlarmConfigService;
+import com.jpsoft.smart.modules.base.service.OwnerInfoService;
+import com.jpsoft.smart.modules.common.dto.MessageResult;
+import com.jpsoft.smart.modules.common.dto.Sort;
+import com.jpsoft.smart.modules.common.utils.PojoUtils;
+import com.jpsoft.smart.modules.common.utils.WechatMessageUtil;
+import com.jpsoft.smart.modules.wechat.entity.AccessControl;
+import com.jpsoft.smart.modules.wechat.service.IAccessControlService;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+@RestController
+@RequestMapping("/base/alarmConfig")
+public class AlarmConfigController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private AlarmConfigService alarmConfigService;
+
+   
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<AlarmConfig> create(){
+        MessageResult<AlarmConfig> msgResult = new MessageResult<>();
+
+        AlarmConfig alarmConfig = new AlarmConfig();
+
+        msgResult.setData(alarmConfig);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<AlarmConfig> add(@RequestBody AlarmConfig alarmConfig,@RequestAttribute String subject){
+        MessageResult<AlarmConfig> msgResult = new MessageResult<>();
+
+        try {
+            alarmConfig.setId(UUID.randomUUID().toString());
+            alarmConfig.setDelFlag(false);
+            alarmConfig.setCreateBy(subject);
+            alarmConfig.setCreateTime(new Date());
+            
+            int affectCount = alarmConfigService.insert(alarmConfig);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(alarmConfig);
+            } 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="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<AlarmConfig> edit(@PathVariable("id") String id){
+        MessageResult<AlarmConfig> msgResult = new MessageResult<>();
+
+        try {
+            AlarmConfig alarmConfig = alarmConfigService.get(id);
+
+            if (alarmConfig != null) {
+                msgResult.setResult(true);
+                msgResult.setData(alarmConfig);
+            } 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="更新用户")
+    @PostMapping("update")
+    public MessageResult<AlarmConfig> update(@RequestBody AlarmConfig alarmConfig,@RequestAttribute String subject){
+        MessageResult<AlarmConfig> msgResult = new MessageResult<>();
+
+        try {
+            alarmConfig.setUpdateBy(subject);
+            alarmConfig.setUpdateTime(new Date());
+            
+            int affectCount = alarmConfigService.update(alarmConfig);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(alarmConfig);
+            } 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="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            AlarmConfig alarmConfig = alarmConfigService.get(id);
+            alarmConfig.setDelFlag(true);
+            alarmConfig.setUpdateBy(subject);
+            alarmConfig.setUpdateTime(new Date());
+
+            int affectCount = alarmConfigService.update(alarmConfig);
+
+            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="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                AlarmConfig alarmConfig = alarmConfigService.get(id);
+                alarmConfig.setDelFlag(true);
+                alarmConfig.setUpdateBy(subject);
+                alarmConfig.setUpdateTime(new Date());
+
+                affectCount += alarmConfigService.update(alarmConfig);
+            }
+
+            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 = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String id,
+            @RequestParam(value="companyId",defaultValue="") String companyId,
+            @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> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("a.company_id,a.create_time","desc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id","%" + id + "%");
+        }
+
+        if (StringUtils.isNotEmpty(companyId)) {
+            searchParams.put("companyId",companyId);
+        }
+
+        Page<AlarmConfig> page = alarmConfigService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+
+}

+ 51 - 7
web/src/main/java/com/jpsoft/smart/modules/base/controller/PersonDeviceLogController.java

@@ -1,11 +1,13 @@
 package com.jpsoft.smart.modules.base.controller;
 
 
+import com.alipay.api.domain.Person;
 import com.github.pagehelper.Page;
 import com.github.pagehelper.util.StringUtil;
 import com.jpsoft.smart.config.OSSConfig;
-import com.jpsoft.smart.modules.base.entity.DeviceInfo;
-import com.jpsoft.smart.modules.base.entity.PersonDeviceLog;
+import com.jpsoft.smart.modules.base.entity.*;
+import com.jpsoft.smart.modules.base.service.CompanyInfoService;
+import com.jpsoft.smart.modules.base.service.CompanyPositionService;
 import com.jpsoft.smart.modules.base.service.DeviceInfoService;
 import com.jpsoft.smart.modules.base.service.PersonDeviceLogService;
 import com.jpsoft.smart.modules.common.dto.MessageResult;
@@ -55,6 +57,13 @@ public class PersonDeviceLogController {
     @Autowired
     private DeviceInfoService deviceInfoService;
 
+    @Autowired
+    private CompanyInfoService companyInfoService;
+
+    @Autowired
+    private CompanyPositionService companyPositionService;
+
+
     @ApiOperation(value="列表")
     @RequestMapping(value = "pageList",method = RequestMethod.POST)
     @ApiImplicitParams({
@@ -178,13 +187,14 @@ public class PersonDeviceLogController {
                                 String timeRanges,String temperatureRanges,
                                 @RequestAttribute String subject) {
         MessageResult<String> msgResult = new MessageResult<>();
-
         try {
+            User user = userService.get(subject);
+            String companyId = user.getCompanyId();
+
             HSSFWorkbook workbook = new HSSFWorkbook();
             HSSFSheet sheet = workbook.createSheet();
             //表头
             HSSFRow rowTitle = sheet.createRow(0);
-
             HSSFCell cellTitle1 = rowTitle.createCell(0);
             cellTitle1.setCellValue("序号");
             HSSFCell cellTitle2 = rowTitle.createCell(1);
@@ -201,6 +211,27 @@ public class PersonDeviceLogController {
             cellTitle7.setCellValue("拍照图片");
 
 
+            //获取公司
+            //五级位置
+            //CompanyInfo companyInfo = companyInfoService.get(companyId);
+            List<CompanyPosition> companyPositionList = companyPositionService.findByCompanyId(companyId);
+            CompanyPosition companyPosition = null;
+            if(companyPositionList.size() > 0){
+                companyPosition = companyPositionList.get(0);
+                HSSFCell cellTitle8 = rowTitle.createCell(7);
+                cellTitle8.setCellValue(companyPosition.getPosition1Name());
+                HSSFCell cellTitle9 = rowTitle.createCell(8);
+                cellTitle9.setCellValue(companyPosition.getPosition2Name());
+                HSSFCell cellTitle10 = rowTitle.createCell(9);
+                cellTitle10.setCellValue(companyPosition.getPosition3Name());
+                HSSFCell cellTitle11 = rowTitle.createCell(10);
+                cellTitle11.setCellValue(companyPosition.getPosition4Name());
+                HSSFCell cellTitle12 = rowTitle.createCell(11);
+                cellTitle12.setCellValue(companyPosition.getPosition5Name());
+            }
+
+
+
             //表内容
             Map<String,Object> searchParams = new HashMap<>();
 
@@ -210,9 +241,6 @@ public class PersonDeviceLogController {
             //为公司管理员
             boolean is_admin = userService.hasRole(subject,"ADMIN");
             if(is_admin){
-                User user = userService.get(subject);
-                String companyId = user.getCompanyId();
-
                 List<DeviceInfo> deviceInfoList = deviceInfoService.findByCompanyId(companyId);
                 List<String> deviceIdList = new ArrayList<String>();
                 if(deviceInfoList.size() > 0) {
@@ -308,6 +336,22 @@ public class PersonDeviceLogController {
                 HSSFCell cellContent7 = rowContent.createCell(6);
                 cellContent7.setCellValue(personDeviceLog.getFaceImage());
 
+                //五级位置
+                //判断 如果公司没有五级位置 就不做展示
+                if(companyPositionList.size() > 0) {
+                    PersonInfo person = personDeviceLog.getPerson();
+                    HSSFCell cellContent8 = rowContent.createCell(7);
+                    cellContent8.setCellValue(person.getPosition1());
+                    HSSFCell cellContent9 = rowContent.createCell(8);
+                    cellContent9.setCellValue(person.getPosition2());
+                    HSSFCell cellContent10 = rowContent.createCell(9);
+                    cellContent10.setCellValue(person.getPosition3());
+                    HSSFCell cellContent11 = rowContent.createCell(10);
+                    cellContent11.setCellValue(person.getPosition4());
+                    HSSFCell cellContent12 = rowContent.createCell(11);
+                    cellContent12.setCellValue(person.getPosition5());
+                }
+
                 sheet.autoSizeColumn(i);
             }