Commit 5c3968ee by 杨清松

场站用户相关接口

parent 3e6485fd
......@@ -12,6 +12,7 @@ import org.springframework.security.core.userdetails.UserDetails;
import com.beecode.bcp.type.KObject;
import com.beecode.inz.basis.config.constants.WarehouseUserConstants;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* @author pengwufeng
......@@ -111,11 +112,13 @@ public class WarehouseUser implements UserDetails, Serializable {
/**
* 创建日期
*/
@JsonFormat(pattern="yyyy-MM-dd'T'HH:mm:ss")
private Date createTime;
/**
* 修改日期
*/
@JsonFormat(pattern="yyyy-MM-dd'T'HH:mm:ss")
private Date modifyTime;
/**
......
......@@ -86,6 +86,52 @@ public class WarehouseUserController {
}
/**
* 根据id查询用户
* @param obj
* @return
*/
@GetMapping("/warehouse/user/queryById/{id}")
public Object queryById(@PathVariable(name="id") String id) {
if(StringUtil.isEmpty(id)) {
return ResponseObj.error("id不能为空");
}
try {
WarehouseUser warehouseUser = warehouseUserService.getById(UUID.fromString(id));
return ResponseObj.success("操作成功", warehouseUser);
} catch (IllegalArgumentException e) {
return ResponseObj.error("stationId错误");
} catch (Exception e) {
return ResponseObj.error("操作失败");
}
}
/**
* 编辑
* @param obj
* @return
*/
@PostMapping("/warehouse/user/modify")
public Object modify(@RequestBody String body) {
if(StringUtil.isEmpty(body)) {
return ResponseObj.error("参数不能为空");
}
WarehouseUser warehouseUser = JsonUtil.jsonToBean(body, WarehouseUser.class);
if(warehouseUser == null) {
return ResponseObj.error("参数无法识别");
}
try {
warehouseUserService.modify(warehouseUser);
} catch(Exception e) {
logger.error("", e);
return ResponseObj.error(e.getMessage());
}
return ResponseObj.success("操作成功",null);
}
/**
* 创建场站用户
*
* @param obj
......
<model>
<header>
<type>bcp.biz.Bill</type>
<package>com.xyst.dinas.biz.bill</package>
<title>场站</title>
<name>Station</name>
<description>场站</description>
</header>
<content>
<bill>
<data>
{"baseData":{"name":"Station","title":"场站","billModel":"com.beecode.bap.biztrait.BasicBillBiztrait","functionLibrarys":[],"description":"场站","dataModel":"com.xyst.dinas.biz.datamodel.Station"},"serial":{"serialData":[{"segment":"literal","segmentData":"EM"},{"segment":"sequence","segmentData":{"start-with":0,"increment":1,"min":0,"max":99999,"length":5,"cycle":true,"cut-direction":"left","pad-string":"0","pad-direction":"left","cache-size":10}}],"buildTime":"add"},"formula":[],"workflow":{"workflow":"","processParamConfig":[]},"print":[],"authority":[]}
</data>
</bill>
</content>
</model>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-sequence">
<specification>1.0</specification>
<id>74af0162-d2f8-4761-ba64-51dd1a4cfa29</id>
<name>com.xyst.dinas.biz.bill.Station$sequence</name>
<title>场站$sequence</title>
<description>场站</description>
<define>bcp.sequence</define>
<define-version>1.0</define-version>
<content>
<m:sequence>
<m:start-with>0</m:start-with>
<m:increment>1</m:increment>
<m:max>99999</m:max>
<m:min>0</m:min>
<m:cycle>true</m:cycle>
<m:cache-size>10</m:cache-size>
</m:sequence>
</content>
</metadata>
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-serial">
<specification>1.0</specification>
<id>eabc5787-8607-4b02-9a35-78f679b41418</id>
<name>com.xyst.dinas.biz.bill.Station$serial</name>
<title>场站$serial</title>
<description>场站</description>
<define>bcp.serial</define>
<define-version>1.0</define-version>
<dependency>com.xyst.dinas.biz.datamodel.Station</dependency>
<dependency>com.xyst.dinas.biz.bill.Station$sequence</dependency>
<content>
<m:serial>
<m:input>com.xyst.dinas.biz.datamodel.Station</m:input>
<m:functionLibrarys/>
<m:segments>
<m:literal>
<m:value>EM</m:value>
</m:literal>
<m:sequence>
<m:length>5</m:length>
<m:pad-direction>left</m:pad-direction>
<m:pad-string>0</m:pad-string>
<m:key>com.xyst.dinas.biz.bill.Station$serial</m:key>
<m:sequenceName>com.xyst.dinas.biz.bill.Station$sequence</m:sequenceName>
</m:sequence>
</m:segments>
</m:serial>
</content>
</metadata>
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-biztype">
<specification>1.0</specification>
<id>d448c109-3a1d-439e-b117-e3dceb0f236c</id>
<name>com.xyst.dinas.biz.bill.Station</name>
<title>场站</title>
<description>场站</description>
<define>bcp.biz.Biztype</define>
<define-version>1.0</define-version>
<dependency>com.xyst.dinas.biz.bill.Station$serial</dependency>
<dependency>com.xyst.dinas.biz.datamodel.Station</dependency>
<dependency>com.beecode.bap.biztrait.BasicBillBiztrait</dependency>
<content>
<m:biztype>
<m:type>com.xyst.dinas.biz.datamodel.Station</m:type>
<m:inheritances>
<m:inheritance>
<m:biztrait>com.beecode.bap.biztrait.BasicBillBiztrait</m:biztrait>
<m:config type="xml">
<m:content>&lt;billBasictraitConfig&gt;&lt;formulas/&gt;&lt;parents&gt;&lt;parent&gt;&lt;billCodeConfig&gt;&lt;serialName&gt;com.xyst.dinas.biz.bill.Station$serial&lt;/serialName&gt;&lt;buildTime&gt;add&lt;/buildTime&gt;&lt;/billCodeConfig&gt;&lt;/parent&gt;&lt;parent&gt;&lt;workflowConfig&gt;&lt;workflow&gt;&lt;/workflow&gt;&lt;/workflowConfig&gt;&lt;/parent&gt;&lt;parent&gt;&lt;printConfig&gt;&lt;templates/&gt;&lt;/printConfig&gt;&lt;/parent&gt;&lt;/parents&gt;&lt;functionLibrarys/&gt;&lt;/billBasictraitConfig&gt;</m:content>
</m:config>
</m:inheritance>
</m:inheritances>
<m:methodAuthorityItems/>
</m:biztype>
</content>
</metadata>
package com.xyst.dinas.oa.enumeration;
/**
* 出差带队人职务级别
* 保密级别
*
*/
public enum SecurityClassificationEnum {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment