| | |
| | | import zy.cloud.wms.manager.entity.DocType; |
| | | import zy.cloud.wms.manager.service.DocTypeService; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class DocTypeController extends BaseController { |
| | |
| | | @RequestMapping(value = "/docType/add/auth") |
| | | @ManagerAuth |
| | | public R add(DocType docType) { |
| | | docType.setCreateBy(getUserId()); |
| | | docType.setCreateTime(new Date()); |
| | | docType.setStatus(1); |
| | | docType.setUpdateBy(getUserId()); |
| | | docType.setUpdateTime(new Date()); |
| | | docTypeService.insert(docType); |
| | | return R.ok(); |
| | | } |
| | |
| | | if (Cools.isEmpty(docType) || null==docType.getDocId()){ |
| | | return R.error(); |
| | | } |
| | | docType.setUpdateBy(getUserId()); |
| | | docType.setUpdateTime(new Date()); |
| | | docTypeService.updateById(docType); |
| | | return R.ok(); |
| | | } |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/docType/delete/one/auth") |
| | | @ManagerAuth |
| | | public R deleteOne(@RequestParam String param){ |
| | | DocType docType = JSONArray.parseObject(param, DocType.class); |
| | | if (Cools.isEmpty(docType)){ |
| | | return R.error(); |
| | | } |
| | | docTypeService.delete(new EntityWrapper<>(docType)); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/docType/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |