| | |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | hostEq(wrapper); |
| | | wrapper.orderBy("status",false); |
| | | wrapper.orderBy("status",true); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(itemService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | |
| | | } |
| | | item.setUpdateBy(getUserId()); |
| | | item.setUpdateTime(new Date()); |
| | | itemService.updateById(item); |
| | | itemService.update(item,new EntityWrapper<Item>() |
| | | .eq("id",item.getId())); |
| | | // itemService.updateById(item); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R delete(@RequestParam("ids[]") String param){ |
| | | |
| | | // if (param != null){ |
| | | // itemService.delete(new EntityWrapper<Item>() |
| | | // .eq("id",param)); |
| | | // planService.delete(new EntityWrapper<ProjectPlan>() |
| | | // .eq("item_id",param)); |
| | | // } |
| | | if (param != null){ |
| | | itemService.delete(new EntityWrapper<Item>() |
| | | .eq("id",param)); |
| | | planService.delete(new EntityWrapper<ProjectPlan>() |
| | | .eq("item_id",param)); |
| | | String[] split = param.split(","); |
| | | for (String s : split) { |
| | | Item item = itemService.selectOne(new EntityWrapper<Item>() |
| | | .eq("id", s)); |
| | | item.setStatus(2); |
| | | itemService.update(item,new EntityWrapper<Item>() |
| | | .eq("id",item.getId())); |
| | | } |
| | | } |
| | | |
| | | // List<Item> list = JSONArray.parseArray(param, Item.class); |
| | | // if (Cools.isEmpty(list)){ |
| | | // return R.error(); |
| | | // } |
| | | // for (Item entity : list){ |
| | | // itemService.delete(new EntityWrapper<>(entity)); |
| | | // } |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @RequestParam Map<String, Object> param) { |
| | | String target = (String) param.get("items"); |
| | | param.remove("items"); |
| | | |
| | | EntityWrapper<ProjectPlan> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("item_id",target); |
| | | if (!target.equals("0")){ |
| | | wrapper.eq("item_id",target); |
| | | }else{ |
| | | List<Item> items = itemService.selectList(new EntityWrapper<Item>() |
| | | .eq("status", "2")); |
| | | for (Item item : items) { |
| | | wrapper.ne("item_id",item.getId()); |
| | | } |
| | | |
| | | } |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | wrapper.orderBy("weight_num"); |
| | | |
| | | wrapper.orderBy("item_id"); |
| | | |
| | | |
| | | // if (!Cools.isEmpty(orderByField)) { |
| | | // wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | |
| | | public R allProjects() { |
| | | |
| | | List<Item> items = itemService.selectList(new EntityWrapper<Item>() |
| | | .eq("status","1")); |
| | | .ne("status","2")); |
| | | |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Item item : items) { |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping("/projectStatus/auth") |
| | | public R getAllProjectStatus(){ |
| | | List<Map<String,Object>> result = new ArrayList<>(); |
| | | List<ProjectStatus> projectStatuses = projectStatusService.selectList(null); |
| | | for (ProjectStatus projectStatus : projectStatuses) { |
| | | Map<String,Object> content = new HashMap<>(); |
| | | content.put("id",projectStatus.getId()); |
| | | content.put("value",projectStatus.getStatusName()); |
| | | result.add(content); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | } |
| | |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import zy.cloud.wms.manager.service.CstmrService; |
| | | import zy.cloud.wms.manager.service.ProjectStatusService; |
| | | import zy.cloud.wms.manager.service.ProjectTypeService; |
| | | import zy.cloud.wms.system.entity.Host; |
| | | import zy.cloud.wms.system.entity.User; |
| | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @TableName("man_item") |
| | |
| | | @TableField("origin_area") |
| | | private String originArea; |
| | | |
| | | @TableField("project_status") |
| | | private Integer projectStatus; |
| | | |
| | | public Item() {} |
| | | |
| | | |
| | |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getProjectStatus$(){ |
| | | ProjectStatusService bean = SpringUtils.getBean(ProjectStatusService.class); |
| | | ProjectStatus id = bean.selectOne(new EntityWrapper<ProjectStatus>().eq("id", this.projectStatus)); |
| | | if (!Cools.isEmpty(this.id)) { |
| | | return id.getStatusName(); |
| | | } |
| | | return null; |
| | | } |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | | case 3: |
| | | return "完结"; |
| | | case 2: |
| | | return "禁用"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | |
| | | // ); |
| | | |
| | | |
| | | public String getItemId$(){ |
| | | ItemService bean = SpringUtils.getBean(ItemService.class); |
| | | Item id = bean.selectOne(new EntityWrapper<Item>() |
| | | .eq("id", this.itemId)); |
| | | if (!Cools.isEmpty(id)) { |
| | | return id.getName(); |
| | | } |
| | | return null; |
| | | } |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | |
| | | this.flowName = flowName; |
| | | } |
| | | |
| | | public String getItemId$(){ |
| | | ItemService itemService = SpringUtils.getBean(ItemService.class); |
| | | Item id = itemService.selectOne(new EntityWrapper<Item>() |
| | | .eq("id", this.getItemId())); |
| | | if (!Cools.isEmpty(id)) { |
| | | |
| | | return id.getName(); |
| | | }else { |
| | | return null; |
| | | } |
| | | } |
| | | // public String getItemId$(){ |
| | | // ItemService itemService = SpringUtils.getBean(ItemService.class); |
| | | // Item id = itemService.selectOne(new EntityWrapper<Item>() |
| | | // .eq("id", this.getItemId())); |
| | | // if (!Cools.isEmpty(id)) { |
| | | // |
| | | // return id.getName(); |
| | | // }else { |
| | | // return null; |
| | | // } |
| | | // } |
| | | public String getFlowId$(){ |
| | | FlowStatusService bean = SpringUtils.getBean(FlowStatusService.class); |
| | | FlowStatus id = bean.selectOne(new EntityWrapper<FlowStatus>() |
| | |
| | | ,{field: 'inUuid', align: 'center',title: '内部编号', hide: true} |
| | | // ,{field: 'cstmrUuid', align: 'center',title: '客户编号'} |
| | | ,{field: 'cstmrUuid$', align: 'center',title: '客户名称'} |
| | | ,{field: 'projectStatus$', align: 'center', title: '项目进度'} |
| | | |
| | | // ,{field: 'member', align: 'center',title: '项目成员'} |
| | | // ,{field: 'leader', align: 'center',title: '项目经理'} |
| | | ,{field: 'startTime$', align: 'center',title: '计划开始时间'} |
| | |
| | | layDateRender(); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | |
| | | console.log(data) |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/item/"+(mData?'update':'add')+"/auth", |
| | |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | layer.confirm('确定要禁用选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | |
| | | cols: [[ |
| | | {type: 'checkbox', hide:true} |
| | | // ,{field: 'id', align: 'center',title: '唯一ID'} |
| | | // ,{field: 'itemId', align: 'center',title: '项目ID'} |
| | | ,{field: 'itemId$', align: 'center',title: '项目名称'} |
| | | ,{field: 'flowId$', align: 'center',title: '节点名称'} |
| | | ,{field: 'weightNum', align: 'center',title: '权重值'} |
| | | // ,{field: 'flowId', align: 'center',title: '节点ID'} |
| | |
| | | |
| | | if (res.data != null) { |
| | | // console.log(res.data[0].key) |
| | | items = res.data[0].key; |
| | | // items = res.data[0].key; |
| | | items='0'; |
| | | var tpl = $("#parentNodeGroup").html(); |
| | | var template = Handlebars.compile(tpl); |
| | | var html = template(res); |
| | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> |
| | | <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">禁用</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | <!-- <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">禁用</a>--> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | |
| | | <!-- <input class="layui-input" name="cstmrUuid" placeholder="请输入客户名称" lay-vertype="tips" lay-verify="required">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">项目进度: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input id="projectStatus" class="layui-input" name="projectStatus" placeholder="请输入项目进度" style="display: none" lay-vertype="tips" lay-verify="required"> |
| | | <input id="projectStatus$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入添加人员" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="projectStatusByprojectStatus" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="projectStatusByprojectStatusSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">客户名称: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | |
| | | <select name="status"> |
| | | <option value="">请选择状态</option> |
| | | <option value="1">正常</option> |
| | | <option value="0">完结</option> |
| | | <option value="3">完结</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | </form> |
| | | </script> |
| | | <script type="text/template" id="parentNodeGroup"> |
| | | <option value="0">显示全部</option> |
| | | {{#each data}} |
| | | <option value="{{this.key}}">{{this.val}}</option> |
| | | {{/each}} |