Browse Source

科德系统催款定时任务BUG处理
科德系统部门统计表修改
科德系统专利邮件修改

anderx 4 years ago
parent
commit
b0af802880

+ 69 - 0
src/main/java/com/goafanti/admin/bo/AdminCustomerDetailBo.java

@@ -7,9 +7,78 @@ public class AdminCustomerDetailBo {
 	@SuppressWarnings("unused")
 	private String sourceName;
 	private String contacts;
+	private String contactsDep;
+	private String contactsPosition;
 	private String contactMobile;
 	private String createTime;
 	private String followTime;
+
+	private Integer province;
+	private Integer city;
+	private Integer area;
+	private String businessScope;
+	private String intendedProject;
+
+	public String getContactsDep() {
+		return contactsDep;
+	}
+
+	public void setContactsDep(String contactsDep) {
+		this.contactsDep = contactsDep;
+	}
+
+	public String getContactsPosition() {
+		return contactsPosition;
+	}
+
+	public void setContactsPosition(String contactsPosition) {
+		this.contactsPosition = contactsPosition;
+	}
+
+	public void setSourceName(String sourceName) {
+		this.sourceName = sourceName;
+	}
+
+	public Integer getProvince() {
+		return province;
+	}
+
+	public void setProvince(Integer province) {
+		this.province = province;
+	}
+
+	public Integer getCity() {
+		return city;
+	}
+
+	public void setCity(Integer city) {
+		this.city = city;
+	}
+
+	public Integer getArea() {
+		return area;
+	}
+
+	public void setArea(Integer area) {
+		this.area = area;
+	}
+
+	public String getBusinessScope() {
+		return businessScope;
+	}
+
+	public void setBusinessScope(String businessScope) {
+		this.businessScope = businessScope;
+	}
+
+	public String getIntendedProject() {
+		return intendedProject;
+	}
+
+	public void setIntendedProject(String intendedProject) {
+		this.intendedProject = intendedProject;
+	}
+
 	public String getId() {
 		return id;
 	}

+ 1 - 0
src/main/java/com/goafanti/admin/service/impl/AdminServiceImpl.java

@@ -367,6 +367,7 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 	@Override
 	public depCountBo selectAllUser(String depId, String startTime, String endTime,String aName) {
 		depCountBo acb=new depCountBo();
+		endTime=endTime+" 23:59:59";
 		List<depCountBo >deps=new ArrayList<>();
 		if (depId==null) {
 			acb.setName("科德集团");

+ 11 - 6
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -1105,12 +1105,17 @@
   </select>
   
    <select id="selectAdminCustomerDetailList"  resultType="com.goafanti.admin.bo.AdminCustomerDetailBo">
-select a.id,a.nickname as name,a.source,c.name contacts,c.mobile as contactMobile,
-	a.create_time as createTime,b.last_follow_time as followTime
-	from user a 
-	left join (select uid,last_follow_time from user_mid where aid= #{aid}) b  on a.id=b.uid
-	left join (select uid,name ,mobile from organization_contact_book where major=1 limit 1 ) c on a.id=c.uid
-	<if test="type==5 or type==6">
+     select a.id,a.nickname as name,a.source,d.name contacts,d.mobile as contactMobile,d.department contactsDep,d.`position` contactsPosition,
+     a.create_time as createTime,b.last_follow_time as followTime,c.location_province locationProvince,
+     c.location_city locationCity,c.location_area locationArea,c.business_scope businessScope ,
+     c.intended_project intendedProject
+     from user a
+     left join (select uid,last_follow_time from user_mid where aid= #{aid}) b  on a.id=b.uid
+     left join organization_identity c on a.id=c.uid
+     left join (select y.id,y.uid,y.name ,y.mobile ,y.department ,y.`position`from (
+         select uid,max(id)id from organization_contact_book where major =1 and aid = #{aid} group by uid )x
+        left join organization_contact_book y on x.id=y.id) d on a.id =c.uid
+     <if test="type==5 or type==6">
 	left join (select aid,uid from public_release where clock_in =1
 	and aid= #{aid,jdbcType=VARCHAR}
     <if test="startTime != null and endTime != null">

+ 8 - 26
src/main/java/com/goafanti/common/mapper/OrganizationManagementMapper.xml

@@ -515,30 +515,13 @@
 		and name  like concat('%',#{name,jdbcType=VARCHAR},'%')
 	</select>
 	<select id="selectAllById" resultType="com.goafanti.organization.bo.OrganizationListOut">
-	select
-		a.id,
-		a.create_id as createId,
-		a.create_time as createTime,
-		a.update_time as updateTime,
-		a.deleted_sign as deletedSign,
-		a.name,
-		a.type,
-		a.manager_id as managerId,
-		a.dep_no as depNo,
-		a.super_id as superId,
-		a.remarks,
-		a.status,
-		a.abbreviation,
-		a.finance_id financeId,
-		a.province,
-		c.name financeName,
-		a.working_hours_type workingHoursType,
-		b.name as managerName
-	from department a 
-	left join admin b on a.manager_id = b.id
-	left join admin c on a.finance_id = c.id
-	where 
-		a.id=#{id,jdbcType=VARCHAR}
+        select a.id, a.create_id as createId, a.create_time as createTime, a.update_time as updateTime,
+               a.deleted_sign as deletedSign, a.name, a.type, a.manager_id as managerId, a.dep_no as depNo,
+               a.super_id as superId, a.remarks, a.status, a.abbreviation, a.finance_id financeId,
+               a.province, c.name financeName, a.working_hours_type workingHoursType, b.name as managerName
+        from department a
+        left join admin b on a.manager_id = b.id left join admin c on a.finance_id = c.id
+	where a.id=#{id,jdbcType=VARCHAR}
 	</select>
 	<delete id="deleteById" parameterType="java.lang.String">
 	    delete from department
@@ -669,8 +652,7 @@
         </if>
         group by a.aid ) y on x.aid=y.aid)b on a.id=b.aid
         left join department d on a.department_id=d.id
-        left join user_role e on a.id=e.uid left join (select id from `role`where role_type in(96,996)) f on e.rid=f.id
-        where  a.status='正常'
+        where  a.status='正常'  and a.type=1
         <if test="adminName !=null">
 	and a.name  like concat('%',#{adminName},'%')  
 	</if>

+ 1 - 1
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -1263,7 +1263,7 @@ public class AdminCustomerApiController extends BaseApiController{
 	 * 查看客户日期内新增客户
 	 * @param startTime
 	 * @param endTime
-	 * @param type
+	 * @param type 0私有 1渠道 2签单 3私有新增 4渠道新增 5私有面谈 6渠道面谈 7私有领取
 	 * @param pageSize
 	 * @param pageNo
 	 * @return

+ 3 - 0
src/main/java/com/goafanti/patent/service/impl/PatentNewServiceImpl.java

@@ -601,6 +601,9 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
 			for (PatentNew patentNew : lp) {
 				Admin a = adminMapper.selectByPrimaryKey(patentNew.getAid());
 				String userName = patentNewMapper.selectUserNameByTid(patentNew.getTid());
+				if (StringUtils.isEmpty(userName)){
+					userName=patentNew.getHolders();
+				}
 				BigDecimal amout = patentNew.getPatentAmount().multiply(new BigDecimal(10000));
 				EmailBo emailBo = new EmailBo("专利提醒", patentNew.getEmail().trim(), userName, "科德集团", a.getName(),
 						patentNew.getName(), patentNew.getPatentNo(), amout.stripTrailingZeros().toPlainString(),