zhuguifei
2026-03-10 58402bd5e762361363a0f7d7907153c77dbb819f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
package com.shlanbao.tzsc.pms.md.fixCode.controller;
 
import java.util.List;
 
import javax.servlet.http.HttpServletRequest;
 
import com.shlanbao.tzsc.pms.md.fixCode.beans.AccessParam;
import com.shlanbao.tzsc.pms.md.fixCode.beans.SelfCheckParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
 
import com.shlanbao.tzsc.base.controller.BaseController;
import com.shlanbao.tzsc.base.mapping.MdFixCode;
import com.shlanbao.tzsc.base.model.DataGrid;
import com.shlanbao.tzsc.base.model.Json;
import com.shlanbao.tzsc.pms.md.fixCode.beans.FixCodeBean;
import com.shlanbao.tzsc.pms.md.fixCode.service.FixCodeServiceI;
import com.shlanbao.tzsc.utils.tools.BeanConvertor;
 
@Controller
@RequestMapping("/pms/fixCode")
public class FixCodeController extends BaseController{
    
    @Autowired
    public FixCodeServiceI fixCodeService;
 
    /**
     * 【功能说明】:查询综合基础数据
     * @author wanchanghuang
     * @createTime 2016年6月2日15:56:12
     * @return 
     * 
     * */
    @ResponseBody
    @RequestMapping("/queryFixCode")
    public DataGrid querFixCode(FixCodeBean fixBean){
        try {
            List<FixCodeBean> list=fixCodeService.queryFixCode(fixBean);
            long count=0l;
            if(list.size()>0){
                count=list.size()+0l;
            }
            return new DataGrid(list, count); 
        } catch (Exception e) {
            log.error("查询所有计量单位异常", e);
        }
        return null;
    }
    
    /**
     * 刷新数据
     */
    @ResponseBody
    @RequestMapping("/refrushData")
    public Json refrushData(){
        Json json=new Json();
        try {
            fixCodeService.refrushData();
            json.setMsg("刷新成功!");
            json.setSuccess(true);
        } catch (Exception e) {
            json.setMsg("刷新失败!");
            json.setSuccess(false);
            e.printStackTrace();
        }
        return json;
    }
    
    /**
     *新增或修改FixCodeBean数据
     */
    @ResponseBody
    @RequestMapping("/editMdFixCode")
    public Json editMdFixCode(FixCodeBean bean){
        Json json=new Json();
        try {
            MdFixCode mdFixCode=BeanConvertor.copyProperties(bean, MdFixCode.class);
            json=fixCodeService.saveFixCode(mdFixCode, bean);
        } catch (Exception e) {
            e.printStackTrace();
            json.setSuccess(false);
            json.setMsg("新增或修改FixCodeBean数据异常!");
        }
        return json;
    }
    
    /**
     *修改FixCodeBean数据页面
     */
    @RequestMapping("/editMdFixCodeJsp")
    public String editMdFixCodeJsp(HttpServletRequest request,FixCodeBean bean){
        FixCodeBean b=fixCodeService.queryFixCode(bean).get(0);
        request.setAttribute("bean", b);
        return "/pms/md/fixcode/fixCodeAdd";
    }
    
    /**
     *新增或修改FixCodeBean数据页面
     */
    @RequestMapping("/addMdFixCodeJsp")
    public String addMdFixCodeJsp(){
        return "/pms/md/fixcode/fixCodeAdd";
    }
    
    
    /**
     *删除FixCodeBean数据
     */
    @ResponseBody
    @RequestMapping("/deleteMdFixCode")
    public Json deleteMdFixCode(String id){
        Json json=new Json();
        try {
            
            json=fixCodeService.deleteFixCode(id);
        } catch (Exception e) {
            e.printStackTrace();
            json.setSuccess(false);
            json.setMsg("删除数据异常!");
        }
        return json;
    }
 
 
 
    /**
     *批量删除FixCodeBean数据
     */
    @ResponseBody
    @RequestMapping("/batchDeleteMdFixCode")
    public Json batchDeleteMdFixCode(String ids){
        Json json=new Json();
        try {
 
          fixCodeService.batchDeleteMdFixCode(ids);
            json.setMsg("删除数据成功");
            json.setSuccess(true);
        } catch (Exception e) {
            e.printStackTrace();
            json.setSuccess(false);
            json.setMsg("删除数据异常!");
        }
        return json;
    }
 
 
 
 
    /**
     * @Author bsw
     * @Description 获取工资考核参数
     * @Date 2021/6/25 14:06
     * @Param []
     * @return com.shlanbao.tzsc.base.model.Json
     **/
    @ResponseBody
    @RequestMapping("/queryWagesAccess")
    public Json queryWagesAccess(){
        Json json = new Json();
        try {
            AccessParam accessParam = fixCodeService.queryWagesAccess();
            json.setObj(accessParam);
            
            json.setSuccess(true);
        }catch (Exception e ) {
            e.printStackTrace();
            json.setSuccess(false);
        }
        return json;
    }
 
 
    /**
     * @Author bsw
     * @Description 获取物理自检考核报表参数
     * @Date 2021/6/28 14:00
     * @Param []
     * @return com.shlanbao.tzsc.base.model.Json
     **/
    @ResponseBody
    @RequestMapping("/queryWlkh")
    public Json queryWlkh(String upcode){
        Json json = new Json();
        try {
            SelfCheckParam param = fixCodeService.queryWlkh(upcode);
            json.setObj(param);
 
            json.setSuccess(true);
        }catch (Exception e ) {
            e.printStackTrace();
            json.setSuccess(false);
        }
        return json;
    }
 
 
 
    /**
     * @Author bsw
     * @Description 保存工资考核参数
     * @Date 2021/6/25 14:34
     * @Param [accessParam]
     * @return com.shlanbao.tzsc.base.model.Json
     **/
    @ResponseBody
    @RequestMapping("/saveWagesAccess")
    public Json saveWagesAccess(AccessParam accessParam) {
        Json json = new Json();
        try {
            fixCodeService.saveWagesAccess(accessParam);
            json.setMsg("修改成功");
            json.setSuccess(true);
        }catch (Exception e ) {
            e.printStackTrace();
            json.setMsg("修改失败!");
            json.setSuccess(false);
        }
        return json;
    }
 
 
    /**
     * @Author bsw
     * @Description 自检测考核参数维护
     * @Date 2021/6/28 14:18
     * @Param [param]
     * @return com.shlanbao.tzsc.base.model.Json
     **/
    @ResponseBody
    @RequestMapping("/saveWlkh")
    public Json saveWlkh(SelfCheckParam param,String upcode) {
        Json json = new Json();
        try {
            fixCodeService.saveWlkh(param,upcode);
            json.setMsg("修改成功");
            json.setSuccess(true);
        }catch (Exception e ) {
            e.printStackTrace();
            json.setMsg("修改失败!");
            json.setSuccess(false);
        }
        return json;
    }
 
 
    
}