Browse Source

Merge branch 'test' of jishutao/kede-server into prod

gitadmin 7 years ago
parent
commit
5d87eb1faf

+ 2 - 0
src/main/java/com/goafanti/common/dao/TOrderTaskMapper.java

@@ -128,4 +128,6 @@ public interface TOrderTaskMapper {
 	TOrderTask selectBySuperId(String superId);
 	
 	List<TOrderTask> getReceiverByOid(String oid);
+
+	void updateDimissionTransfer(@Param("aid")String aid, @Param("transferId")String transferId);
 }

+ 2 - 0
src/main/java/com/goafanti/common/dao/TTaskLogMapper.java

@@ -93,4 +93,6 @@ public interface TTaskLogMapper {
      * @mbg.generated Tue Dec 04 15:28:04 CST 2018
      */
     int updateByPrimaryKey(TTaskLog record);
+
+	void updateDimissionTransfer(@Param("aid")String aid, @Param("transferId")String transferId);
 }

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

@@ -896,4 +896,8 @@ from t_order_task a left join business_project b on a.commodity_id=b.id
 	inner join admin a on t.task_receiver = a.id
 	where order_no = #{orderNo,jdbcType=VARCHAR} and task_status &gt; 0 and super_id is null
   	</select>
+  	<update id="updateDimissionTransfer" parameterType="java.lang.String">
+    update t_order_task set task_allocator= #{aid,jdbcType=VARCHAR},task_receiver= #{transferId,jdbcType=VARCHAR}
+	where task_receiver=#{aid,jdbcType=VARCHAR}
+  </update>
 </mapper>

+ 5 - 0
src/main/java/com/goafanti/common/mapper/TTaskLogMapper.xml

@@ -283,4 +283,9 @@
       create_time = #{createTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=INTEGER}
   </update>
+  <update id="updateDimissionTransfer" parameterType="java.lang.String">
+    update t_task_log set 
+      task_receiver = #{transferId,jdbcType=VARCHAR}
+    where task_receiver = #{aid,jdbcType=VARCHAR}
+  </update>
 </mapper>

+ 12 - 2
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -191,6 +191,7 @@
 		<if test="area != null">
 			and b.area = #{area,jdbcType=INTEGER}
 		</if>
+		order by a.create_time
 		 <if test="page_sql != null">
     		${page_sql}
    		 </if>
@@ -226,6 +227,7 @@
 		<if test="area != null">
 			and b.area = #{area,jdbcType=INTEGER}
 		</if>
+		
 	</select>
 	<select id="selectSignPersonalCustomerList" resultType="com.goafanti.customer.bo.CustomerListOut">
 			select 
@@ -457,7 +459,15 @@
 		<if test="level != null">
 			and t0.level = #{level,jdbcType=INTEGER}
 		</if>
-		 order by orderTime 
+		<if test="sort != 1">
+		   order by orderTime 
+		</if>
+		<if test="sort == 1"> 
+		 order by t0.create_time 
+		 </if>
+		 <if test="sortType == 1">
+		 		desc
+		 </if>
 		 <if test="page_sql != null">
     		${page_sql}
    		 </if>
@@ -1635,7 +1645,7 @@
     </select>
     
     <update id="updateReleaseLock" parameterType="java.lang.String">
-    	update user a,user_lock_release b set a.share_type = 1,a.transfer_time =  #{time} where b.status=1 and a.id=b.uid 
+    	update user a,user_lock_release b set a.share_type = 1,a.transfer_time =  #{time} where b.status=1 b.`type`=0 and a.id=b.uid 
     </update>
     
     <select id="marketingStatistics" parameterType="java.lang.String" resultType="com.goafanti.report.bo.marketingESBo">

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

@@ -51,7 +51,7 @@ import com.goafanti.customer.service.CustomerService;
 import com.goafanti.customer.service.impl.AdminOrgAnnualReportServiceImpl;
 
 @RestController
-@RequestMapping("/api/admin/customer")
+@RequestMapping("/open/api/admin/customer")
 public class AdminCustomerApiController extends BaseApiController{
 	@Resource
 	private CustomerService customerService;
@@ -111,9 +111,9 @@ public class AdminCustomerApiController extends BaseApiController{
 	
 	/** 私有单位客户列表 **/
 	@RequestMapping(value = "/listPrivateOrganizationCustomer" , method = RequestMethod.POST)
-	public Result listPrivateOrganizationCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
+	public Result listPrivateOrganizationCustomer(CustomerListIn cli ,Integer sort,Integer sortType,Integer pageNo, Integer pageSize){
 		Result res = new Result();
-		res.setData(customerService.listPrivateOrganizationCustomer(cli, pageNo, pageSize));
+		res.setData(customerService.listPrivateOrganizationCustomer(cli, sort, sortType, pageNo, pageSize));
 		return res;
 	}
 	

+ 1 - 1
src/main/java/com/goafanti/customer/service/CustomerService.java

@@ -68,7 +68,7 @@ public interface CustomerService {
 	 * @param pageNumber
 	 * @return
 	 */
-	Pagination<CustomerListOut> listPrivateOrganizationCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
+	Pagination<CustomerListOut> listPrivateOrganizationCustomer(CustomerListIn cli,Integer sort,Integer sortType, Integer pageNo, Integer pageSize);
 	
 	/**
 	 * 公共单位客户列表查询

+ 5 - 3
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -151,12 +151,14 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<CustomerListOut> listPrivateOrganizationCustomer(CustomerListIn cli, Integer pageNo,Integer pageSize) {
+	public Pagination<CustomerListOut> listPrivateOrganizationCustomer(CustomerListIn cli,Integer sort,Integer sortType, Integer pageNo,Integer pageSize) {
 		cli.setType(AFTConstants.USER_TYPE_ORGANIZATION);
-		cli.setAid(TokenManager.getAdminId());
-//		cli.setAid("1");
+//		cli.setAid(TokenManager.getAdminId());
+		cli.setAid("1");
 		cli.setShareType(String.valueOf(AFTConstants.USER_SHARE_PRIVATE));
 		Map<String,Object> params = disposeParams(cli);
+		params.put("sort", sort);
+		params.put("sortType",sortType);
 		Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectPrivateOrganizationCustomerList","selectPrivateOrganizationCustomerCount",params,pageNo,pageSize);
 		List<CustomerListOut> tmpList = (List<CustomerListOut>)list.getList();
 		setCustomerList(tmpList);

+ 9 - 1
src/main/java/com/goafanti/permission/service/impl/NewRoleServiceImpl.java

@@ -19,6 +19,8 @@ import com.goafanti.common.dao.OrganizationContactBookMapper;
 import com.goafanti.common.dao.RoleMapper;
 import com.goafanti.common.dao.RolePermissionMapper;
 import com.goafanti.common.dao.RoleResourcesMapper;
+import com.goafanti.common.dao.TOrderTaskMapper;
+import com.goafanti.common.dao.TTaskLogMapper;
 import com.goafanti.common.dao.UserBusinessMapper;
 import com.goafanti.common.dao.UserMapper;
 import com.goafanti.common.dao.UserRoleMapper;
@@ -53,6 +55,10 @@ public class NewRoleServiceImpl extends BaseMybatisDao<RoleMapper> implements Ne
 	UserBusinessMapper		userBusinessMapper;
 	@Autowired
 	OrganizationContactBookMapper	organizationContactBookMapper;
+	@Autowired
+	TOrderTaskMapper	tOrderTaskMapper;
+	@Autowired
+	TTaskLogMapper	tTaskLogMapper;
 	@Override
 	public Pagination<RoleBo> findRoles(RoleBo role, Integer pageNo, Integer pageSize) {
 		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -192,7 +198,9 @@ public class NewRoleServiceImpl extends BaseMybatisDao<RoleMapper> implements Ne
 				roleResourcesMapper.updateLockRelease("1",aid,transferId);//将业务锁转给指定人
 			}
 			if (s==roleResources.XMRW.getCode()) {
-				contractTaskLogMapper.updateDimissionTransfer(aid,transferId);
+//				contractTaskLogMapper.updateDimissionTransfer(aid,transferId);
+				tOrderTaskMapper.updateDimissionTransfer(aid,transferId);
+				tTaskLogMapper.updateDimissionTransfer(aid,transferId);
 			}
 			if (s!=roleResources.QDYW.getCode()) {
 				roleResourcesMapper.updateDimissionTransfer(s,aid,transferId);