|
@@ -995,7 +995,7 @@ public class ApplicationMiddleController {
|
|
|
SchoolInfo schoolInfo = schoolInfoService.get(applicationMiddle.getOfferId());
|
|
|
PersonInfo personInfo = personInfoService.get(applicationMiddle.getPersonId());
|
|
|
StudentInfo studentInfo = studentInfoService.get(applicationMiddle.getStudentId());
|
|
|
- String bdUrl = toPressText(code, personInfo.getName(), studentInfo.getName(), schoolInfo.getName());
|
|
|
+ String bdUrl = toPressText(code, personInfo.getName(), studentInfo.getName(), schoolInfo.getName(),applicationMiddle.getType());
|
|
|
String uploadUrl = uploadImg(bdUrl);
|
|
|
if (StringUtils.isNotEmpty(uploadUrl)) {
|
|
|
off.setDelFlag(false);
|
|
@@ -1520,7 +1520,7 @@ public class ApplicationMiddleController {
|
|
|
SchoolInfo schoolInfo = schoolInfoService.get(applicationMiddle.getOfferId());
|
|
|
PersonInfo personInfo = personInfoService.get(applicationMiddle.getPersonId());
|
|
|
StudentInfo studentInfo = studentInfoService.get(applicationMiddle.getStudentId());
|
|
|
- String bdUrl = toPressText(code,personInfo.getName(),studentInfo.getName(), schoolInfo.getName());
|
|
|
+ String bdUrl = toPressText(code,personInfo.getName(),studentInfo.getName(), schoolInfo.getName(),applicationMiddle.getType());
|
|
|
String uploadUrl = uploadImg(bdUrl);
|
|
|
if(StringUtils.isNotEmpty(uploadUrl)) {
|
|
|
off.setDelFlag(false);
|
|
@@ -1735,7 +1735,7 @@ public class ApplicationMiddleController {
|
|
|
SchoolInfo schoolInfo = schoolInfoService.get(applicationMiddle.getOfferId());
|
|
|
PersonInfo personInfo = personInfoService.get(applicationMiddle.getPersonId());
|
|
|
StudentInfo studentInfo = studentInfoService.get(applicationMiddle.getStudentId());
|
|
|
- String bdUrl = toPressText(code, personInfo.getName(), studentInfo.getName(), schoolInfo.getName());
|
|
|
+ String bdUrl = toPressText(code, personInfo.getName(), studentInfo.getName(), schoolInfo.getName(),applicationMiddle.getType());
|
|
|
String uploadUrl = uploadImg(bdUrl);
|
|
|
if (StringUtils.isNotEmpty(uploadUrl)) {
|
|
|
off.setDelFlag(false);
|
|
@@ -1796,12 +1796,52 @@ public class ApplicationMiddleController {
|
|
|
return msgResult;
|
|
|
}
|
|
|
|
|
|
- public String toPressText(String offerCode,String personName,String userName,String schoolName){
|
|
|
+ public String toPressText(String offerCode,String personName,String userName,String schoolName,String type){
|
|
|
String in = "static/middle_tzs.jpg";
|
|
|
String out = "uploadImg/middle_tzs_" + offerCode + ".jpg";
|
|
|
String inImg = Resource.class.getResource("/").getPath() + in;
|
|
|
String outImg = Resource.class.getResource("/").getPath() + out;
|
|
|
|
|
|
+ String startMD = "8";
|
|
|
+ String endMD = "8";
|
|
|
+ String startD = "28";
|
|
|
+ String endD = "28";
|
|
|
+ if("Y".equals(type) || "Z".equals(type)) {
|
|
|
+ DataDictionary ddyq = dataDictionaryService.findByName("插班初中月起");
|
|
|
+ if(ddyq != null) {
|
|
|
+ startMD = ddyq.getValue();
|
|
|
+ }
|
|
|
+ DataDictionary ddyz = dataDictionaryService.findByName("插班初中月止");
|
|
|
+ if(ddyz != null) {
|
|
|
+ endMD = ddyz.getValue();
|
|
|
+ }
|
|
|
+ DataDictionary ddq = dataDictionaryService.findByName("插班初中起");
|
|
|
+ if(ddq != null) {
|
|
|
+ startD = ddq.getValue();
|
|
|
+ }
|
|
|
+ DataDictionary ddz = dataDictionaryService.findByName("插班初中止");
|
|
|
+ if(ddz != null) {
|
|
|
+ endD = ddz.getValue();
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ DataDictionary ddyq = dataDictionaryService.findByName("初中月起");
|
|
|
+ if(ddyq != null) {
|
|
|
+ startMD = ddyq.getValue();
|
|
|
+ }
|
|
|
+ DataDictionary ddyz = dataDictionaryService.findByName("初中月止");
|
|
|
+ if(ddyz != null) {
|
|
|
+ endMD = ddyz.getValue();
|
|
|
+ }
|
|
|
+ DataDictionary ddq = dataDictionaryService.findByName("初中起");
|
|
|
+ if(ddq != null) {
|
|
|
+ startD = ddq.getValue();
|
|
|
+ }
|
|
|
+ DataDictionary ddz = dataDictionaryService.findByName("初中止");
|
|
|
+ if(ddz != null) {
|
|
|
+ endD = ddz.getValue();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
try{
|
|
|
BufferedImage im =ImageIO.read(new FileInputStream(inImg));
|
|
|
int mothh = DateUtil.thisMonth() +1;
|
|
@@ -1813,10 +1853,10 @@ public class ApplicationMiddleController {
|
|
|
g.drawString(offerCode,1000,400);
|
|
|
g.drawString(personName,410,600);
|
|
|
g.drawString(userName,830,680);
|
|
|
- g.drawString("8",730,940);
|
|
|
- g.drawString("25",820,940);
|
|
|
- g.drawString("8",980,940);
|
|
|
- g.drawString("25",1050,940);
|
|
|
+ g.drawString(startMD,730,940);
|
|
|
+ g.drawString(startD,820,940);
|
|
|
+ g.drawString(endMD,980,940);
|
|
|
+ g.drawString(endD,1050,940);
|
|
|
g.drawString(schoolName,580,1015);
|
|
|
g.drawString(mothh+"",1000,1590);
|
|
|
g.drawString(DateUtil.thisDayOfMonth()+"",1060,1590);
|