|
|
@@ -16,13 +16,10 @@ import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.UUID;
|
|
|
-import java.util.regex.Matcher;
|
|
|
-import java.util.regex.Pattern;
|
|
|
|
|
|
import javax.mail.MessagingException;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
-
|
|
|
-import org.apache.commons.beanutils.BeanUtils;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.apache.commons.beanutils.ConvertUtils;
|
|
|
import org.apache.commons.beanutils.converters.DateConverter;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
@@ -101,6 +98,7 @@ import com.goafanti.order.bo.outOrderDunListBo;
|
|
|
import com.goafanti.order.enums.ActiveState;
|
|
|
import com.goafanti.order.enums.ApprovalNewState;
|
|
|
import com.goafanti.order.enums.LiquidationNewState;
|
|
|
+import com.goafanti.order.enums.NewOrderDunType;
|
|
|
import com.goafanti.order.enums.OrderDunSubject;
|
|
|
import com.goafanti.order.enums.OrderNewState;
|
|
|
import com.goafanti.order.enums.ProcessStatus;
|
|
|
@@ -626,26 +624,21 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
|
|
|
public void NewDunsendEmail(String orderNo,Integer dunId,AdminListBo a,TOrderNewBo b) throws UnsupportedEncodingException, MessagingException{
|
|
|
LoggerUtils.debug(logger, "======================邮件信息发送===================");
|
|
|
- OutNewOrderDunBo ob=new OutNewOrderDunBo();
|
|
|
- if(dunId!=null)
|
|
|
- try {
|
|
|
- ConvertUtils.register(new DateConverter(null), java.util.Date.class);
|
|
|
- BeanUtils.copyProperties(ob, newOrderDunMapper.selectByPrimaryKey(dunId));
|
|
|
- } catch (IllegalAccessException | InvocationTargetException e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
+ NewOrderDun ob=newOrderDunMapper.selectByPrimaryKey(dunId);
|
|
|
AdminListBo a2 = adminMapper.getDeptNameByAid(b.getSalesmanId());
|
|
|
+ String dunTypeName="";
|
|
|
+ if(ob.getDunType()!=null&&ob.getProjectType()!=null) {
|
|
|
+ dunTypeName= NewOrderDunType.getValueByCode(Integer.valueOf(""+ob.getProjectType()+ob.getDunType()));
|
|
|
+ }
|
|
|
//发送驳回邮件
|
|
|
-
|
|
|
-
|
|
|
- if(SendEmailUtil.isEmail(b.getEmail())) {
|
|
|
- EmailBo bo = new EmailBo("催收通知", b.getEmail(), a.getDepartmentName(), a.getName(),
|
|
|
- "", orderNo,new SimpleDateFormat("yyyy-MM-dd").format(ob.getCreateTime()),ob.getDunTypeName(),a2.getName(),b.getUserName(),1);
|
|
|
- if(StringUtils.isNotBlank(b.getEmail())) {
|
|
|
- SendEmailUtil.getInstance().patentSend(bo);
|
|
|
- }
|
|
|
- LoggerUtils.debug(logger, "=========================================发送邮件成功");
|
|
|
- }
|
|
|
+ if(SendEmailUtil.isEmail(b.getEmail())) {
|
|
|
+ EmailBo bo = new EmailBo("催收通知", b.getEmail(), a.getDepartmentName(), a.getName(),
|
|
|
+ "", orderNo,new SimpleDateFormat("yyyy-MM-dd").format(ob.getCreateTime()),dunTypeName,a2.getName(),b.getUserName(),1);
|
|
|
+ if(StringUtils.isNotBlank(b.getEmail())) {
|
|
|
+ SendEmailUtil.getInstance().patentSend(bo);
|
|
|
+ }
|
|
|
+ LoggerUtils.debug(logger, "=========================================发送邮件成功");
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|