Commit 276f3e0ccbb3e338d6e1b6b44560ba638dbc633a
1 parent
aa00f5e6
邮件发送配置
Showing
10 changed files
with
357 additions
and
36 deletions
pom.xml
... | ... | @@ -282,6 +282,17 @@ |
282 | 282 | <version>${x-easypdf-pdfbox.version}</version> |
283 | 283 | </dependency> |
284 | 284 | |
285 | + <!--email邮件配置--> | |
286 | + <dependency> | |
287 | + <groupId>org.springframework.boot</groupId> | |
288 | + <artifactId>spring-boot-starter-mail</artifactId> | |
289 | + </dependency> | |
290 | + | |
291 | + <!--Freemarker--> | |
292 | + <dependency> | |
293 | + <groupId>org.springframework.boot</groupId> | |
294 | + <artifactId>spring-boot-starter-freemarker</artifactId> | |
295 | + </dependency> | |
285 | 296 | </dependencies> |
286 | 297 | <build> |
287 | 298 | <finalName>order-erp.service-1.0-SNAPSHOT</finalName> | ... | ... |
src/main/java/com/order/erp/common/utils/EmailSendUtils.java
0 → 100644
1 | +package com.order.erp.common.utils; | |
2 | +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; | |
3 | +import com.order.erp.domain.EmailTemplateEnum; | |
4 | +import com.order.erp.domain.email.OrderProductEmailVO; | |
5 | +import freemarker.template.Template; | |
6 | +import freemarker.template.TemplateException; | |
7 | +import org.springframework.beans.factory.annotation.Value; | |
8 | +import org.springframework.mail.javamail.JavaMailSender; | |
9 | +import org.springframework.mail.javamail.MimeMessageHelper; | |
10 | +import org.springframework.stereotype.Component; | |
11 | +import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer; | |
12 | +import javax.annotation.Resource; | |
13 | +import javax.mail.MessagingException; | |
14 | +import javax.mail.internet.MimeMessage; | |
15 | +import java.io.File; | |
16 | +import java.io.IOException; | |
17 | +import java.io.StringWriter; | |
18 | +import java.util.Date; | |
19 | +import java.util.HashMap; | |
20 | +import java.util.List; | |
21 | +import java.util.Map; | |
22 | + | |
23 | +/** | |
24 | + * @Author:ch | |
25 | + * @createTime:2024-07-18 | |
26 | + */ | |
27 | +@Component | |
28 | +public class EmailSendUtils { | |
29 | + @Value("${spring.mail.username}") | |
30 | + public String sendEmail; | |
31 | + @Resource | |
32 | + private JavaMailSender javaMailSender; | |
33 | + @Resource | |
34 | + private FreeMarkerConfigurer freeMarkerConfigurer; | |
35 | + | |
36 | + /** | |
37 | + * @Description: 发送邮件 | |
38 | + * @param emailTemplateEnum 邮件事件类型 | |
39 | + * @param receiveemailList 收件人邮箱 | |
40 | + * @param orderProductEmailVO 订单基本信息,订单-质检信息。 | |
41 | + * @throws MessagingException | |
42 | + * @throws IOException | |
43 | + */ | |
44 | + | |
45 | + public void sendEmail(EmailTemplateEnum emailTemplateEnum, List<String> receiveemailList, OrderProductEmailVO orderProductEmailVO) throws MessagingException, IOException, TemplateException { | |
46 | + MimeMessage mimeMessage = javaMailSender.createMimeMessage(); | |
47 | + if(CollectionUtils.isNotEmpty(receiveemailList)){ | |
48 | + MimeMessageHelper helper=new MimeMessageHelper(mimeMessage,true); | |
49 | + //设置邮件的主题 | |
50 | + helper.setSubject(emailTemplateEnum.getTitle()); | |
51 | + //设置发件人 | |
52 | + helper.setFrom(sendEmail); | |
53 | + //设置收件人 | |
54 | + String[] receiveemailListArray = receiveemailList.toArray(new String[receiveemailList.size()]); | |
55 | + helper.setTo(receiveemailListArray); | |
56 | + helper.setSentDate(new Date()); | |
57 | + Map<String, Object> map = new HashMap<>(); | |
58 | + map.put("context",emailTemplateEnum.getContent()); | |
59 | + map.put("title",emailTemplateEnum.getTitle()); | |
60 | + map.put("data",orderProductEmailVO); | |
61 | + Template template = freeMarkerConfigurer.getConfiguration().getTemplate("mail.ftl"); | |
62 | + StringWriter stringWriter = new StringWriter(); | |
63 | + template.process(map,stringWriter); | |
64 | + helper.setText(stringWriter.toString(),true); | |
65 | + javaMailSender.send(mimeMessage); | |
66 | + } | |
67 | + } | |
68 | + /** | |
69 | + * @Description: 发送生产指示书邮件 | |
70 | + * @param emailTemplateEnum 邮件事件类型 | |
71 | + * @param receiveemailList 收件人邮箱 | |
72 | + * @param pdfFile pdf文件 | |
73 | + * @throws MessagingException | |
74 | + * @throws IOException | |
75 | + */ | |
76 | + //生产指示书以附件方式发送。 | |
77 | + public void sendEmail(EmailTemplateEnum emailTemplateEnum, List<String> receiveemailList, File pdfFile) throws MessagingException { | |
78 | + MimeMessage mimeMessage = javaMailSender.createMimeMessage(); | |
79 | + MimeMessageHelper helper=new MimeMessageHelper(mimeMessage,true); | |
80 | + //设置邮件的主题 | |
81 | + helper.setSubject(emailTemplateEnum.getTitle()); | |
82 | + //设置发件人 | |
83 | + helper.setFrom(sendEmail); | |
84 | + //设置收件人 | |
85 | + String[] receiveemailListArray = receiveemailList.toArray(new String[receiveemailList.size()]); | |
86 | + helper.setTo(receiveemailListArray); | |
87 | + helper.setSentDate(new Date()); | |
88 | + helper.setText(emailTemplateEnum.getContent()); | |
89 | + helper.addAttachment(pdfFile.getName(),pdfFile); | |
90 | + javaMailSender.send(mimeMessage); | |
91 | + } | |
92 | +} | |
0 | 93 | \ No newline at end of file | ... | ... |
src/main/java/com/order/erp/config/FreemarkerConfig.java
0 → 100644
1 | +package com.order.erp.config; | |
2 | + | |
3 | +import org.springframework.context.annotation.Bean; | |
4 | +import org.springframework.context.annotation.Configuration; | |
5 | +import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer; | |
6 | + | |
7 | +/** | |
8 | + * @Author:ch | |
9 | + * @createTime:2024-07-23 | |
10 | + */ | |
11 | +@Configuration | |
12 | +public class FreemarkerConfig { | |
13 | + @Bean | |
14 | + public FreeMarkerConfigurer freemarkerConfigurer() { | |
15 | + FreeMarkerConfigurer configurer = new FreeMarkerConfigurer(); | |
16 | + configurer.setTemplateLoaderPath("classpath:/templates"); | |
17 | + return configurer; | |
18 | + } | |
19 | +} | ... | ... |
src/main/java/com/order/erp/controller/ReceiveEmailMappingController.java
1 | 1 | package com.order.erp.controller; |
2 | 2 | |
3 | 3 | import com.order.erp.common.constant.ServerResult; |
4 | -import com.order.erp.common.jsr303.OperateGroup; | |
4 | +import com.order.erp.domain.dto.order.ReceiveEmailMappingDO; | |
5 | 5 | import com.order.erp.domain.vo.order.ReceiveEmailMappingQueryVO; |
6 | 6 | import com.order.erp.domain.vo.order.ReceiveEmailMappingVO; |
7 | 7 | import com.order.erp.service.order.ReceiveEmailMappingService; |
8 | -import org.springframework.validation.annotation.Validated; | |
9 | 8 | import org.springframework.web.bind.annotation.PostMapping; |
10 | 9 | import org.springframework.web.bind.annotation.RequestBody; |
11 | 10 | import org.springframework.web.bind.annotation.RequestMapping; |
... | ... | @@ -31,12 +30,12 @@ public class ReceiveEmailMappingController { |
31 | 30 | /** |
32 | 31 | * 分页查询 |
33 | 32 | * |
34 | - * @param receiveEmailMappingQueryVO 查询条件 | |
33 | + * | |
35 | 34 | * @return 查询结果 |
36 | 35 | */ |
37 | 36 | @PostMapping("/list") |
38 | - public ServerResult list(@RequestBody @Validated({OperateGroup.List.class}) ReceiveEmailMappingQueryVO receiveEmailMappingQueryVO) { | |
39 | - return receiveEmailMappingService.list(receiveEmailMappingQueryVO); | |
37 | + public ServerResult list() { | |
38 | + return receiveEmailMappingService.listGetAll(); | |
40 | 39 | } |
41 | 40 | |
42 | 41 | |
... | ... | @@ -65,13 +64,33 @@ public class ReceiveEmailMappingController { |
65 | 64 | /** |
66 | 65 | * 删除数据 |
67 | 66 | * |
68 | - * @param receiveEmailMappingQueryVO 查询条件 | |
67 | + * @param receiveEmailMappingVO 查询条件 | |
69 | 68 | * @return 删除是否成功 |
70 | 69 | */ |
71 | 70 | @PostMapping("/delete_by_id") |
72 | - public ServerResult deleteById(@RequestBody ReceiveEmailMappingQueryVO receiveEmailMappingQueryVO) { | |
73 | - return receiveEmailMappingService.deleteById(receiveEmailMappingQueryVO); | |
71 | + public ServerResult deleteById(@RequestBody ReceiveEmailMappingVO receiveEmailMappingVO) { | |
72 | + return receiveEmailMappingService.deleteById(receiveEmailMappingVO); | |
73 | + } | |
74 | + /** | |
75 | + * 通过id查询单条数据 | |
76 | + * | |
77 | + * @param receiveEmailMappingQueryVO 查询条件 | |
78 | + * @return 实例对象 | |
79 | + */ | |
80 | + @PostMapping("/query_by_id") | |
81 | + public ServerResult queryById(@RequestBody ReceiveEmailMappingQueryVO receiveEmailMappingQueryVO) { | |
82 | + return receiveEmailMappingService.queryById(receiveEmailMappingQueryVO); | |
74 | 83 | } |
75 | 84 | |
85 | + /** | |
86 | + * 禁用/启用配置 | |
87 | + * | |
88 | + * @param receiveEmailMappingDo 数据vo | |
89 | + * @return 操作结果 | |
90 | + */ | |
91 | + @PostMapping("/opt") | |
92 | + public ServerResult opt(@RequestBody ReceiveEmailMappingDO receiveEmailMappingDo) { | |
93 | + return receiveEmailMappingService.opt(receiveEmailMappingDo); | |
94 | + } | |
76 | 95 | } |
77 | 96 | ... | ... |
src/main/java/com/order/erp/domain/EmailTemplateEnum.java
src/main/java/com/order/erp/domain/email/OrderProductEmailVO.java
0 → 100644
1 | +package com.order.erp.domain.email; | |
2 | + | |
3 | +import com.order.erp.domain.dto.order.OrderBaseInfoDO; | |
4 | +import com.order.erp.domain.dto.order.OrderInspectionStageDO; | |
5 | +import lombok.*; | |
6 | +import lombok.experimental.SuperBuilder; | |
7 | + | |
8 | +/** | |
9 | + * @Author:ch | |
10 | + * @createTime:2024-07-24 | |
11 | + */ | |
12 | +@Data | |
13 | +@AllArgsConstructor | |
14 | +@ToString | |
15 | +@NoArgsConstructor | |
16 | +@EqualsAndHashCode(callSuper = false) | |
17 | +@SuperBuilder | |
18 | +public class OrderProductEmailVO { | |
19 | + | |
20 | + private OrderBaseInfoDO baseInfo; | |
21 | + | |
22 | + private OrderInspectionStageDO inspectionStageInfo; | |
23 | +} | ... | ... |
src/main/java/com/order/erp/mapper/order/ReceiveEmailMappingMapper.java
... | ... | @@ -2,6 +2,11 @@ package com.order.erp.mapper.order; |
2 | 2 | |
3 | 3 | import com.order.erp.domain.dto.order.ReceiveEmailMappingDO; |
4 | 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
5 | +import org.apache.ibatis.annotations.Param; | |
6 | +import org.apache.ibatis.annotations.Select; | |
7 | +import org.apache.ibatis.annotations.Update; | |
8 | + | |
9 | +import java.util.List; | |
5 | 10 | |
6 | 11 | /** |
7 | 12 | * 邮件接收人信息绑定表(ReceiveEmailMapping)表数据库访问层 |
... | ... | @@ -10,7 +15,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
10 | 15 | * @since 2024-07-03 10:58:52 |
11 | 16 | */ |
12 | 17 | public interface ReceiveEmailMappingMapper extends BaseMapper<ReceiveEmailMappingDO> { |
13 | - | |
14 | - | |
18 | +@Update("update receive_email_mapping set enable_flag = #{enableFlag} where id = #{id}") | |
19 | + int updateEnable(@Param("id") Long id, @Param("enableFlag") int enableFlag); | |
20 | +@Select("select * from receive_email_mapping where id = #{id}") | |
21 | + ReceiveEmailMappingDO getReceiveEmailMappingDO(@Param("id") Long id); | |
22 | +@Select("select * from receive_email_mapping where enable_flag in (#{10},#{30})") | |
23 | + List<ReceiveEmailMappingDO> listGetAll(@Param("10")int enableFlag,@Param("30") int enableFlag1); | |
15 | 24 | } |
16 | 25 | ... | ... |
src/main/java/com/order/erp/service/order/ReceiveEmailMappingService.java
... | ... | @@ -26,10 +26,10 @@ public interface ReceiveEmailMappingService extends IService<ReceiveEmailMapping |
26 | 26 | /** |
27 | 27 | * 分页查询 |
28 | 28 | * |
29 | - * @param receiveEmailMappingQueryVO 筛选条件 | |
29 | + * | |
30 | 30 | * @return 查询结果 |
31 | 31 | */ |
32 | - ServerResult list(ReceiveEmailMappingQueryVO receiveEmailMappingQueryVO); | |
32 | + ServerResult listGetAll(); | |
33 | 33 | |
34 | 34 | /** |
35 | 35 | * 新增数据 |
... | ... | @@ -50,9 +50,11 @@ public interface ReceiveEmailMappingService extends IService<ReceiveEmailMapping |
50 | 50 | /** |
51 | 51 | * 通过主键删除数据 |
52 | 52 | * |
53 | - * @param receiveEmailMappingQueryVO 筛选条件 | |
53 | + * @param receiveEmailMappingVO 筛选条件 | |
54 | 54 | * @return 是否成功 |
55 | 55 | */ |
56 | - ServerResult deleteById(ReceiveEmailMappingQueryVO receiveEmailMappingQueryVO); | |
56 | + ServerResult deleteById(ReceiveEmailMappingVO receiveEmailMappingVO); | |
57 | + | |
58 | + ServerResult opt(ReceiveEmailMappingDO receiveEmailMappingDo); | |
57 | 59 | |
58 | 60 | } | ... | ... |
src/main/java/com/order/erp/service/order/impl/ReceiveEmailMappingServiceImpl.java
... | ... | @@ -2,11 +2,16 @@ package com.order.erp.service.order.impl; |
2 | 2 | |
3 | 3 | import cn.hutool.core.bean.BeanUtil; |
4 | 4 | import cn.hutool.core.collection.CollUtil; |
5 | +import com.alibaba.fastjson.JSONObject; | |
6 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
5 | 7 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
8 | +import com.baomidou.mybatisplus.core.metadata.IPage; | |
9 | +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; | |
10 | +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; | |
11 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
6 | 12 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
7 | 13 | import com.order.erp.common.constant.Constant; |
8 | 14 | import com.order.erp.common.constant.ServerResult; |
9 | -import com.order.erp.common.utils.PageUtils; | |
10 | 15 | import com.order.erp.domain.dto.order.ReceiveEmailMappingDO; |
11 | 16 | import com.order.erp.domain.vo.order.ReceiveEmailMappingQueryVO; |
12 | 17 | import com.order.erp.domain.vo.order.ReceiveEmailMappingVO; |
... | ... | @@ -14,7 +19,6 @@ import com.order.erp.mapper.order.ReceiveEmailMappingMapper; |
14 | 19 | import com.order.erp.service.order.ReceiveEmailMappingService; |
15 | 20 | import lombok.extern.slf4j.Slf4j; |
16 | 21 | import org.springframework.stereotype.Service; |
17 | - | |
18 | 22 | import java.util.List; |
19 | 23 | import java.util.Objects; |
20 | 24 | |
... | ... | @@ -51,13 +55,14 @@ public class ReceiveEmailMappingServiceImpl extends ServiceImpl<ReceiveEmailMapp |
51 | 55 | /** |
52 | 56 | * 分页查询 |
53 | 57 | * |
54 | - * @param receiveEmailMappingQueryVO 筛选条件 | |
55 | 58 | * @return 查询结果 |
56 | 59 | */ |
57 | 60 | @Override |
58 | - public ServerResult list(ReceiveEmailMappingQueryVO receiveEmailMappingQueryVO) { | |
59 | - | |
60 | - return ServerResult.success(PageUtils.getPageReturn(null, receiveEmailMappingQueryVO)); | |
61 | + public ServerResult listGetAll() { | |
62 | + Page<ReceiveEmailMappingDO> receiveEmailMappingDOPage = new Page<>(); | |
63 | + List<ReceiveEmailMappingDO> receiveEmailMappingDOList = baseMapper.listGetAll(Constant.ENABLE_TEN, Constant.THIRTY); | |
64 | + receiveEmailMappingDOPage.setRecords(receiveEmailMappingDOList); | |
65 | + return ServerResult.success(receiveEmailMappingDOPage); | |
61 | 66 | } |
62 | 67 | |
63 | 68 | /** |
... | ... | @@ -73,9 +78,8 @@ public class ReceiveEmailMappingServiceImpl extends ServiceImpl<ReceiveEmailMapp |
73 | 78 | receiveEmailMappingVO.setId(null); |
74 | 79 | } |
75 | 80 | ReceiveEmailMappingDO receiveEmailMappingDo = BeanUtil.copyProperties(receiveEmailMappingVO, ReceiveEmailMappingDO.class); |
76 | - | |
81 | + receiveEmailMappingDo.setConfigInfos(JSONObject.toJSONString(receiveEmailMappingVO.getConfigInfos())); | |
77 | 82 | save(receiveEmailMappingDo); |
78 | - | |
79 | 83 | return ServerResult.success(); |
80 | 84 | } |
81 | 85 | |
... | ... | @@ -92,33 +96,49 @@ public class ReceiveEmailMappingServiceImpl extends ServiceImpl<ReceiveEmailMapp |
92 | 96 | return ServerResult.fail("id 不能为空"); |
93 | 97 | } |
94 | 98 | ReceiveEmailMappingDO receiveEmailMappingDo = BeanUtil.copyProperties(receiveEmailMappingVO, ReceiveEmailMappingDO.class); |
95 | - | |
99 | + receiveEmailMappingDo.setConfigInfos(JSONObject.toJSONString(receiveEmailMappingVO.getConfigInfos())); | |
96 | 100 | updateById(receiveEmailMappingDo); |
97 | - | |
98 | 101 | return ServerResult.success(); |
99 | 102 | } |
100 | 103 | |
101 | 104 | /** |
102 | 105 | * 通过主键删除数据 |
103 | 106 | * |
104 | - * @param receiveEmailMappingQueryVO 筛选条件 | |
107 | + * @param receiveEmailMappingVO 筛选条件 | |
105 | 108 | * @return 是否成功 |
106 | 109 | */ |
107 | 110 | @Override |
108 | - public ServerResult deleteById(ReceiveEmailMappingQueryVO receiveEmailMappingQueryVO) { | |
109 | - List<Long> ids = receiveEmailMappingQueryVO.getIds(); | |
110 | - if (CollUtil.isEmpty(ids)) { | |
111 | - return ServerResult.fail("ids 参数不能为空"); | |
111 | + public ServerResult deleteById(ReceiveEmailMappingVO receiveEmailMappingVO) { | |
112 | + if (ObjectUtils.isNull(receiveEmailMappingVO.getId())) { | |
113 | + return ServerResult.fail("id 参数不能为空"); | |
112 | 114 | } |
113 | - List<ReceiveEmailMappingDO> receiveEmailMappingList = listByIds(ids); | |
114 | - if (CollUtil.isEmpty(receiveEmailMappingList)) { | |
115 | + ReceiveEmailMappingDO receiveEmailMappingDO = baseMapper.getReceiveEmailMappingDO(receiveEmailMappingVO.getId()); | |
116 | + if (ObjectUtils.isNull(receiveEmailMappingDO)) { | |
115 | 117 | return ServerResult.success(); |
116 | 118 | } |
117 | - //todo 校验是否可以逻辑删除 | |
118 | - LambdaUpdateWrapper<ReceiveEmailMappingDO> updateWrapper = new LambdaUpdateWrapper<ReceiveEmailMappingDO>() | |
119 | - .in(ReceiveEmailMappingDO::getId, ids) | |
120 | - .set(ReceiveEmailMappingDO::getEnableFlag, Constant.UNABLE_TWENTY); | |
121 | - update(updateWrapper); | |
119 | + baseMapper.updateEnable(receiveEmailMappingDO.getId(), Constant.UNABLE_TWENTY); | |
120 | + return ServerResult.success(); | |
121 | + } | |
122 | + /** | |
123 | + * 启用/禁用记录 | |
124 | + * | |
125 | + * @param receiveEmailMappingDo 实例对象 | |
126 | + * @return 是否成功 | |
127 | + */ | |
128 | + @Override | |
129 | + public ServerResult opt(ReceiveEmailMappingDO receiveEmailMappingDo) { | |
130 | + if(ObjectUtils.isNull(receiveEmailMappingDo.getId())){ | |
131 | + return ServerResult.fail("id 参数不能为空"); | |
132 | + } | |
133 | + ReceiveEmailMappingDO receiveEmailMappingDO = baseMapper.getReceiveEmailMappingDO(receiveEmailMappingDo.getId()); | |
134 | + if (Objects.isNull(receiveEmailMappingDO)){ | |
135 | + return ServerResult.success(); | |
136 | + } | |
137 | + if(Constant.ENABLE_TEN==receiveEmailMappingDo.getEnableFlag()){ | |
138 | + baseMapper.updateEnable(receiveEmailMappingDO.getId(), Constant.ENABLE_TEN); | |
139 | + }else if(Constant.THIRTY==receiveEmailMappingDo.getEnableFlag()){ | |
140 | + baseMapper.updateEnable(receiveEmailMappingDO.getId(), Constant.THIRTY); | |
141 | + } | |
122 | 142 | return ServerResult.success(); |
123 | 143 | } |
124 | 144 | } | ... | ... |
src/main/resources/templates/mail.ftl
0 → 100644
1 | +<!DOCTYPE html> | |
2 | +<html lang="en" xmlns="http://www.w3.org/1999/html"> | |
3 | +<head> | |
4 | + <meta charset="UTF-8"> | |
5 | + <title>通用邮件模板</title> | |
6 | + <style> | |
7 | + #title1 { | |
8 | + background: black; | |
9 | + } | |
10 | + | |
11 | + #title1 > td { | |
12 | + color: aliceblue; | |
13 | + border-right: 1px solid white; | |
14 | + } | |
15 | + | |
16 | + #title2 td { | |
17 | + border-right: 1px solid black; | |
18 | + } | |
19 | + | |
20 | + table { | |
21 | + border-collapse: collapse; | |
22 | + width: 100%; | |
23 | + height: 25%; | |
24 | + font-size: 2rem; | |
25 | + } | |
26 | + | |
27 | + th, td { | |
28 | + border: 1px solid black; | |
29 | + text-align: center; | |
30 | + } | |
31 | + </style> | |
32 | +</head> | |
33 | +<body> | |
34 | +<h3>${context}</h3> | |
35 | +<table border="1"> | |
36 | + <tr id="title1"> | |
37 | + <#if title=="中期验货报告" || title=="尾期验货报告"> | |
38 | + <td> 项目号</td> | |
39 | + <td> 生产科</td> | |
40 | + <td> 内部编号</td> | |
41 | + <td> 客户PO号</td> | |
42 | + <td> 客户SYSTEM</td> | |
43 | + <td> PO COLOR</td> | |
44 | + <td> 订单图片</td> | |
45 | + <td> 数量 </td> | |
46 | + <td> 生产科拖货时间</td> | |
47 | + <td> 包装类型</td> | |
48 | + <td> 中期验货申请时间</td> | |
49 | + <td> 中期验货(功能性-拉力/跌落等、外观性-颜色/规格等、耐力性-烤厅等)</td> | |
50 | + <td> 中期验货结果PASS/FALL</td> | |
51 | + <#elseif title=="尾期验货日期"> | |
52 | + <td> 客户编码</td> | |
53 | + <td> 项目号</td> | |
54 | + <td> 生产科</td> | |
55 | + <td> 内部编号</td> | |
56 | + <td> 客户PO号</td> | |
57 | + <td> 客户SYSTEM</td> | |
58 | + <td> PO COLOR</td> | |
59 | + <td> 订单图片</td> | |
60 | + <td> 生产要求</td> | |
61 | + <td> 数量</td> | |
62 | + <td> 生产科拖货时间</td> | |
63 | + <#else> | |
64 | + <td> 客户编码</td> | |
65 | + <td> 项目号</td> | |
66 | + <td> 生产科</td> | |
67 | + <td> 内部编号</td> | |
68 | + <td> 客户PO号</td> | |
69 | + <td> 客户SYSTEM</td> | |
70 | + <td> PO COLOR</td> | |
71 | + <td> 订单图片</td> | |
72 | + <td> 生产要求</td> | |
73 | + <td> 数量</td> | |
74 | + <td> 生产科拖货时间</td> | |
75 | + <td> 订单上的HOD时间</td> | |
76 | + <td> 出库类型</td> | |
77 | + </#if> | |
78 | + </tr> | |
79 | + <tr id="title2"> | |
80 | + <#if title=="中期验货报告" || title=="尾期验货报告"> | |
81 | + <td>${data.baseInfo.projectNo! " "}</td> | |
82 | + <td>${data.baseInfo.productionDepartment! " "}</td> | |
83 | + <td>${data.baseInfo.internalNo! " "}</td> | |
84 | + <td>${data.baseInfo.customerPo! " "}</td> | |
85 | + <td>${data.baseInfo.customerStyle! " "}</td> | |
86 | + <td>${data.baseInfo.poColor! " "}</td> | |
87 | + <td><img src="${data.baseInfo.smallPicUrl! " "}" alt="Image"></td> | |
88 | + <td>${data.baseInfo.orderCount! " "}</td> | |
89 | + <td>${data.baseInfo.productionDepartmentConsignTime! " "}</td> | |
90 | + <td>${data.baseInfo.packetType! " "}</td> | |
91 | + <td>${data.inspectionStageInfo.midCheckApplyTime! " "}</td> | |
92 | + <td>${data.inspectionStageInfo.midCheckComment! " "}</td> | |
93 | + <td>${data.inspectionStageInfo.midCheckResult! " "}</td> | |
94 | + <#elseif title=="尾期验货日期"> | |
95 | + <td>${data.baseInfo.customerCode! " "}</td> | |
96 | + <td>${data.baseInfo.projectNo! " "}</td> | |
97 | + <td>${data.baseInfo.productionDepartment! " "}</td> | |
98 | + <td>${data.baseInfo.innerNo!" "}</td> | |
99 | + <td>${data.baseInfo.customerPo!" "}</td> | |
100 | + <td>${data.baseInfo.customerStyle!" "}</td> | |
101 | + <td>${data.baseInfo.poColor!" "}</td> | |
102 | + <td><img src="${data.baseInfo.smallPicUrl! " "}" alt="Image"></td> | |
103 | + <td>${data.baseInfo.productionComment!" "}</td> | |
104 | + <td>${data.baseInfo.orderCount! " "}</td> | |
105 | + <td>${data.baseInfo.productionDepartmentConsignTime! " "}</td> | |
106 | + <#else> | |
107 | + <td>${data.baseInfo.customerCode! " "}</td> | |
108 | + <td>${data.baseInfo.projectNo! " "}</td> | |
109 | + <td>${data.baseInfo.productionDepartment! " "}</td> | |
110 | + <td>${data.baseInfo.innerNo!" "}</td> | |
111 | + <td>${data.baseInfo.customerPo!" "}</td> | |
112 | + <td>${data.baseInfo.customerStyle!" "}</td> | |
113 | + <td>${data.baseInfo.poColor!" "}</td> | |
114 | + <td><img src="${data.baseInfo.smallPicUrl! " "}" alt="Image"></td> | |
115 | + <td>${data.baseInfo.productionComment!" "}</td> | |
116 | + <td>${data.baseInfo.orderCount! " "}</td> | |
117 | + <td>${data.baseInfo.productionDepartmentConsignTime! " "}</td> | |
118 | + <td>${data.baseInfo.orderHodTime! " "}</td> | |
119 | + <td>${data.baseInfo.outboundType! " "}</td> | |
120 | + </#if> | |
121 | + </tr> | |
122 | +</table> | |
123 | +</body> | |
124 | +</html> | ... | ... |