Explorar el Código

feat:support quiz result for pkg status page

shc hace 1 año
padre
commit
2ad4dd788d

+ 102 - 115
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/controller/WmScorePackageStatusController.java

@@ -1,20 +1,3 @@
-/*
- *    Copyright (c) 2018-2025, hnqz All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * Neither the name of the pig4cloud.com developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: hnqz
- */
-
 package com.qunzhixinxi.hnqz.admin.controller;
 
 import cn.hutool.core.collection.CollectionUtil;
@@ -53,35 +36,32 @@ import java.util.stream.Collectors;
 /**
  * 积分包状态
  *
- * @author pigx code generator
  * @date 2020-07-17 23:32:01
  */
 @RestController
 @AllArgsConstructor
-@RequestMapping("/wmscorepackagestatus" )
-@Api(value = "wmscorepackagestatus", tags = "积分包状态管理")
+@RequestMapping("/wmscorepackagestatus")
 public class WmScorePackageStatusController {
 
-    private final  WmScorePackageStatusService wmScorePackageStatusService;
+	private final WmScorePackageStatusService wmScorePackageStatusService;
 	private final WmScorePackageService wmScorePackageService;
 	private final WmTeamService wmTeamService;
 
 	/**
-     * 分页查询
-     * @param page 分页对象
-     * @param wmScorePackageStatus 积分包状态
-     * @return
-     */
-    @ApiOperation(value = "分页查询", notes = "分页查询")
-    @GetMapping("/page" )
-    public R getWmScorePackageStatusPage(Page page, WmScorePackageStatus wmScorePackageStatus) {
-		OrderItem orderItem=new OrderItem();
+	 * 分页查询
+	 *
+	 * @param page                 分页对象
+	 * @param wmScorePackageStatus 积分包状态
+	 * @return 领包记录分页
+	 */
+	@GetMapping("/page")
+	public R<?> getWmScorePackageStatusPage(Page page, WmScorePackageStatus wmScorePackageStatus) {
+		OrderItem orderItem = new OrderItem();
 		orderItem.setColumn("create_time");
 		orderItem.setAsc(false);
 		page.addOrder(orderItem);
 		Integer userId = SecurityUtils.getUser().getId();
 		Integer deptId = SecurityUtils.getUser().getDeptId();
-//		wmScorePackageStatus.setUserId(String.valueOf(userId));
 		wmScorePackageStatus.setDeptId(String.valueOf(deptId));
 		// 判断当前用户是否配置了团队负责人
 		List<WmTeam> teamList = wmTeamService.list(Wrappers.<WmTeam>lambdaQuery()
@@ -94,86 +74,90 @@ public class WmScorePackageStatusController {
 			List<String> teamIdList = teamList.stream().map(wmTeam -> String.valueOf(wmTeam.getId())).collect(Collectors.toList());
 			wmScorePackageStatus.setTeamIdList(teamIdList);
 		}
-        return R.ok(wmScorePackageStatusService.getWmScorePackageStatusPage(page, wmScorePackageStatus));
-    }
-
-
-    /**
-     * 通过id查询积分包状态
-     * @param id id
-     * @return R
-     */
-    @ApiOperation(value = "通过id查询", notes = "通过id查询")
-    @GetMapping("/{id}" )
-    public R getById(@PathVariable("id" ) Integer id) {
-        return R.ok(wmScorePackageStatusService.getById(id));
-    }
-
-    /**
-     * 新增积分包状态
-     * @param wmScorePackageStatus 积分包状态
-     * @return R
-     */
-    @ApiOperation(value = "新增积分包状态", notes = "新增积分包状态")
-    @SysLog("新增积分包状态" )
-    @PostMapping
-    public R save(@RequestBody WmScorePackageStatus wmScorePackageStatus) {
+		return R.ok(wmScorePackageStatusService.getWmScorePackageStatusPage(page, wmScorePackageStatus));
+	}
+
+
+	/**
+	 * 通过id查询积分包状态
+	 *
+	 * @param id id
+	 * @return R
+	 */
+	@ApiOperation(value = "通过id查询", notes = "通过id查询")
+	@GetMapping("/{id}")
+	public R getById(@PathVariable("id") Integer id) {
+		return R.ok(wmScorePackageStatusService.getById(id));
+	}
+
+	/**
+	 * 新增积分包状态
+	 *
+	 * @param wmScorePackageStatus 积分包状态
+	 * @return R
+	 */
+	@ApiOperation(value = "新增积分包状态", notes = "新增积分包状态")
+	@SysLog("新增积分包状态")
+	@PostMapping
+	public R save(@RequestBody WmScorePackageStatus wmScorePackageStatus) {
 		wmScorePackageStatus.setCreateTime(LocalDateTime.now());
-        return R.ok(wmScorePackageStatusService.save(wmScorePackageStatus));
-    }
-
-    /**
-     * 修改积分包状态
-     * @param wmScorePackageStatus 积分包状态
-     * @return R
-     */
-    @ApiOperation(value = "修改积分包状态", notes = "修改积分包状态")
-    @SysLog("修改积分包状态" )
-    @PutMapping
-    public R updateById(@RequestBody WmScorePackageStatus wmScorePackageStatus) {
-			boolean answer=wmScorePackageStatusService.updateById(wmScorePackageStatus);
-			if(answer)
-			{
-				WmScorePackage wmScorePackage=wmScorePackageService.getById(wmScorePackageStatus.getPackageId());
-				if("2".equals(wmScorePackageStatus.getStatus())) {
-					wmScorePackage.setZbId(wmScorePackageStatus.getUserId());
-					wmScorePackage.setPackageStatus("2");
-					wmScorePackage.setUpdateTime(LocalDateTime.now());
-					wmScorePackage.setReceiveDate(LocalDateTime.now());
-					wmScorePackage.setIsConduct("1");
-				}else{
-					wmScorePackage.setPackageStatus(null);
-					wmScorePackage.setIsConduct(null);
-				}
-				wmScorePackageService.updateById(wmScorePackage);
+		return R.ok(wmScorePackageStatusService.save(wmScorePackageStatus));
+	}
 
+	/**
+	 * 修改积分包状态
+	 *
+	 * @param wmScorePackageStatus 积分包状态
+	 * @return R
+	 */
+	@ApiOperation(value = "修改积分包状态", notes = "修改积分包状态")
+	@SysLog("修改积分包状态")
+	@PutMapping
+	public R updateById(@RequestBody WmScorePackageStatus wmScorePackageStatus) {
+		boolean answer = wmScorePackageStatusService.updateById(wmScorePackageStatus);
+		if (answer) {
+			WmScorePackage wmScorePackage = wmScorePackageService.getById(wmScorePackageStatus.getPackageId());
+			if ("2".equals(wmScorePackageStatus.getStatus())) {
+				wmScorePackage.setZbId(wmScorePackageStatus.getUserId());
+				wmScorePackage.setPackageStatus("2");
+				wmScorePackage.setUpdateTime(LocalDateTime.now());
+				wmScorePackage.setReceiveDate(LocalDateTime.now());
+				wmScorePackage.setIsConduct("1");
+			} else {
+				wmScorePackage.setPackageStatus(null);
+				wmScorePackage.setIsConduct(null);
 			}
-        return R.ok();
-    }
-
-    /**
-     * 通过id删除积分包状态
-     * @param id id
-     * @return R
-     */
-    @ApiOperation(value = "通过id删除积分包状态", notes = "通过id删除积分包状态")
-    @SysLog("通过id删除积分包状态" )
-    @DeleteMapping("/{id}" )
-    public R removeById(@PathVariable Integer id) {
-        return R.ok(wmScorePackageStatusService.removeById(id));
-    }
+			wmScorePackageService.updateById(wmScorePackage);
+
+		}
+		return R.ok();
+	}
+
+	/**
+	 * 通过id删除积分包状态
+	 *
+	 * @param id id
+	 * @return R
+	 */
+	@ApiOperation(value = "通过id删除积分包状态", notes = "通过id删除积分包状态")
+	@SysLog("通过id删除积分包状态")
+	@DeleteMapping("/{id}")
+	public R removeById(@PathVariable Integer id) {
+		return R.ok(wmScorePackageStatusService.removeById(id));
+	}
 
 
 	/**
 	 * 接单审核--分页查询
-	 * @param page 分页对象
+	 *
+	 * @param page                 分页对象
 	 * @param wmScorePackageStatus 积分包状态
 	 * @return
 	 */
 	@ApiOperation(value = "分页查询", notes = "分页查询")
-	@GetMapping("/getPage" )
-	public R getPage(Page page, WmScorePackageStatus wmScorePackageStatus){
-		if(StringUtil.isEmpty(wmScorePackageStatus.getPackageId())){
+	@GetMapping("/getPage")
+	public R getPage(Page page, WmScorePackageStatus wmScorePackageStatus) {
+		if (StringUtil.isEmpty(wmScorePackageStatus.getPackageId())) {
 			return R.failed("未查询到积分包id");
 		}
 		return wmScorePackageStatusService.getPage(page, wmScorePackageStatus);
@@ -181,30 +165,32 @@ public class WmScorePackageStatusController {
 
 	/**
 	 * 接单审核--同意
+	 *
 	 * @param wmScorePackageStatus
 	 * @return
 	 */
 	@PostMapping("/approvalStatus")
-	public R approvalStatus(@RequestBody WmScorePackageStatus wmScorePackageStatus){
-		if(wmScorePackageStatus.getId()==null){
+	public R approvalStatus(@RequestBody WmScorePackageStatus wmScorePackageStatus) {
+		if (wmScorePackageStatus.getId() == null) {
 			return R.failed("缺少参数ID");
 		}
-		if(StringUtil.isEmpty(wmScorePackageStatus.getStatus())){
+		if (StringUtil.isEmpty(wmScorePackageStatus.getStatus())) {
 			return R.failed("缺少参数:审批意见");
 		}
-		return wmScorePackageStatusService.approvalStatus( wmScorePackageStatus);
+		return wmScorePackageStatusService.approvalStatus(wmScorePackageStatus);
 	}
 
 	/**
 	 * 批量接单审核
+	 *
 	 * @param statusBatch 批量审批信息
 	 */
 	@PutMapping("/approvalStatus/batch")
-	public R approvalStatusBatch(@RequestBody WmScorePackageStatusBatch statusBatch){
-		if(StrUtil.isEmpty(statusBatch.getBatchIds())){
+	public R approvalStatusBatch(@RequestBody WmScorePackageStatusBatch statusBatch) {
+		if (StrUtil.isEmpty(statusBatch.getBatchIds())) {
 			return R.failed("缺少参数ID");
 		}
-		if(statusBatch.getStatus() == null){
+		if (statusBatch.getStatus() == null) {
 			return R.failed("缺少参数:审批意见");
 		}
 		return R.ok(wmScorePackageStatusService.approvalStatusBatch(statusBatch));
@@ -212,11 +198,12 @@ public class WmScorePackageStatusController {
 
 	/**
 	 * 获取批量审核的校验信息
+	 *
 	 * @param ids
 	 * @return
 	 */
 	@GetMapping(value = "/approvalStatus/checkout")
-	public R approvalStatusCheckout(@RequestParam(value = "ids") String ids){
+	public R approvalStatusCheckout(@RequestParam(value = "ids") String ids) {
 
 		// 获取id
 		List<String> idList = StrUtil.split(ids, StrUtil.COMMA);
@@ -249,7 +236,7 @@ public class WmScorePackageStatusController {
 
 		int operation = 0;
 		int remain = 0;
-		for (Map.Entry<String,List<WmScorePackageStatus>>entry : map.entrySet()){
+		for (Map.Entry<String, List<WmScorePackageStatus>> entry : map.entrySet()) {
 
 			String packageId = entry.getKey();
 			Set<Integer> tempIds = entry.getValue().stream().mapToInt(WmScorePackageStatus::getId).boxed().collect(Collectors.toSet());
@@ -257,7 +244,7 @@ public class WmScorePackageStatusController {
 			tempIds.retainAll(idSet);
 			Integer userNum = userNumMap.get(packageId) == null ? 1 : userNumMap.get(packageId);
 
-			if (entry.getValue().size() <= userNum){
+			if (entry.getValue().size() <= userNum) {
 
 				operation += tempIds.size();
 
@@ -269,7 +256,7 @@ public class WmScorePackageStatusController {
 
 		Map<String, Integer> result = new HashMap<>(2);
 		result.put("operation", operation);
-		result.put("remain",remain);
+		result.put("remain", remain);
 
 		return R.ok(result);
 
@@ -279,14 +266,14 @@ public class WmScorePackageStatusController {
 	 * 终止接单--区分全部收回,和部分收回
 	 *
 	 * @param wmScorePackageStatus 终止接单
-	 * enableType 1全部收回,2部分收回
+	 *                             enableType 1全部收回,2部分收回
 	 * @return R
 	 */
 	@ApiOperation(value = "终止接单", notes = "终止接单")
-	@SysLog("终止接单" )
+	@SysLog("终止接单")
 	@GetMapping("updateZZ")
-	public R updateZZ( WmScorePackageStatus wmScorePackageStatus) {
-		if(StringUtil.isEmpty(wmScorePackageStatus.getId()+"")){
+	public R updateZZ(WmScorePackageStatus wmScorePackageStatus) {
+		if (StringUtil.isEmpty(wmScorePackageStatus.getId() + "")) {
 			return R.failed("缺少参数");
 		}
 		return wmScorePackageStatusService.updateZZ(wmScorePackageStatus);

+ 49 - 42
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/entity/WmScorePackageStatus.java

@@ -1,28 +1,11 @@
-/*
- *    Copyright (c) 2018-2025, hnqz All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * Neither the name of the pig4cloud.com developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: hnqz
- */
-
 package com.qunzhixinxi.hnqz.admin.entity;
 
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
+import com.qunzhixinxi.hnqz.admin.api.entity.WmQuestion;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -31,90 +14,76 @@ import java.time.LocalDateTime;
 import java.util.List;
 
 /**
- * 积分包状态
+ * 领包记录
  *
- * @author pigx code generator
  * @date 2020-07-17 23:32:01
  */
 @Data
-@TableName("wm_score_package_status")
 @EqualsAndHashCode(callSuper = true)
-@ApiModel(value = "积分包状态")
+@TableName(value = "wm_score_package_status", autoResultMap = true)
 public class WmScorePackageStatus extends Model<WmScorePackageStatus> {
+
 	private static final long serialVersionUID = 1L;
 
 	/**
 	 * id
 	 */
 	@TableId
-	@ApiModelProperty(value = "id")
 	private Integer id;
 
 	/**
 	 * 用户id
 	 */
-	@ApiModelProperty(value = "用户id")
 	private String userId;
 
 	/**
 	 * 积分包id
 	 */
-	@ApiModelProperty(value = "积分包id")
 	private String packageId;
 
 	/**
 	 * 积分包状态
 	 */
-	@ApiModelProperty(value = "领取后的审核状态")
 	private String status;
 
-
 	/**
 	 * 组织机构ID
 	 */
-	@ApiModelProperty(value = "组织机构ID")
 	private String deptId;
 
 	/**
 	 * 是否删除
 	 */
-	@ApiModelProperty(value = "是否删除")
 	private String delFlag;
 
 	/**
 	 * 是否禁用
 	 */
-	@ApiModelProperty(value = "是否禁用")
 	private String enableFlag;
 
 	/**
 	 * 所属租户
 	 */
-	@ApiModelProperty(value = "所属租户", hidden = true)
 	private Integer tenantId;
 
 	/**
 	 * 创建时间
 	 */
-	@ApiModelProperty(value = "创建时间")
 	private LocalDateTime createTime;
 
 	/**
 	 * 创建人
 	 */
-	@ApiModelProperty(value = "创建人")
 	private Integer createUser;
 
 	/**
 	 * 更新时间
 	 */
-	@ApiModelProperty(value = "更新时间")
 	private LocalDateTime updateTime;
 
 	/**
 	 * 更新人
 	 */
-	@ApiModelProperty(value = "更新人")
 	private Integer updateUser;
 
 	/**
@@ -132,37 +101,31 @@ public class WmScorePackageStatus extends Model<WmScorePackageStatus> {
 	/**
 	 * 个人预计包值
 	 */
-	@ApiModelProperty(value = "个人预计包值")
 	private String userScore;
 
 	/**
 	 * 终止方式
 	 */
-	@ApiModelProperty(value = "终止方式")
 	private String enableType;
 
 	/**
 	 * 是否可以继续添加任务,0:不可添加任务,1:可以添加任务
 	 */
-	@ApiModelProperty(value = "是否可以继续添加任务")
 	private String taskAddFlag;
 
 	/**
 	 * 任务数量
 	 */
-	@ApiModelProperty(value = "任务数量")
 	private Integer taskNum;
 
 	/**
 	 * 积分包名称
 	 */
-	@TableField(exist = false)
 	private String scorePackageName;
 
 	/**
 	 * 接单人id
 	 */
-	@TableField(exist = false)
 	private String taskUserId;
 
 	/**
@@ -182,4 +145,48 @@ public class WmScorePackageStatus extends Model<WmScorePackageStatus> {
 	 */
 	@TableField(exist = false)
 	private String packageSn;
+
+	/**
+	 * 试卷结果
+	 */
+	@TableField(value = "quiz_res", typeHandler = JacksonTypeHandler.class)
+	private QuizResult quizResult;
+
+
+	@Data
+	public static class QuizResult implements Serializable{
+		private static final long serialVersionUID = -4820069860630677599L;
+
+		private Integer quizId;
+
+		private String title;
+
+		private Integer itemQty;
+
+		private Integer totalMark;
+
+		private Integer passingMark;
+
+		private Integer finalMark;
+
+		private WmScorePackageStatus.QuizResultItem[] items;
+
+	}
+
+	@Data
+	public static class QuizResultItem implements Serializable{
+
+		private static final long serialVersionUID = 8067658146266706311L;
+
+		private String label;
+
+		private WmQuestion.Option[] options;
+
+		private String answer;
+
+		private Integer mark;
+
+		private String answered;
+
+	}
 }

+ 69 - 77
hnqz-upms/hnqz-upms-biz/src/main/resources/mapper/WmScorePackageStatusMapper.xml

@@ -1,56 +1,45 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<!--
-  ~
-  ~      Copyright (c) 2018-2025, hnqz All rights reserved.
-  ~
-  ~  Redistribution and use in source and binary forms, with or without
-  ~  modification, are permitted provided that the following conditions are met:
-  ~
-  ~ Redistributions of source code must retain the above copyright notice,
-  ~  this list of conditions and the following disclaimer.
-  ~  Redistributions in binary form must reproduce the above copyright
-  ~  notice, this list of conditions and the following disclaimer in the
-  ~  documentation and/or other materials provided with the distribution.
-  ~  Neither the name of the pig4cloud.com developer nor the names of its
-  ~  contributors may be used to endorse or promote products derived from
-  ~  this software without specific prior written permission.
-  ~  Author: hnqz
-  ~
-  -->
-
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 
 <mapper namespace="com.qunzhixinxi.hnqz.admin.mapper.WmScorePackageStatusMapper">
 
-  <resultMap id="wmScorePackageStatusMap" type="com.qunzhixinxi.hnqz.admin.entity.WmScorePackageStatus">
-                  <id property="id" column="id"/>
-                        <result property="userId" column="user_id"/>
-                        <result property="packageId" column="package_id"/>
-                        <result property="status" column="status"/>
-                        <result property="deptId" column="dept_id"/>
-                        <result property="delFlag" column="del_flag"/>
-                        <result property="enableFlag" column="enable_flag"/>
-                        <result property="tenantId" column="tenant_id"/>
-                        <result property="createTime" column="create_time"/>
-                        <result property="createUser" column="create_user"/>
-                        <result property="updateTime" column="update_time"/>
-                        <result property="updateUser" column="update_user"/>
-	  					<result property="phone" column="phone"/>
-	  					<result property="userScore" column="user_score"/>
-	 				 	<result property="enableType" column="enable_type"/>
-	 				 	<result property="packageSn" column="package_sn"/>
-	  <result property="taskAddFlag" column="task_add_flag"/>
-	  <result property="taskNum" column="task_num"/>
-
-            </resultMap>
+	<resultMap id="wmScorePackageStatusMap" type="com.qunzhixinxi.hnqz.admin.entity.WmScorePackageStatus">
+		<id property="id" column="id"/>
+		<result property="userId" column="user_id"/>
+		<result property="packageId" column="package_id"/>
+		<result property="status" column="status"/>
+		<result property="deptId" column="dept_id"/>
+		<result property="delFlag" column="del_flag"/>
+		<result property="enableFlag" column="enable_flag"/>
+		<result property="tenantId" column="tenant_id"/>
+		<result property="createTime" column="create_time"/>
+		<result property="createUser" column="create_user"/>
+		<result property="updateTime" column="update_time"/>
+		<result property="updateUser" column="update_user"/>
+		<result property="phone" column="phone"/>
+		<result property="userScore" column="user_score"/>
+		<result property="enableType" column="enable_type"/>
+		<result property="packageSn" column="package_sn"/>
+		<result property="quizResult" column="quiz_res" typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"/>
+		<result property="taskAddFlag" column="task_add_flag"/>
+		<result property="taskNum" column="task_num"/>
+	</resultMap>
 
 	<select id="getPage" resultMap="wmScorePackageStatusMap">
-		select u.realname as user_id,u.phone as phone,
+		select u.realname as user_id,
+		u.phone as phone,
 		CONCAT(u.province,'-',u.city ) as address,
 		p.score_package_name as package_id,
-		s.id,s.`status`,s.dept_id,s.del_flag,s.enable_flag,s.create_time
-		,s.enable_type,s.user_id as task_user_id, s.task_num
+		s.id,
+		s.`status`,
+		s.dept_id,
+		s.del_flag,
+		s.enable_flag,
+		s.create_time,
+		s.enable_type,
+		s.user_id as task_user_id,
+		s.task_num
 		from wm_score_package_status s
 		left join sys_user u on u.user_id=s.user_id
 		left join wm_score_package p on p.id=s.package_id
@@ -80,7 +69,11 @@
 
 
 	<select id="getByPackageId" resultMap="wmScorePackageStatusMap">
-		select s.id, s.task_num, s.user_score, u.realname as user_id, s.user_id as task_user_id
+		select s.id,
+		s.task_num,
+		s.user_score,
+		u.realname as user_id,
+		s.user_id as task_user_id
 		from wm_score_package_status s
 		left join sys_user u on u.user_id=s.user_id
 		where s.del_flag = '0' and s.enable_flag = '0'
@@ -101,24 +94,24 @@
 
 	<select id="getReceivedPackageList" resultType="com.qunzhixinxi.hnqz.admin.entity.input.WmScorePackageApiOutput">
 		SELECT s.enable_flag,
-		       s.id statusId,
-		       p.id,
-		       p.score_package_name,
-		       p.send_package_dept_id,
-		       s.task_add_flag,
-			   p.create_time,
-		       p.package_type1,
-		       p.user_num,
-		       p.task_num,
-		       p.description,
-		       p.belong_date,
-		       p.pkg_sn as `packageSn`,
-			   p.score,
-		       s.enable_type,
-		       s.status,
-		       s.task_num taskNum2 ,
-		       s.create_time receiveTime,
-		       d.name packageEntName
+		s.id statusId,
+		p.id,
+		p.score_package_name,
+		p.send_package_dept_id,
+		s.task_add_flag,
+		p.create_time,
+		p.package_type1,
+		p.user_num,
+		p.task_num,
+		p.description,
+		p.belong_date,
+		p.pkg_sn as `packageSn`,
+		p.score,
+		s.enable_type,
+		s.status,
+		s.task_num taskNum2 ,
+		s.create_time receiveTime,
+		d.name packageEntName
 		FROM
 		wm_score_package_status s, wm_score_package p , sys_dept d
 		WHERE s.package_id = p.id AND p.send_package_dept_id = d.dept_id
@@ -148,15 +141,17 @@
 	</select>
 
 
-
 	<select id="getWmScorePackageStatusPage" resultMap="wmScorePackageStatusMap">
-		select distinct s.*,p.score_package_name, p.pkg_sn as package_sn, u1.username as phone from wm_score_package_status s
-		left join  wm_score_package p on p.id=s.package_id
+		select distinct s.*,
+		p.score_package_name,
+		p.pkg_sn as package_sn,
+		u1.username as phone from wm_score_package_status s
+		left join wm_score_package p on p.id=s.package_id
 		left join sys_user u on u.dept_id=p.send_package_dept_id
 		left join sys_user u1 on u1.user_id = s.user_id
-		where  s.del_flag=0  and p.del_flag=0
-		  and p.typeid=4
-		  and (p.source_type = '0' or p.source_type is null)
+		where s.del_flag=0 and p.del_flag=0
+		and p.typeid=4
+		and (p.source_type = '0' or p.source_type is null)
 		<if test="query.id!=null and query.id!=''">
 			and s.id=#{query.id}
 		</if>
@@ -189,15 +184,12 @@
 
 	<!-- 获取当前部门已接单人的列表 -->
 	<select id="getDeptReceiveUserList" resultType="java.util.Map">
-		SELECT DISTINCT
-			s.user_id as userId,
-			u.realname as realName
-		FROM
-			wm_score_package_status s
-				LEFT JOIN wm_score_package p ON p.id = s.package_id
-				LEFT JOIN sys_user u ON u.user_id = s.user_id
-		WHERE
-			s.del_flag = 0
+		SELECT DISTINCT s.user_id  AS userid,
+						u.realname AS realname
+		FROM wm_score_package_status s
+				 LEFT JOIN wm_score_package p ON p.id = s.package_id
+				 LEFT JOIN sys_user u ON u.user_id = s.user_id
+		WHERE s.del_flag = 0
 		  AND s.enable_flag = 0
 		  AND s.dept_id = #{deptId}
 		  AND p.package_type1 = #{packageType1}