Browse Source

会员项目列表新增字段,导出修改
打卡新增异常打卡

anderx 3 years ago
parent
commit
32f5666ac3

+ 13 - 2
src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml

@@ -39,13 +39,14 @@
     <result column="assist_aid_name" jdbcType="VARCHAR" property="assistAidName" />
     <result column="main_id" jdbcType="INTEGER" property="mainId" />
     <result column="main_name" jdbcType="VARCHAR" property="mainName" />
+    <result column="clock_in_remarks" jdbcType="VARCHAR" property="clockInRemarks" />
   </resultMap>
   <sql id="Base_Column_List">
     id, `uid`, aid, release_start, release_end, remarks, annex_url, user_name, longitude,
     latitude, `status`, create_time, clock_in, clock_in_time, photo_url, pid, pname,
     ufid, duration, valid_date, new_user, sign_sum, main_status, supplement, audit_info,
     `plan`, expected_effect, next_plan, `type`, order_no, update_time, update_status,
-    assist, assist_aid, assist_aid_name, main_id, main_name
+    assist, assist_aid, assist_aid_name, main_id, main_name, clock_in_remarks
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
@@ -201,6 +202,9 @@
       <if test="mainName != null">
         main_name,
       </if>
+      <if test="clockInRemarks != null">
+        clock_in_remarks,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -314,6 +318,9 @@
       <if test="mainName != null">
         #{mainName,jdbcType=VARCHAR},
       </if>
+      <if test="clockInRemarks != null">
+        #{clockInRemarks,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PublicRelease">
@@ -427,6 +434,9 @@
       <if test="mainName != null">
         main_name = #{mainName,jdbcType=VARCHAR},
       </if>
+      <if test="clockInRemarks != null">
+        clock_in_remarks = #{clockInRemarks,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -467,7 +477,8 @@
       assist_aid = #{assistAid,jdbcType=VARCHAR},
       assist_aid_name = #{assistAidName,jdbcType=VARCHAR},
       main_id = #{mainId,jdbcType=INTEGER},
-      main_name = #{mainName,jdbcType=VARCHAR}
+      main_name = #{mainName,jdbcType=VARCHAR},
+      clock_in_remarks = #{clockInRemarks,jdbcType=VARCHAR}
     where id = #{id,jdbcType=INTEGER}
   </update>
 

+ 1 - 0
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -1735,6 +1735,7 @@
   <select id="findMemberList" resultType="com.goafanti.order.bo.OutMemberList">
     select a.id,b.contract_no contractNo,c.buyer_name userName,a.order_no orderNo,b.approval ,c.dep_name depName,
     c.salesman_name salesmanName,c.finance_name financeName,a.commodity_name projectName,a.member_type memberType,
+    b.delete_sign deleteSign ,b.total_amount totalAmount ,b.sales_type salesType ,b.other,
     a.process_status status,a.commodity_id commodityId,a.commodity_name commodityName,
     a.commodity_quantity commodityQuantity,a.task_comment taskComment
     from t_order_task a left join t_order_new b on a.order_no =b.order_no

+ 14 - 1
src/main/java/com/goafanti/common/model/PublicRelease.java

@@ -66,7 +66,7 @@ public class PublicRelease implements Serializable {
     private Date createTime;
 
     /**
-     * 打卡
+     * 打卡状态 1正常打卡 2异常打卡
      */
     private Integer clockIn;
 
@@ -190,6 +190,11 @@ public class PublicRelease implements Serializable {
      */
     private String mainName;
 
+    /**
+     * 打卡说明
+     */
+    private String clockInRemarks;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -487,4 +492,12 @@ public class PublicRelease implements Serializable {
     public void setMainName(String mainName) {
         this.mainName = mainName;
     }
+
+    public String getClockInRemarks() {
+        return clockInRemarks;
+    }
+
+    public void setClockInRemarks(String clockInRemarks) {
+        this.clockInRemarks = clockInRemarks;
+    }
 }

+ 74 - 4
src/main/java/com/goafanti/order/bo/OutMemberList.java

@@ -2,7 +2,10 @@ package com.goafanti.order.bo;
 
 import com.goafanti.common.utils.excel.Excel;
 
+import java.math.BigDecimal;
+
 public class OutMemberList {
+    static final int MINWIDTH=7;
     private Integer id;
     @Excel(name = "合同编号")
     private String contractNo;
@@ -10,9 +13,9 @@ public class OutMemberList {
     private String userName;
     @Excel(name = "订单编号")
     private String orderNo;
-    @Excel(name = "特批状态",readConverterExp = "0=非特批,1=待审核,2=通过,3=驳回")
+    @Excel(name = "特批状态",readConverterExp = "0=非特批,1=待审核,2=通过,3=驳回",width = MINWIDTH)
     private Integer approval;
-    @Excel(name = "订单部门")
+    @Excel(name = "订单部门",width = 20)
     private String depName;
     @Excel(name = "订单负责人")
     private String salesmanName;
@@ -20,16 +23,83 @@ public class OutMemberList {
     private String financeName;
     @Excel(name = "会员项目")
     private String projectName;
-    @Excel(name = "项目说明")
+    @Excel(name = "项目说明",width = 24)
     private String taskComment;
-    @Excel(name = "状态",readConverterExp = "0=非审核,1=财务审核,2=特批审核,3=通过,4=驳回")
+    @Excel(name = "状态",readConverterExp = "0=非审核,1=财务审核,2=特批审核,3=通过,4=驳回",width = MINWIDTH)
     private String status;
 
+    private Integer  deleteSign;
+
+    private BigDecimal totalAmount;
+    private Integer salesType;
+    private String other;
     private String commodityId;
     private String commodityName;
     private Integer memberType;
     private Integer commodityQuantity;
 
+    @Excel(name = "订单状态" ,width = MINWIDTH)
+    private String deleteSignStr;
+    @Excel(name = "客户类型",width = MINWIDTH)
+    private String bigUser;
+    @Excel(name = "销售类型")
+    private String salesTypeName;
+
+    public String getDeleteSignStr() {
+        return deleteSignStr;
+    }
+
+    public void setDeleteSignStr(String deleteSignStr) {
+        this.deleteSignStr = deleteSignStr;
+    }
+
+    public String getBigUser() {
+        return bigUser;
+    }
+
+    public void setBigUser(String bigUser) {
+        this.bigUser = bigUser;
+    }
+
+    public String getSalesTypeName() {
+        return salesTypeName;
+    }
+
+    public void setSalesTypeName(String salesTypeName) {
+        this.salesTypeName = salesTypeName;
+    }
+
+    public BigDecimal getTotalAmount() {
+        return totalAmount;
+    }
+
+    public void setTotalAmount(BigDecimal totalAmount) {
+        this.totalAmount = totalAmount;
+    }
+
+    public Integer getSalesType() {
+        return salesType;
+    }
+
+    public void setSalesType(Integer salesType) {
+        this.salesType = salesType;
+    }
+
+    public String getOther() {
+        return other;
+    }
+
+    public void setOther(String other) {
+        this.other = other;
+    }
+
+    public Integer getDeleteSign() {
+        return deleteSign;
+    }
+
+    public void setDeleteSign(Integer deleteSign) {
+        this.deleteSign = deleteSign;
+    }
 
     public String getCommodityId() {
         return commodityId;

+ 5 - 5
src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java

@@ -14,7 +14,7 @@ import com.goafanti.common.enums.AttachmentType;
 import com.goafanti.common.model.*;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.order.bo.*;
-import com.goafanti.order.enums.salesTypes;
+import com.goafanti.order.enums.SalesTypes;
 import com.goafanti.order.service.OrderAssistService;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -73,7 +73,7 @@ public class AdminNewOrderApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","销售类型"));
 			return res;
 		}else{
-			if (salesType.equals(salesTypes.qd.getCode()) ){
+			if (salesType.equals(SalesTypes.qd.getCode()) ){
 				if (StringUtils.isBlank(channelId)){
 					res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","销售类型为渠道,渠道客户"));
 					return res;
@@ -83,7 +83,7 @@ public class AdminNewOrderApiController extends CertifyApiController {
 					return res;
 				}
 			}
-			if ((salesType.equals(salesTypes.qt.getCode()) ||salesType.equals(salesTypes.zjs.getCode()))
+			if ((salesType.equals(SalesTypes.qt.getCode()) ||salesType.equals(SalesTypes.zjs.getCode()))
 					&&StringUtils.isBlank(other)){
 				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","销售类型为转介绍或者其他,请简单描述"));
 				return res;
@@ -244,7 +244,7 @@ public class AdminNewOrderApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "订单编号"));
 			return res;
 		}
-		if (in.getSalesType().equals(salesTypes.qd.getCode()) ){
+		if (in.getSalesType().equals(SalesTypes.qd.getCode()) ){
 			if (StringUtils.isBlank(in.getChannelId())){
 				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","销售类型为渠道,渠道客户"));
 				return res;
@@ -254,7 +254,7 @@ public class AdminNewOrderApiController extends CertifyApiController {
 				return res;
 			}
 		}
-		if ((in.getSalesType().equals(salesTypes.qt.getCode()) ||in.getSalesType().equals(salesTypes.zjs.getCode()))
+		if ((in.getSalesType().equals(SalesTypes.qt.getCode()) ||in.getSalesType().equals(SalesTypes.zjs.getCode()))
 				&&StringUtils.isBlank(in.getOther())){
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","销售类型为转介绍或者其他,请简单描述"));
 			return res;

+ 13 - 4
src/main/java/com/goafanti/order/enums/salesTypes.java

@@ -3,7 +3,7 @@ package com.goafanti.order.enums;
 import java.util.HashMap;
 import java.util.Map;
 
-public enum salesTypes {
+public enum SalesTypes {
 
     dhxkf(0,"电话新开发"),
     dhzdzy(1,"电话自带资源"),
@@ -17,18 +17,27 @@ public enum salesTypes {
     private Integer code;
     private String desc;
 
-    private salesTypes(Integer code,String desc){
+    private SalesTypes(Integer code, String desc){
         this.code=code;
         this.desc=desc;
     }
-    private static Map<Integer ,salesTypes> map=new HashMap<>();
+    private static Map<Integer , SalesTypes> map=new HashMap<>();
 
     static {
-        for (salesTypes value : salesTypes.values()) {
+        for (SalesTypes value : SalesTypes.values()) {
             map.put(value.code,value);
         }
     }
 
+    public static String getValueByCode(Integer code){
+        for(SalesTypes o:SalesTypes.values()){
+            if(code.equals(o.getCode())){
+                return o.getDesc();
+            }
+        }
+        return  null;
+    }
+
     public Integer getCode() {
         return code;
     }

+ 1 - 8
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -2,7 +2,6 @@ package com.goafanti.order.service.impl;
 
 
 import java.io.IOException;
-import java.io.OutputStream;
 import java.io.UnsupportedEncodingException;
 import java.math.BigDecimal;
 import java.text.ParseException;
@@ -18,7 +17,6 @@ import java.util.UUID;
 
 
 import javax.mail.MessagingException;
-import javax.servlet.http.HttpServletResponse;
 
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.dao.*;
@@ -30,10 +28,6 @@ import com.goafanti.order.service.OrderProjectService;
 import com.goafanti.organization.bo.*;
 import com.goafanti.common.utils.StringUtils;
 import groovy.transform.Synchronized;
-import org.apache.poi.xssf.usermodel.XSSFCell;
-import org.apache.poi.xssf.usermodel.XSSFRow;
-import org.apache.poi.xssf.usermodel.XSSFSheet;
-import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -54,7 +48,6 @@ import com.goafanti.common.enums.OfficialPatentType;
 import com.goafanti.common.enums.OrderLogProcess;
 import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.utils.AsyncUtils;
-import com.goafanti.common.utils.ExportExcelUtil;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.common.utils.SendEmailUtil;
 import com.goafanti.core.mybatis.BaseMybatisDao;
@@ -166,7 +159,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		t.setUpdateTime(date);
 		t.setBuyerId(uid);
 		t.setSalesType(salesType);
-		if (salesType==salesTypes.qd.getCode()&&channelId!=null){
+		if (salesType== SalesTypes.qd.getCode()&&channelId!=null){
 			t.setChannelId(channelId);
 		}
 		if (other!=null )t.setOther(other);

+ 24 - 5
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -17,10 +17,13 @@ import com.goafanti.admin.bo.AdminListBo;
 import com.goafanti.common.bo.*;
 import com.goafanti.common.bo.Error;
 import com.goafanti.common.dao.*;
+import com.goafanti.common.enums.OrderState;
 import com.goafanti.common.model.*;
 import com.goafanti.common.utils.*;
 import com.goafanti.common.utils.excel.NewExcelUtil;
 import com.goafanti.order.bo.*;
+import com.goafanti.order.enums.*;
+import com.goafanti.report.bo.SalesValues;
 import org.apache.commons.collections4.map.HashedMap;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -40,11 +43,6 @@ import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.order.bo.InputProjectCheck;
-import com.goafanti.order.enums.BonusSubject;
-import com.goafanti.order.enums.NewOrderDunType;
-import com.goafanti.order.enums.NewProjectStatus;
-import com.goafanti.order.enums.OrderDunProjectType;
-import com.goafanti.order.enums.ProcessStatus;
 import com.goafanti.order.service.OrderNewService;
 import com.goafanti.order.service.OrderProjectService;
 import com.goafanti.organization.bo.OutPaymentNode;
@@ -1059,6 +1057,27 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		HashMap<String, Object> map = new HashMap<>();
 		addParam(in, map);
 		List<OutMemberList>list= (List<OutMemberList>) findList("findMemberList",map,1,9999);
+		for (OutMemberList out : list) {
+			if (out.getSalesType()!=null){
+				StringBuffer str=new StringBuffer();
+				str.append(SalesTypes.getValueByCode(out.getSalesType()));
+				if (out.getSalesType()==SalesTypes.qd.getCode()){
+					str.append("-").append(out.getOther());
+				}
+				out.setSalesTypeName(str.toString());
+			}
+			if (out.getTotalAmount()!=null){
+				StringBuffer str=new StringBuffer();
+				str.append(out.getTotalAmount().compareTo(new BigDecimal(10))>=0?"大客户":"一般客户");
+				out.setBigUser(str.toString());
+			}
+			if (out.getDeleteSign()!=null){
+				StringBuffer str=new StringBuffer();
+				str=str.append(out.getDeleteSign()==0?"正常": out.getDeleteSign()==1?"删除":
+						out.getDeleteSign()==2?"锁定":"未知");
+				out.setDeleteSignStr(str.toString());
+			}
+		}
 		NewExcelUtil<OutMemberList> excelUtil=new NewExcelUtil<>(OutMemberList.class);
 		return excelUtil.exportExcel(list,"会员审核列表",uploadPath);
 	}

+ 2 - 2
src/main/java/com/goafanti/weChat/controller/AdminReleaseApiController.java

@@ -88,9 +88,9 @@ public class AdminReleaseApiController extends CertifyApiController{
 	 * @return
 	 */
 	@RequestMapping(value = "/publicReleaseClockIn", method = RequestMethod.POST)
-	public Result publicReleaseClockIn(Integer id,String photoUrl){
+	public Result publicReleaseClockIn(Integer id,String photoUrl,Integer clockIn ,String clockInRemarks ){
 		Result res =new Result();
-		res.setData(publicReleaseService.pushPublicReleaseClockIn(id,photoUrl));
+		res.setData(publicReleaseService.pushPublicReleaseClockIn(id,photoUrl,clockIn,clockInRemarks));
 		return res;
 	}
 	/**

+ 1 - 1
src/main/java/com/goafanti/weChat/service/PublicReleaseService.java

@@ -26,7 +26,7 @@ public interface PublicReleaseService {
 
 	int updatePublicRelease(InputPublicRelease in);
 
-	int pushPublicReleaseClockIn(Integer id,String photoUrl);
+	int pushPublicReleaseClockIn(Integer id,String photoUrl,Integer clockIn ,String clockInRemarks );
 
 	OutPublicRelease dtails(Integer id);
 

+ 3 - 2
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -350,12 +350,13 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 
 
 	@Override
-	public int pushPublicReleaseClockIn(Integer id,String photoUrl) {
+	public int pushPublicReleaseClockIn(Integer id,String photoUrl,Integer clockIn ,String clockInRemarks ) {
 		PublicRelease p=new PublicRelease();
 		PublicRelease use=publicReleaseMapper.selectByPrimaryKey(id);
 		String aid=TokenManager.getAdminId();
 		p.setId(id);
-		p.setClockIn(1);
+		p.setClockIn(clockIn);
+		p.setClockInRemarks(clockInRemarks);
 		p.setPhotoUrl(photoUrl);
 		p.setClockInTime(new Date());
 		String str="";