Browse Source

新增节点新增物质登记表
修改通讯录
修改员工档案
证件管理

yuansh 2 years ago
parent
commit
fac64602b3

+ 2 - 1
jeecg-boot/jeecg-boot-base-common/src/main/java/org/jeecg/common/system/controller/CommonController.java

@@ -471,7 +471,8 @@ public class CommonController {
 			map.put("code",0);
 			Map<String,Object> map1=new HashMap<>();
 //			map1.put("url","http://10.0.0.112:3000/jeecg-boot/sys/common/downloadFile/"+dbpath);
-			map1.put("url","http://oa.cuidiansoft.com/jeecg-boot/sys/common/downloadFile/"+dbpath);
+//			map1.put("url","http://oa.cuidiansoft.com/jeecg-boot/sys/common/downloadFile/"+dbpath);
+			map1.put("url","http://127.0.0.1:8087/jeecg-boot/sys/common/downloadFile/"+dbpath);
 //			map1.put("url","http://106.15.206.14:8090/jeecg-boot/sys/common/downloadFile/"+dbpath);
 			map.put("data",map1);
 			result.setData(map1);

+ 24 - 3
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/controller/SyMaterialController.java

@@ -10,6 +10,10 @@ import java.util.Map;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.system.vo.LoginUser;
 import org.apache.shiro.SecurityUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
@@ -47,6 +51,7 @@ import com.alibaba.fastjson.JSON;
  * @Version: V1.0
  */
 @RestController
+@Api(tags="物资登记表")
 @RequestMapping("/oa/syMaterial")
 @Slf4j
 public class SyMaterialController {
@@ -66,6 +71,8 @@ public class SyMaterialController {
 	 * @param req
 	 * @return
 	 */
+	@AutoLog(value = "物资登记表-分页列表查询")
+	@ApiOperation(value="物资登记表-分页列表查询", notes="物资登记表-分页列表查询")
 	@GetMapping(value = "/list")
 	public Result<?> queryPageList(SyMaterial syMaterial,
 								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@@ -83,6 +90,8 @@ public class SyMaterialController {
 	 * @param syMaterialPage
 	 * @return
 	 */
+	@AutoLog(value = "物资登记表-添加")
+	@ApiOperation(value="物资登记表-添加", notes="物资登记表-添加")
 	@PostMapping(value = "/add")
 	public Result<?> add(@RequestBody SyMaterialPage syMaterialPage) {
 		SyMaterial syMaterial = new SyMaterial();
@@ -97,6 +106,8 @@ public class SyMaterialController {
 	 * @param syMaterialPage
 	 * @return
 	 */
+	@AutoLog(value = "物资登记表-编辑")
+	@ApiOperation(value="物资登记表-编辑", notes="物资登记表-编辑")
 	@PutMapping(value = "/edit")
 	public Result<?> edit(@RequestBody SyMaterialPage syMaterialPage) {
 		SyMaterial syMaterial = new SyMaterial();
@@ -111,6 +122,8 @@ public class SyMaterialController {
 	 * @param id
 	 * @return
 	 */
+	@AutoLog(value = "物资登记表-通过id删除")
+	@ApiOperation(value="物资登记表-通过id删除", notes="物资登记表-通过id删除")
 	@DeleteMapping(value = "/delete")
 	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
 	    syMaterialService.delMain(id);
@@ -123,6 +136,8 @@ public class SyMaterialController {
 	 * @param ids
 	 * @return
 	 */
+	@AutoLog(value = "物资登记表-批量删除")
+	@ApiOperation(value="物资登记表-批量删除", notes="物资登记表-批量删除")
 	@DeleteMapping(value = "/deleteBatch")
 	public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
 		this.syMaterialService.delBatchMain(Arrays.asList(ids.split(",")));
@@ -130,11 +145,13 @@ public class SyMaterialController {
 	}
 	
 	/**
-	 * 通过id查询
+	 * 通过id查询主表
      *
 	 * @param id
 	 * @return
 	 */
+	@AutoLog(value = "物资登记表-通过id查询")
+	@ApiOperation(value="物资登记表-通过id查询", notes="物资登记表-通过id查询")
 	@GetMapping(value = "/queryById")
 	public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
 		SyMaterial syMaterial = syMaterialService.getById(id);
@@ -142,22 +159,26 @@ public class SyMaterialController {
 	}
 	
 	/**
-	 * 通过id查询
+	 * 通过id查询B表
      *
 	 * @param id
 	 * @return
 	 */
+	@AutoLog(value = "物资登记表-通过id查询B表")
+	@ApiOperation(value="物资登记表-通过id查询B表", notes="物资登记表-通过id查询B表")
 	@GetMapping(value = "/querySyMaterialBByMainId")
 	public Result<?> querySyMaterialBListByMainId(@RequestParam(name="id",required=true) String id) {
 		List<SyMaterialB> syMaterialBList = syMaterialBService.selectByMainId(id);
 		return Result.ok(syMaterialBList);
 	}
 	/**
-	 * 通过id查询
+	 * 通过id查询C表
      *
 	 * @param id
 	 * @return
 	 */
+	@AutoLog(value = "物资登记表-通过id查询C表")
+	@ApiOperation(value="物资登记表-通过id查询C表", notes="物资登记表-通过id查询C表")
 	@GetMapping(value = "/querySyMaterialCByMainId")
 	public Result<?> querySyMaterialCListByMainId(@RequestParam(name="id",required=true) String id) {
 		List<SyMaterialC> syMaterialCList = syMaterialCService.selectByMainId(id);

+ 6 - 6
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/entity/SyCertificates.java

@@ -65,15 +65,15 @@ public class SyCertificates {
     @ApiModelProperty(value = "证件编号")
 	private String code;
 	/**起始日期*/
-	@Excel(name = "起始日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@Excel(name = "起始日期", width = 20, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
     @ApiModelProperty(value = "起始日期")
 	private Date beginDate;
 	/**到期时间*/
-	@Excel(name = "到期时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@Excel(name = "到期时间", width = 20, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
     @ApiModelProperty(value = "到期时间")
 	private Date endDate;
 	/**管理人(到期通知人)*/

+ 2 - 2
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/entity/SyMaterial.java

@@ -42,8 +42,8 @@ public class SyMaterial implements Serializable {
 	/**型号*/
 	private String model;
 	/**购买日期*/
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
 	private Date buyTime;
 	/**购买数量*/
 	private Double buyNum;

+ 3 - 3
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/entity/SyMaterialB.java

@@ -46,9 +46,9 @@ public class SyMaterialB implements Serializable {
     @Excel(name = "主要信息编号", width = 15)
 	private String headCode;
 	/**日期*/
-	@Excel(name = "日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@Excel(name = "日期", width = 20, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
 	private Date infoDate;
 	/**维修项目*/
     @Excel(name = "维修项目", width = 15)

+ 6 - 6
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/entity/SyMaterialC.java

@@ -46,17 +46,17 @@ public class SyMaterialC implements Serializable {
     @Excel(name = "主要信息编号", width = 15)
 	private String headCode;
 	/**领用日期*/
-	@Excel(name = "领用日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@Excel(name = "领用日期", width = 20, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
 	private Date useDate;
 	/**领用人*/
     @Excel(name = "领用人", width = 15)
 	private String useId;
 	/**归还日期*/
-	@Excel(name = "归还日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@Excel(name = "归还日期", width = 20, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
 	private Date returnDate;
 	/**备注*/
     @Excel(name = "备注", width = 15)

+ 3 - 3
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/vo/SyMaterialPage.java

@@ -48,9 +48,9 @@ public class SyMaterialPage {
   	@Excel(name = "型号", width = 15)
 	private String model;
 	/**购买日期*/
-  	@Excel(name = "购买日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
-  	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+  	@Excel(name = "购买日期", width = 20, format = "yyyy-MM-dd")
+  	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
 	private Date buyTime;
 	/**购买数量*/
   	@Excel(name = "购买数量", width = 15)

+ 22 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java

@@ -753,6 +753,10 @@ public class SysUserController {
     }
 
 
+    public static void main(String[] args) {
+        System.out.println("asdfghj".substring(0,3));
+    }
+
     /**
      * 给指定部门添加对应的用户
      */
@@ -1158,6 +1162,7 @@ public class SysUserController {
         Result<IPage<SysUser>> result = new Result<IPage<SysUser>>();
         QueryWrapper<SysUser> queryWrapper = QueryGenerator.initQueryWrapper(user, req.getParameterMap());
         Page<SysUser> page = new Page<SysUser>(pageNo, pageSize);
+        queryWrapper.orderByAsc("org_code");
         queryWrapper.orderByAsc("convert(realname using gbk)");
         IPage<SysUser> pageList = sysUserService.page(page, queryWrapper);
 
@@ -1172,12 +1177,29 @@ public class SysUserController {
                 item.setOrgCode(useDepNames.get(item.getId()));
                 if(useDepNames.containsKey(item.getId())){
                     item.setRealname(useDepNames.get(item.getId())+"-"+item.getRealname());
+                    if(useDepNames.get(item.getId()).length() < 3){
+                        item.setSalt(useDepNames.get(item.getId()));
+                    }else{
+                        item.setSalt(useDepNames.get(item.getId()).substring(0,3));
+                    }
                 }else{
+                    item.setSalt("0");
                     item.setRealname("无部门"+"-"+item.getRealname());
                 }
 
             });
         }
+        Collections.sort(pageList.getRecords(), (a, b) -> {
+            if (a.getSalt().equals(b.getSalt())) return 0;
+            if (a.getSalt().length() > b.getSalt().length()) {
+                return 1;
+            } else if (a.getSalt().length() < b.getSalt().length()) {
+                return -1;
+            } else {
+                return a.getSalt().compareTo(b.getSalt());
+            }
+        });
+//        pageList.getRecords().sort(s-> s.getRealname());
         result.setSuccess(true);
         result.setResult(pageList);
         log.info(pageList.toString());