Merge remote-tracking branch 'origin/FOTON' into FOTON
This commit is contained in:
@@ -46,16 +46,17 @@ public class WaterMarkUtil {
|
||||
// 获得PDF最顶层
|
||||
under = stamper.getOverContent(i);
|
||||
under.saveState();
|
||||
// set Transparency
|
||||
PdfGState gs = new PdfGState();
|
||||
// 设置透明度为0.2
|
||||
gs.setFillOpacity(0.25f);
|
||||
under.setGState(gs);
|
||||
|
||||
under.restoreState();
|
||||
under.beginText();
|
||||
under.setFontAndSize(base, 30);
|
||||
under.setTextMatrix(30, 30);
|
||||
under.setColorFill(BaseColor.LIGHT_GRAY);
|
||||
// 设置透明度为0.2
|
||||
// set Transparency
|
||||
PdfGState gs = new PdfGState();
|
||||
gs.setFillOpacity(0.2f);
|
||||
under.setGState(gs);
|
||||
for (int y = 0; y < 50; y++) {
|
||||
for (int x = 0; x < 50; x++) {
|
||||
// 水印文字成45度角倾斜 x位置 y位置 角度
|
||||
|
||||
+14
-3
@@ -5,6 +5,7 @@ import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.fileMaterialCenter.entity.FileMaterialPage;
|
||||
import com.adc.da.slrs.fileMaterialCenter.service.IFileMaterialService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -15,8 +16,11 @@ import com.adc.da.slrs.fileMaterialCenter.entity.FileMaterial;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import javax.xml.crypto.Data;
|
||||
import java.lang.reflect.Array;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -29,7 +33,7 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "资料中心")
|
||||
@RequestMapping("/fileMaterialCenter/file-material")
|
||||
@RequestMapping("/${restPath}/fileMaterialCenter/file-material")
|
||||
public class FileMaterialController extends BaseController<FileMaterial> {
|
||||
|
||||
@Autowired
|
||||
@@ -37,7 +41,14 @@ public class FileMaterialController extends BaseController<FileMaterial> {
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("新增文件资料组")
|
||||
public ResponseMessage addFileMaterial(FileMaterial material){
|
||||
public ResponseMessage addFileMaterial(@RequestBody FileMaterial material){
|
||||
|
||||
|
||||
// Date date = new Date();
|
||||
// String strDateFormat = "yyyy-MM-dd HH:mm:ss";
|
||||
// SimpleDateFormat sdf = new SimpleDateFormat(strDateFormat);
|
||||
material.setId(UUIDUtils.randomUUID20());
|
||||
material.setDataUploadTime(new Date());
|
||||
boolean save = iFileMaterialService.save(material);
|
||||
|
||||
return Result.success(save);
|
||||
@@ -47,7 +58,7 @@ public class FileMaterialController extends BaseController<FileMaterial> {
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除文件资料组")
|
||||
public ResponseMessage deleteMaterial(String id){
|
||||
List<String> idList = Arrays.asList(id.split(id));
|
||||
List<String> idList = Arrays.asList(id.split(","));
|
||||
boolean b = iFileMaterialService.removeByIds(idList);
|
||||
|
||||
return Result.success(b);
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.Tag;
|
||||
@@ -58,4 +59,8 @@ public class FileMaterial extends BaseEntity {
|
||||
@ApiModelProperty(value = "置顶")
|
||||
@TableField("is_top")
|
||||
private Integer isTop;
|
||||
|
||||
@ApiModelProperty(value = "删除标志")
|
||||
@TableLogic(value = "0",delval = "1")
|
||||
private String delFlag;
|
||||
}
|
||||
|
||||
+4
-5
@@ -36,7 +36,7 @@ public class FileMaterialServiceImpl extends ServiceImpl<FileMaterialDao, FileMa
|
||||
QueryWrapper<FileMaterial> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
if (queryPage.getDataType()!=null){
|
||||
queryWrapper.eq("data_type",queryPage.getDataTitle());
|
||||
queryWrapper.eq("data_type",queryPage.getDataType());
|
||||
}
|
||||
|
||||
if (queryPage.getDataTitle()!=null){
|
||||
@@ -48,9 +48,8 @@ public class FileMaterialServiceImpl extends ServiceImpl<FileMaterialDao, FileMa
|
||||
|
||||
String strDateFormat = "yyyy-MM-dd HH:mm:ss";
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(strDateFormat);
|
||||
queryWrapper.between("data_upload_time",
|
||||
sdf.format(queryPage.getStartDataUploadTime()),
|
||||
sdf.format(queryPage.getEndDataUploadTime()));
|
||||
queryWrapper.between("data_upload_time", queryPage.getStartDataUploadTime(),
|
||||
queryPage.getEndDataUploadTime());
|
||||
}
|
||||
|
||||
return this.page(new Page<>(queryPage.getPage(),queryPage.getPageSize()),queryWrapper);
|
||||
@@ -60,7 +59,7 @@ public class FileMaterialServiceImpl extends ServiceImpl<FileMaterialDao, FileMa
|
||||
public List<String> getFileMaterialType() {
|
||||
QueryWrapper<FileMaterial> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
queryWrapper.select("data_type");
|
||||
queryWrapper.select("DISTINCT data_type");
|
||||
return this.listObjs(queryWrapper, item -> item.toString());
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -21,15 +21,15 @@ public class StandRegionalTimeDto {
|
||||
@ApiModelProperty(value = "实施日期")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date putTime;
|
||||
private String putTime;
|
||||
|
||||
@ApiModelProperty(value = "在产车实施日期")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date zccssrq;
|
||||
private String zccssrq;
|
||||
|
||||
@ApiModelProperty(value = "新车型实施日期")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date xcxssrq;
|
||||
private String xcxssrq;
|
||||
}
|
||||
|
||||
+6
-6
@@ -301,14 +301,14 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
|
||||
}
|
||||
|
||||
private void dateTime(LinkedHashMap<String, List<String>> mapList, StandRegionalTimeDto s) {
|
||||
String putTime = new SimpleDateFormat("yyyy-MM-dd").format(s.getPutTime());
|
||||
String xcx = new SimpleDateFormat("yyyy-MM-dd").format(s.getXcxssrq());
|
||||
String zcc = new SimpleDateFormat("yyyy-MM-dd").format(s.getZccssrq());
|
||||
// String putTime = new SimpleDateFormat("yyyy-MM-dd").format(s.getPutTime());
|
||||
// String xcx = new SimpleDateFormat("yyyy-MM-dd").format(s.getXcxssrq());
|
||||
// String zcc = new SimpleDateFormat("yyyy-MM-dd").format(s.getZccssrq());
|
||||
// putTime.add(new SimpleDateFormat("yyyy-MM-dd").format(s.getPutTime());
|
||||
// xcx.add(new SimpleDateFormat("yyyy-MM-dd").format(s.getXcxssrq()));
|
||||
// zcc.add(new SimpleDateFormat("yyyy-MM-dd").format(s.getZccssrq()));
|
||||
mapList.put("实施日期("+s.getCountry()+")", Collections.singletonList(putTime));
|
||||
mapList.put("新车型实施日期("+s.getCountry()+")", Collections.singletonList(xcx));
|
||||
mapList.put("在产车实施日期("+s.getCountry()+")", Collections.singletonList(zcc));
|
||||
mapList.put("实施日期("+s.getCountry()+")",Arrays.asList(s.getPutTime().split(",")));
|
||||
mapList.put("新车型实施日期("+s.getCountry()+")", Arrays.asList(s.getXcxssrq().split(",")));
|
||||
mapList.put("在产车实施日期("+s.getCountry()+")", Arrays.asList(s.getZccssrq().split(",")));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user