Browse Source

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

anderx 4 years ago
parent
commit
43455f9f64

+ 13 - 4
src/main/java/com/goafanti/common/bo/OrderOperator.java

@@ -1,7 +1,7 @@
 package com.goafanti.common.bo;
 
 public class OrderOperator {
-	
+
 	private String tid;
 	private String orderNo;
 	private String salesmanId;
@@ -10,7 +10,16 @@ public class OrderOperator {
 	private String salesmanName;
 	private String financeName;
 	private String techName;
-	
+	private String buyerName;
+
+	public String getBuyerName() {
+		return buyerName;
+	}
+
+	public void setBuyerName(String buyerName) {
+		this.buyerName = buyerName;
+	}
+
 	public String getOrderNo() {
 		return orderNo;
 	}
@@ -59,7 +68,7 @@ public class OrderOperator {
 	public void setTid(String tid) {
 		this.tid = tid;
 	}
-	
-	
+
+
 
 }

+ 2 - 2
src/main/java/com/goafanti/common/enums/NoticeStatus.java

@@ -63,8 +63,8 @@ public enum NoticeStatus {
 	PUBLIC_RELEASE_START(54,"外出打卡申请"),
 	PUBLIC_RELEASE_YES(55,"外出打卡通过"),
 	PUBLIC_RELEASE_NO(56,"外出打卡驳回"),
-	ITEM_CHECK_START(57,"发起项目核对"),
-	ITEM_CHECK_END(58,"完成项目核对"),
+	ITEM_CHECK_START(57,"发起专利核对"),
+	ITEM_CHECK_END(58,"完成专利核对"),
 	OTHER(0, "其他");
 
 	private NoticeStatus(Integer code, String desc) {

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

@@ -64,19 +64,19 @@
     <result column="pubicity_url" jdbcType="VARCHAR" property="pubicityUrl" />
   </resultMap>
   <sql id="Base_Column_List">
-    id, order_no, main, super_id, commodity_id, commodity_name, commodity_quantity, commodity_mode, 
-    commodity_price, task_status, task_distribution_time, task_allocator, task_receiver, 
-    task_comment, task_start_time, task_end_time, attachment_url, project_status, accept_time, 
-    review_time, publicity_time, licence_time, certificate_number, `status`, form_retrieve, 
-    task_refund, refund_content, retrieve_content, declare_user, declare_pwd, set_up_amount, 
-    arrival_money, outsource_name, outsource_price, consultant_id, manager_id, outsource, 
-    split_super, split_status, split_id, split_aid, split_time, cname, receiver_name, 
-    declaration_batch, cost_reduction, official_cost, set_up_status, set_up_time, spot_check_status, 
-    high_tech_status, special_comment, if_certification_fee, certification_fee, certification_corporate, 
+    id, order_no, main, super_id, commodity_id, commodity_name, commodity_quantity, commodity_mode,
+    commodity_price, task_status, task_distribution_time, task_allocator, task_receiver,
+    task_comment, task_start_time, task_end_time, attachment_url, project_status, accept_time,
+    review_time, publicity_time, licence_time, certificate_number, `status`, form_retrieve,
+    task_refund, refund_content, retrieve_content, declare_user, declare_pwd, set_up_amount,
+    arrival_money, outsource_name, outsource_price, consultant_id, manager_id, outsource,
+    split_super, split_status, split_id, split_aid, split_time, cname, receiver_name,
+    declaration_batch, cost_reduction, official_cost, set_up_status, set_up_time, spot_check_status,
+    high_tech_status, special_comment, if_certification_fee, certification_fee, certification_corporate,
     time_record, if_publicity, check_status, patent_type, pubicity_url
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
-    select 
+    select
     <include refid="Base_Column_List" />
     from t_order_task
     where id = #{id,jdbcType=INTEGER}
@@ -86,46 +86,46 @@
     where id = #{id,jdbcType=INTEGER}
   </delete>
   <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true">
-    insert into t_order_task (order_no, main, super_id, 
-      commodity_id, commodity_name, commodity_quantity, 
-      commodity_mode, commodity_price, task_status, 
-      task_distribution_time, task_allocator, 
-      task_receiver, task_comment, task_start_time, 
-      task_end_time, attachment_url, project_status, 
-      accept_time, review_time, publicity_time, 
-      licence_time, certificate_number, `status`, 
-      form_retrieve, task_refund, refund_content, 
-      retrieve_content, declare_user, declare_pwd, 
-      set_up_amount, arrival_money, outsource_name, 
-      outsource_price, consultant_id, manager_id, 
-      outsource, split_super, split_status, 
-      split_id, split_aid, split_time, 
-      cname, receiver_name, declaration_batch, 
-      cost_reduction, official_cost, set_up_status, 
-      set_up_time, spot_check_status, high_tech_status, 
-      special_comment, if_certification_fee, certification_fee, 
-      certification_corporate, time_record, if_publicity, 
+    insert into t_order_task (order_no, main, super_id,
+      commodity_id, commodity_name, commodity_quantity,
+      commodity_mode, commodity_price, task_status,
+      task_distribution_time, task_allocator,
+      task_receiver, task_comment, task_start_time,
+      task_end_time, attachment_url, project_status,
+      accept_time, review_time, publicity_time,
+      licence_time, certificate_number, `status`,
+      form_retrieve, task_refund, refund_content,
+      retrieve_content, declare_user, declare_pwd,
+      set_up_amount, arrival_money, outsource_name,
+      outsource_price, consultant_id, manager_id,
+      outsource, split_super, split_status,
+      split_id, split_aid, split_time,
+      cname, receiver_name, declaration_batch,
+      cost_reduction, official_cost, set_up_status,
+      set_up_time, spot_check_status, high_tech_status,
+      special_comment, if_certification_fee, certification_fee,
+      certification_corporate, time_record, if_publicity,
       check_status, patent_type, pubicity_url
       )
-    values (#{orderNo,jdbcType=VARCHAR}, #{main,jdbcType=INTEGER}, #{superId,jdbcType=VARCHAR}, 
-      #{commodityId,jdbcType=VARCHAR}, #{commodityName,jdbcType=VARCHAR}, #{commodityQuantity,jdbcType=INTEGER}, 
-      #{commodityMode,jdbcType=VARCHAR}, #{commodityPrice,jdbcType=DECIMAL}, #{taskStatus,jdbcType=INTEGER}, 
-      #{taskDistributionTime,jdbcType=TIMESTAMP}, #{taskAllocator,jdbcType=VARCHAR}, 
-      #{taskReceiver,jdbcType=VARCHAR}, #{taskComment,jdbcType=VARCHAR}, #{taskStartTime,jdbcType=TIMESTAMP}, 
-      #{taskEndTime,jdbcType=TIMESTAMP}, #{attachmentUrl,jdbcType=VARCHAR}, #{projectStatus,jdbcType=INTEGER}, 
-      #{acceptTime,jdbcType=DATE}, #{reviewTime,jdbcType=DATE}, #{publicityTime,jdbcType=DATE}, 
-      #{licenceTime,jdbcType=DATE}, #{certificateNumber,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, 
-      #{formRetrieve,jdbcType=INTEGER}, #{taskRefund,jdbcType=INTEGER}, #{refundContent,jdbcType=VARCHAR}, 
-      #{retrieveContent,jdbcType=VARCHAR}, #{declareUser,jdbcType=VARCHAR}, #{declarePwd,jdbcType=VARCHAR}, 
-      #{setUpAmount,jdbcType=DECIMAL}, #{arrivalMoney,jdbcType=INTEGER}, #{outsourceName,jdbcType=VARCHAR}, 
-      #{outsourcePrice,jdbcType=DECIMAL}, #{consultantId,jdbcType=VARCHAR}, #{managerId,jdbcType=VARCHAR}, 
-      #{outsource,jdbcType=INTEGER}, #{splitSuper,jdbcType=INTEGER}, #{splitStatus,jdbcType=INTEGER}, 
-      #{splitId,jdbcType=INTEGER}, #{splitAid,jdbcType=VARCHAR}, #{splitTime,jdbcType=TIMESTAMP}, 
-      #{cname,jdbcType=VARCHAR}, #{receiverName,jdbcType=VARCHAR}, #{declarationBatch,jdbcType=INTEGER}, 
-      #{costReduction,jdbcType=INTEGER}, #{officialCost,jdbcType=INTEGER}, #{setUpStatus,jdbcType=INTEGER}, 
-      #{setUpTime,jdbcType=TIMESTAMP}, #{spotCheckStatus,jdbcType=INTEGER}, #{highTechStatus,jdbcType=INTEGER}, 
-      #{specialComment,jdbcType=VARCHAR}, #{ifCertificationFee,jdbcType=INTEGER}, #{certificationFee,jdbcType=DECIMAL}, 
-      #{certificationCorporate,jdbcType=VARCHAR}, #{timeRecord,jdbcType=VARCHAR}, #{ifPublicity,jdbcType=INTEGER}, 
+    values (#{orderNo,jdbcType=VARCHAR}, #{main,jdbcType=INTEGER}, #{superId,jdbcType=VARCHAR},
+      #{commodityId,jdbcType=VARCHAR}, #{commodityName,jdbcType=VARCHAR}, #{commodityQuantity,jdbcType=INTEGER},
+      #{commodityMode,jdbcType=VARCHAR}, #{commodityPrice,jdbcType=DECIMAL}, #{taskStatus,jdbcType=INTEGER},
+      #{taskDistributionTime,jdbcType=TIMESTAMP}, #{taskAllocator,jdbcType=VARCHAR},
+      #{taskReceiver,jdbcType=VARCHAR}, #{taskComment,jdbcType=VARCHAR}, #{taskStartTime,jdbcType=TIMESTAMP},
+      #{taskEndTime,jdbcType=TIMESTAMP}, #{attachmentUrl,jdbcType=VARCHAR}, #{projectStatus,jdbcType=INTEGER},
+      #{acceptTime,jdbcType=DATE}, #{reviewTime,jdbcType=DATE}, #{publicityTime,jdbcType=DATE},
+      #{licenceTime,jdbcType=DATE}, #{certificateNumber,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
+      #{formRetrieve,jdbcType=INTEGER}, #{taskRefund,jdbcType=INTEGER}, #{refundContent,jdbcType=VARCHAR},
+      #{retrieveContent,jdbcType=VARCHAR}, #{declareUser,jdbcType=VARCHAR}, #{declarePwd,jdbcType=VARCHAR},
+      #{setUpAmount,jdbcType=DECIMAL}, #{arrivalMoney,jdbcType=INTEGER}, #{outsourceName,jdbcType=VARCHAR},
+      #{outsourcePrice,jdbcType=DECIMAL}, #{consultantId,jdbcType=VARCHAR}, #{managerId,jdbcType=VARCHAR},
+      #{outsource,jdbcType=INTEGER}, #{splitSuper,jdbcType=INTEGER}, #{splitStatus,jdbcType=INTEGER},
+      #{splitId,jdbcType=INTEGER}, #{splitAid,jdbcType=VARCHAR}, #{splitTime,jdbcType=TIMESTAMP},
+      #{cname,jdbcType=VARCHAR}, #{receiverName,jdbcType=VARCHAR}, #{declarationBatch,jdbcType=INTEGER},
+      #{costReduction,jdbcType=INTEGER}, #{officialCost,jdbcType=INTEGER}, #{setUpStatus,jdbcType=INTEGER},
+      #{setUpTime,jdbcType=TIMESTAMP}, #{spotCheckStatus,jdbcType=INTEGER}, #{highTechStatus,jdbcType=INTEGER},
+      #{specialComment,jdbcType=VARCHAR}, #{ifCertificationFee,jdbcType=INTEGER}, #{certificationFee,jdbcType=DECIMAL},
+      #{certificationCorporate,jdbcType=VARCHAR}, #{timeRecord,jdbcType=VARCHAR}, #{ifPublicity,jdbcType=INTEGER},
       #{checkStatus,jdbcType=INTEGER}, #{patentType,jdbcType=INTEGER}, #{pubicityUrl,jdbcType=VARCHAR}
       )
   </insert>
@@ -2034,7 +2034,7 @@
   </update>
   <select id="selectAidByParam" resultType="com.goafanti.common.bo.OrderOperator">
     select a.id tid,b.order_no orderNo ,b.salesman_id salesmanId,b.finance_id financeId ,a.task_receiver techId,
-    b.salesman_name salesmanName ,b.finance_name financeName ,d.name techName
+    b.salesman_name salesmanName ,b.finance_name financeName ,d.name techName,b.buyer_name buyerName
     from t_order_task a left join t_order_mid b on a.order_no=b.order_no
     left join t_task_mid c on a.id =c.tid left join admin d on a.task_receiver=d.id
     where 1=1
@@ -2101,4 +2101,4 @@
     </if>
     desc
   </select>
-</mapper>
+</mapper>

+ 1 - 1
src/main/java/com/goafanti/common/task/OrderDunTask.java

@@ -142,7 +142,7 @@ public class OrderDunTask {
 					}
 				//财税-期限 计算时间
 				} else if(o.getProjectType().equals(OrderDunProjectType.CS.getCode())&&o.getDunType()==2) {
-				//获取年
+					//获取年
 					int year = now2.get(Calendar.YEAR);
 					//获取月份,0表示1月份
 					int month = now2.get(Calendar.MONTH) + 1;

+ 1 - 1
src/main/java/com/goafanti/common/utils/AsyncUtils.java

@@ -57,7 +57,7 @@ public class AsyncUtils {
 
 	public void addNoticAndEmail(Notice n) {
 		n.setType(NoticeTypes.getType(n.getNoticeType()));
-		AdminListBo a = adminMapper.getDeptNameByAid(TokenManager.getAdminId());
+		AdminListBo a = adminMapper.getDeptNameByAid(n.getAid());
 		EmailBo bo=new EmailBo(NoticeStatus.getStatus(n.getNoticeType()).getDesc(),a.getEmail(),n.getContent()) ;
 		noticeMapper.insertSelective(n);
 		send(bo);

+ 0 - 1
src/main/java/com/goafanti/common/utils/SendEmailUtil.java

@@ -93,7 +93,6 @@ public class SendEmailUtil {
 		msg.setFrom(new InternetAddress(MimeUtility.encodeText(AUTH_USER_NICKNAME) +"<" +  FROM + ">"));
 //		msg.setFrom(new InternetAddress(FROM));
 		String[] adds =  emailBo.getAddress().split(",");
-		String[] ees =  emailBo.getAddressee().split(",");
 		Date date = new Date();
 		for (int i = 0; i < adds.length; i++) {
 			InternetAddress internetAddress = new InternetAddress(adds[i]);

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

@@ -263,7 +263,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			OrderOperator oo=tOrderTaskMapper.selectAidByParam(t.getId());
 			if (oo!=null&&oo.getOrderNo()!=null&&oo.getSalesmanId()!=null) {
 				Notice n =new Notice();
-				String str2=String.format("[%s]完成了项目核对,订单编号[%s]项目编号[%s]。", oo.getSalesmanName(),oo.getOrderNo(),oo.getTid());
+				String str2=String.format("[%s]完成了专利核对,客户名称[%s]订单编号[%s]项目编号[%s]。", oo.getSalesmanName(),oo.getBuyerName(),oo.getOrderNo(),oo.getTid());
 				n.setId(UUID.randomUUID().toString());
 				n.setAid(oo.getTechId());
 				n.setNoticeType(NoticeStatus.ITEM_CHECK_END.getCode());
@@ -777,9 +777,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		if (specially==null)specially=0;
 		params.put("specially", specially);
 		Integer i=null;
-		if(TokenManager.hasRole(AFTConstants.SALESMAN)) {
-			params.put("aid", TokenManager.getAdminId());
-		} else if (TokenManager.hasRole(AFTConstants.FINANCE)) {
+		if (TokenManager.hasRole(AFTConstants.FINANCE)) {
 			i=1;
 			params.put("fid", TokenManager.getAdminId());
 		}else if (TokenManager.hasRole(AFTConstants.FINANCE_MANAGER)) {
@@ -789,6 +787,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 				TokenManager.hasRole(AFTConstants.SUPERADMIN)||TokenManager.hasRole(AFTConstants.CED)||
 				TokenManager.hasRole(AFTConstants.APPROVAL_DECISION)){
 			i=3;
+		}else {
+				params.put("aid", TokenManager.getAdminId());
 		}
 		if (specially==1){
 			params.put("aid", aid);
@@ -1370,14 +1370,14 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		if (StringUtils.isNotBlank(in.gettStarTime())) params.put("tStarTime", in.gettStarTime());
 		if (StringUtils.isNotBlank(in.gettEndTime())) params.put("tEndTime", in.gettEndTime()+" 23:59:59");
 		Integer i=null;
-		if(TokenManager.hasRole(AFTConstants.SALESMAN)) {
-			params.put("aid", TokenManager.getAdminId());
-		} else if (TokenManager.hasRole(AFTConstants.FINANCE)) {
+		 if (TokenManager.hasRole(AFTConstants.FINANCE)) {
 			i=1;
 			params.put("fid", TokenManager.getAdminId());
 		}else if (TokenManager.hasRole(AFTConstants.FINANCE_MANAGER)) {
 			i=2;
 			params.put("fid", TokenManager.getAdminId());
+		}else{
+			 params.put("aid", TokenManager.getAdminId());
 		}
 		if (TokenManager.hasRole(AFTConstants.FINANCE_ADMIN)||TokenManager.hasRole(AFTConstants.VICE_CEO)||
 				TokenManager.hasRole(AFTConstants.SUPERADMIN)||TokenManager.hasRole(AFTConstants.CED)||

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

@@ -984,7 +984,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		OrderOperator oo=tOrderTaskMapper.selectAidByParam(tid);
 		if (oo!=null&&oo.getOrderNo()!=null&&oo.getSalesmanId()!=null) {
 			Notice n =new Notice();
-			String str=String.format("[%s]发起项目核对,订单编号[%s]项目编号[%s]。", oo.getTechName(),oo.getOrderNo(),oo.getTid());
+			String str=String.format("[%s]发起专利核对,客户名称[%s]订单编号[%s]项目编号[%s]。", oo.getTechName(),oo.getBuyerName(),oo.getOrderNo(),oo.getTid());
 			n.setId(UUID.randomUUID().toString());
 			n.setAid(oo.getSalesmanId());
 			n.setNoticeType(NoticeStatus.ITEM_CHECK_START.getCode());

+ 0 - 31
src/main/java/com/goafanti/organization/service/impl/ThirdPartyCompanyServiceImpl.java

@@ -945,10 +945,6 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 
 	}
 
-
-
-
-
 	@Override
 	public Result exportPaymentList(HttpServletResponse response, InputPaymentList ip, Integer type) {
 		if (type==null) type=0;
@@ -995,10 +991,6 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 		}
 	}
 
-
-
-
-
 	@Override
 	public boolean checkOfficialFeePrice(OfficialFeePrice o) {
 		OfficialFeePrice x=officialFeePriceMapper.countOfficialFeePrice(o);
@@ -1010,10 +1002,6 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 		return false;
 	}
 
-
-
-
-
 	@Override
 	public int pushPaymentExamine(PaymentLog in,String pids) {
 		Admin a=adminMapper.selectAllByid(TokenManager.getAdminId());
@@ -1042,10 +1030,6 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 
 	}
 
-
-
-
-
 	@Override
 	public boolean checkQuantity(TOrderPayment p) {
 		TOrderPayment tp=tOrderPaymentMapper.selectByPrimaryKey(p.getId());
@@ -1065,10 +1049,6 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 		return false;
 	}
 
-
-
-
-
 	@Override
 	public Map<String, Object>  checkThirdParty(Integer id) {
 		int x =tOrderPaymentMapper.selectByCid(id);
@@ -1095,10 +1075,6 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 
 	}
 
-
-
-
-
 	@Override
 	public Object updateCheck(Integer id,Integer type) {
 		Map<String, Object> map=new HashedMap<String, Object>();
@@ -1150,9 +1126,6 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 		return map;
 	}
 
-
-
-
 	/**
 	 * 根据项目编号重新计算订单成本与已付
 	 * @param id
@@ -1168,10 +1141,6 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 		tOrderMidMapper.updateCostAmount(id, cost,party);
 	}
 
-
-
-
-
 	@Override
 	public Object checkNode(Integer id) {
 		Integer i=0;

+ 2 - 0
src/main/java/com/goafanti/user/controller/UserLoginController.java

@@ -13,6 +13,7 @@ import org.apache.shiro.web.util.WebUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.CrossOrigin;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
@@ -100,6 +101,7 @@ public class UserLoginController extends BaseController {
 	 */
 	@RequestMapping(value = "/managesignin", method = RequestMethod.POST)
 	@ResponseBody
+	@CrossOrigin
 	public Result managesignin(Admin admin, Boolean remember, HttpServletRequest request) {
 		Result res = new Result();
 		String mobile=adminMapper.selectStatusByMobile(admin.getMobile());