diff --git a/demo.json b/demo.json index c95e6e1..e69de29 100644 --- a/demo.json +++ b/demo.json @@ -1,1978 +0,0 @@ -{ - "id": "workbook", - "sheetOrder": [ - "sheet1" - ], - "appVersion": "0.2.5", - "locale": "zhCN", - "styles": { - "xGBbcX": { - "ff": "宋体", - "fs": 11, - "it": 0, - "bl": 1, - "ul": { - "s": 0, - "cl": { - "rgb": "rgb(0,0,0)" - } - }, - "st": { - "s": 0, - "cl": { - "rgb": "rgb(0,0,0)" - } - }, - "ol": { - "s": 0, - "cl": { - "rgb": "rgb(0,0,0)" - } - }, - "tr": { - "a": 0, - "v": 0 - }, - "td": 0, - "cl": { - "rgb": "rgb(0,0,0)" - }, - "ht": 2, - "vt": 2, - "tb": 1, - "pd": { - "t": 0, - "b": 1, - "l": 2, - "r": 2 - }, - "bd": { - "l": { - "cl": { - "rgb": "windowtext" - }, - "s": 1 - }, - "r": { - "cl": { - "rgb": "black" - }, - "s": 1 - }, - "t": { - "cl": { - "rgb": "windowtext" - }, - "s": 1 - }, - "b": { - "cl": { - "rgb": "windowtext" - }, - "s": 1 - } - } - }, - "F-Ls2N": { - "ff": "宋体", - "fs": 11, - "it": 0, - "bl": 1, - "ul": { - "s": 0, - "cl": { - "rgb": "rgb(0,0,0)" - } - }, - "st": { - "s": 0, - "cl": { - "rgb": "rgb(0,0,0)" - } - }, - "ol": { - "s": 0, - "cl": { - "rgb": "rgb(0,0,0)" - } - }, - "tr": { - "a": 0, - "v": 0 - }, - "td": 0, - "cl": { - "rgb": "rgb(0,0,0)" - }, - "bg": { - "rgb": "rgb(255,255,0)" - }, - "ht": 2, - "vt": 2, - "tb": 3, - "pd": { - "t": 0, - "b": 1, - "l": 2, - "r": 2 - }, - "bd": { - "r": { - "cl": { - "rgb": "black" - }, - "s": 1 - }, - "t": { - "cl": { - "rgb": "windowtext" - }, - "s": 1 - }, - "b": { - "cl": { - "rgb": "windowtext" - }, - "s": 1 - } - } - }, - "llzccW": { - "ff": "宋体", - "fs": 11, - "it": 0, - "bl": 1, - "ul": { - "s": 0, - "cl": { - "rgb": "rgb(0,0,0)" - } - }, - "st": { - "s": 0, - "cl": { - "rgb": "rgb(0,0,0)" - } - }, - "ol": { - "s": 0, - "cl": { - "rgb": "rgb(0,0,0)" - } - }, - "tr": { - "a": 0, - "v": 0 - }, - "td": 0, - "cl": { - "rgb": "rgb(0,0,0)" - }, - "bg": { - "rgb": "rgb(255,255,0)" - }, - "ht": 2, - "vt": 2, - "tb": 3, - "pd": { - "t": 0, - "b": 1, - "l": 2, - "r": 2 - }, - "bd": { - "t": { - "cl": { - "rgb": "windowtext" - }, - "s": 1 - }, - "b": { - "cl": { - "rgb": "windowtext" - }, - "s": 1 - } - } - }, - "57w9Hq": { - "ff": "宋体", - "fs": 11, - "it": 0, - "bl": 1, - "ul": { - "s": 0, - "cl": { - "rgb": "rgb(0,0,0)" - } - }, - "st": { - "s": 0, - "cl": { - "rgb": "rgb(0,0,0)" - } - }, - "ol": { - "s": 0, - "cl": { - "rgb": "rgb(0,0,0)" - } - }, - "tr": { - "a": 0, - "v": 0 - }, - "td": 0, - "cl": { - "rgb": "rgb(0,0,0)" - }, - "bg": { - "rgb": "rgb(255,255,0)" - }, - "ht": 2, - "vt": 2, - "tb": 3, - "pd": { - "t": 0, - "b": 1, - "l": 2, - "r": 2 - }, - "bd": { - "l": { - "cl": { - "rgb": "windowtext" - }, - "s": 1 - }, - "r": { - "cl": { - "rgb": "black" - }, - "s": 1 - }, - "t": { - "cl": { - "rgb": "windowtext" - }, - "s": 1 - }, - "b": { - "cl": { - "rgb": "windowtext" - }, - "s": 1 - } - } - }, - "jFn5AD": { - "ff": "黑体, monospace", - "fs": 11, - "it": 0, - "bl": 0, - "ul": { - "s": 0, - "cl": { - "rgb": "rgb(0,0,0)" - } - }, - "st": { - "s": 0, - "cl": { - "rgb": "rgb(0,0,0)" - } - }, - "ol": { - "s": 0, - "cl": { - "rgb": "rgb(0,0,0)" - } - }, - "tr": { - "a": 0, - "v": 0 - }, - "td": 0, - "cl": { - "rgb": "rgb(0,0,0)" - }, - "bg": { - "rgb": "rgb(181,198,234)" - }, - "ht": 2, - "vt": 2, - "tb": 1, - "pd": { - "t": 0, - "b": 1, - "l": 2, - "r": 2 - }, - "bd": { - "l": { - "cl": { - "rgb": "windowtext" - }, - "s": 1 - }, - "r": { - "cl": { - "rgb": "windowtext" - }, - "s": 1 - }, - "b": { - "cl": { - "rgb": "windowtext" - }, - "s": 1 - } - } - }, - "qKi9hm": { - "ff": "黑体, monospace", - "fs": 11, - "it": 0, - "bl": 0, - "ul": { - "s": 0, - "cl": { - "rgb": "rgb(0,0,0)" - } - }, - "st": { - "s": 0, - "cl": { - "rgb": "rgb(0,0,0)" - } - }, - "ol": { - "s": 0, - "cl": { - "rgb": "rgb(0,0,0)" - } - }, - "tr": { - "a": 0, - "v": 0 - }, - "td": 0, - "cl": { - "rgb": "rgb(0,0,0)" - }, - "bg": { - "rgb": "rgb(181,198,234)" - }, - "ht": 2, - "vt": 2, - "tb": 1, - "pd": { - "t": 0, - "b": 1, - "l": 2, - "r": 2 - }, - "bd": { - "r": { - "cl": { - "rgb": "windowtext" - }, - "s": 1 - }, - "b": { - "cl": { - "rgb": "windowtext" - }, - "s": 1 - } - } - }, - "_i-Ps5": { - "ff": "黑体, monospace", - "fs": 11, - "it": 0, - "bl": 0, - "ul": { - "s": 0, - "cl": { - "rgb": "rgb(0,0,0)" - } - }, - "st": { - "s": 0, - "cl": { - "rgb": "rgb(0,0,0)" - } - }, - "ol": { - "s": 0, - "cl": { - "rgb": "rgb(0,0,0)" - } - }, - "tr": { - "a": 0, - "v": 0 - }, - "td": 0, - "cl": { - "rgb": "rgb(0,0,0)" - }, - "bg": { - "rgb": "rgb(255,255,0)" - }, - "ht": 2, - "vt": 2, - "tb": 3, - "pd": { - "t": 0, - "b": 1, - "l": 2, - "r": 2 - }, - "bd": { - "r": { - "cl": { - "rgb": "windowtext" - }, - "s": 1 - }, - "b": { - "cl": { - "rgb": "windowtext" - }, - "s": 1 - } - } - } - }, - "sheets": { - "sheet1": { - "name": "信访投诉台账", - "id": "sheet1", - "cellData": { - "0": { - "0": { - "v": "信访基本信息", - "t": 1, - "s": "xGBbcX" - }, - "1": { - "s": "xGBbcX" - }, - "2": { - "s": "xGBbcX" - }, - "3": { - "s": "xGBbcX" - }, - "4": { - "s": "xGBbcX" - }, - "5": { - "s": "xGBbcX" - }, - "6": { - "s": "xGBbcX" - }, - "7": { - "s": "xGBbcX" - }, - "8": { - "s": "xGBbcX" - }, - "9": { - "s": "xGBbcX" - }, - "10": { - "s": "xGBbcX" - }, - "11": { - "s": "xGBbcX" - }, - "12": { - "s": "xGBbcX" - }, - "13": { - "s": "xGBbcX" - }, - "14": { - "v": "数字督察(单位责任信息)", - "t": 1, - "s": "F-Ls2N" - }, - "15": { - "s": "F-Ls2N" - }, - "16": { - "s": "F-Ls2N" - }, - "17": { - "v": "数字督察(涉及人员信息)", - "t": 1, - "s": "llzccW" - }, - "18": { - "s": "llzccW" - }, - "19": { - "s": "llzccW" - }, - "20": { - "s": "llzccW" - }, - "21": { - "s": "llzccW" - }, - "22": { - "s": "llzccW" - }, - "23": { - "s": "llzccW" - }, - "24": { - "s": "llzccW" - }, - "25": { - "s": "llzccW" - }, - "26": { - "s": "llzccW" - }, - "27": { - "s": "llzccW" - }, - "28": { - "v": "数字督察(涉及领导信息)", - "t": 1, - "s": "57w9Hq" - }, - "29": { - "s": "57w9Hq" - }, - "30": { - "s": "57w9Hq" - }, - "31": { - "s": "57w9Hq" - }, - "32": { - "s": "57w9Hq" - }, - "33": { - "s": "57w9Hq" - } - }, - "1": { - "0": { - "v": "投诉渠道", - "t": 1, - "s": "jFn5AD" - }, - "1": { - "v": "信件编号", - "t": 1, - "s": "qKi9hm" - }, - "2": { - "v": "受理层级", - "t": 1, - "s": "qKi9hm" - }, - "3": { - "v": "登记时间", - "t": 1, - "s": "qKi9hm" - }, - "4": { - "v": "投诉人", - "t": 1, - "s": "qKi9hm" - }, - "5": { - "v": "投诉人电话", - "t": 1, - "s": "qKi9hm" - }, - "6": { - "v": "初重信访", - "t": 1, - "s": "qKi9hm" - }, - "7": { - "v": "缠访闹访", - "t": 1, - "s": "qKi9hm" - }, - "8": { - "v": "群众集访", - "t": 1, - "s": "qKi9hm" - }, - "9": { - "p": { - "id": "d", - "documentStyle": { - "pageSize": { - "width": 72.41804504394531, - "height": null - }, - "marginTop": 0, - "marginBottom": 1, - "marginRight": 2, - "marginLeft": 2, - "renderConfig": { - "horizontalAlign": 2, - "verticalAlign": 2, - "centerAngle": 0, - "vertexAngle": 0, - "wrapStrategy": 1 - } - }, - "body": { - "dataStream": "涉嫌问题*\r\n", - "textRuns": [ - { - "st": 4, - "ed": 5, - "ts": { - "cl": { - "rgb": "rgb(255,0,0)" - }, - "fs": 11, - "bl": 1, - "ff": "黑体, monospace" - } - } - ], - "paragraphs": [ - { - "startIndex": 5, - "paragraphStyle": { - "horizontalAlign": 2 - } - } - ] - }, - "drawings": {}, - "drawingsOrder": [] - }, - "v": "涉嫌问题*", - "t": 1, - "s": "qKi9hm" - }, - "10": { - "v": "业务类别", - "t": 1, - "s": "qKi9hm" - }, - "11": { - "p": { - "id": "d", - "documentStyle": { - "pageSize": { - "width": 72.41804504394531, - "height": null - }, - "marginTop": 0, - "marginBottom": 1, - "marginRight": 2, - "marginLeft": 2, - "renderConfig": { - "horizontalAlign": 2, - "verticalAlign": 2, - "centerAngle": 0, - "vertexAngle": 0, - "wrapStrategy": 1 - } - }, - "body": { - "dataStream": "涉及警种*\r\n", - "textRuns": [ - { - "st": 4, - "ed": 5, - "ts": { - "cl": { - "rgb": "rgb(255,0,0)" - }, - "fs": 11, - "bl": 1, - "ff": "黑体, monospace" - } - } - ], - "paragraphs": [ - { - "startIndex": 5, - "paragraphStyle": { - "horizontalAlign": 2 - } - } - ] - }, - "drawings": {}, - "drawingsOrder": [] - }, - "v": "涉及警种*", - "t": 1, - "s": "qKi9hm" - }, - "12": { - "p": { - "id": "d", - "documentStyle": { - "pageSize": { - "width": 87.07803344726562, - "height": null - }, - "marginTop": 0, - "marginBottom": 1, - "marginRight": 2, - "marginLeft": 2, - "renderConfig": { - "horizontalAlign": 2, - "verticalAlign": 2, - "centerAngle": 0, - "vertexAngle": 0, - "wrapStrategy": 1 - } - }, - "body": { - "dataStream": "被投诉机构*\r\n", - "textRuns": [ - { - "st": 5, - "ed": 6, - "ts": { - "cl": { - "rgb": "rgb(255,0,0)" - }, - "fs": 11, - "bl": 1, - "ff": "黑体, monospace" - } - } - ], - "paragraphs": [ - { - "startIndex": 6, - "paragraphStyle": { - "horizontalAlign": 2 - } - } - ] - }, - "drawings": {}, - "drawingsOrder": [] - }, - "v": "被投诉机构*", - "t": 1, - "s": "qKi9hm" - }, - "13": { - "v": "具体内容", - "t": 1, - "s": "qKi9hm" - }, - "14": { - "p": { - "id": "d", - "documentStyle": { - "pageSize": { - "width": 88, - "height": null - }, - "marginTop": 0, - "marginBottom": 1, - "marginRight": 2, - "marginLeft": 2, - "renderConfig": { - "horizontalAlign": 2, - "verticalAlign": 2, - "centerAngle": 0, - "vertexAngle": 0, - "wrapStrategy": 3 - } - }, - "body": { - "dataStream": "涉及单位*\r\n", - "textRuns": [ - { - "st": 4, - "ed": 5, - "ts": { - "cl": { - "rgb": "rgb(255,0,0)" - }, - "fs": 11, - "bl": 1, - "ff": "黑体, monospace" - } - } - ], - "paragraphs": [ - { - "startIndex": 5, - "paragraphStyle": { - "horizontalAlign": 2 - } - } - ] - }, - "drawings": {}, - "drawingsOrder": [] - }, - "v": "涉及单位*", - "t": 1, - "s": "_i-Ps5" - }, - "15": { - "p": { - "id": "d", - "documentStyle": { - "pageSize": { - "width": 88, - "height": null - }, - "marginTop": 0, - "marginBottom": 1, - "marginRight": 2, - "marginLeft": 2, - "renderConfig": { - "horizontalAlign": 2, - "verticalAlign": 2, - "centerAngle": 0, - "vertexAngle": 0, - "wrapStrategy": 3 - } - }, - "body": { - "dataStream": "是否 单位责任*\r\n", - "textRuns": [ - { - "st": 10, - "ed": 11, - "ts": { - "cl": { - "rgb": "rgb(255,0,0)" - }, - "fs": 11, - "bl": 1, - "ff": "黑体, monospace" - } - } - ], - "paragraphs": [ - { - "startIndex": 11, - "paragraphStyle": { - "horizontalAlign": 2 - } - } - ] - }, - "drawings": {}, - "drawingsOrder": [] - }, - "v": "是否 单位责任*", - "t": 1, - "s": "_i-Ps5" - }, - "16": { - "p": { - "id": "d", - "documentStyle": { - "pageSize": { - "width": 88, - "height": null - }, - "marginTop": 0, - "marginBottom": 1, - "marginRight": 2, - "marginLeft": 2, - "renderConfig": { - "horizontalAlign": 2, - "verticalAlign": 2, - "centerAngle": 0, - "vertexAngle": 0, - "wrapStrategy": 3 - } - }, - "body": { - "dataStream": "单位 处理结果\r\n", - "textRuns": [], - "paragraphs": [ - { - "startIndex": 10, - "paragraphStyle": { - "horizontalAlign": 2 - } - } - ] - }, - "drawings": {}, - "drawingsOrder": [] - }, - "v": "单位 处理结果", - "t": 1, - "s": "_i-Ps5" - }, - "17": { - "p": { - "id": "d", - "documentStyle": { - "pageSize": { - "width": null, - "height": null - }, - "marginTop": 0, - "marginBottom": 1, - "marginRight": 2, - "marginLeft": 2, - "renderConfig": { - "horizontalAlign": 2, - "verticalAlign": 2, - "centerAngle": 0, - "vertexAngle": 0, - "wrapStrategy": 3 - } - }, - "body": { - "dataStream": "涉及人姓名*\r\n", - "textRuns": [ - { - "st": 0, - "ed": 5, - "ts": { - "cl": { - "rgb": "rgb(0,0,0)" - }, - "fs": 11, - "ff": "黑体, monospace" - } - }, - { - "st": 5, - "ed": 6, - "ts": { - "cl": { - "rgb": "rgb(255,0,0)" - }, - "fs": 11, - "bl": 1, - "ff": "黑体, monospace" - } - } - ], - "paragraphs": [ - { - "startIndex": 6, - "paragraphStyle": { - "horizontalAlign": 2 - } - } - ] - }, - "drawings": {}, - "drawingsOrder": [] - }, - "v": "涉及人姓名*", - "t": 1, - "s": "_i-Ps5" - }, - "18": { - "p": { - "id": "d", - "documentStyle": { - "pageSize": { - "width": null, - "height": null - }, - "marginTop": 0, - "marginBottom": 1, - "marginRight": 2, - "marginLeft": 2, - "renderConfig": { - "horizontalAlign": 2, - "verticalAlign": 2, - "centerAngle": 0, - "vertexAngle": 0, - "wrapStrategy": 3 - } - }, - "body": { - "dataStream": "身份证号码*\r\n", - "textRuns": [ - { - "st": 0, - "ed": 5, - "ts": { - "cl": { - "rgb": "rgb(0,0,0)" - }, - "fs": 11, - "ff": "黑体, monospace" - } - }, - { - "st": 5, - "ed": 6, - "ts": { - "cl": { - "rgb": "rgb(255,0,0)" - }, - "fs": 11, - "bl": 1, - "ff": "黑体, monospace" - } - } - ], - "paragraphs": [ - { - "startIndex": 6, - "paragraphStyle": { - "horizontalAlign": 2 - } - } - ] - }, - "drawings": {}, - "drawingsOrder": [] - }, - "v": "身份证号码*", - "t": 1, - "s": "_i-Ps5" - }, - "19": { - "p": { - "id": "d", - "documentStyle": { - "pageSize": { - "width": null, - "height": null - }, - "marginTop": 0, - "marginBottom": 1, - "marginRight": 2, - "marginLeft": 2, - "renderConfig": { - "horizontalAlign": 2, - "verticalAlign": 2, - "centerAngle": 0, - "vertexAngle": 0, - "wrapStrategy": 3 - } - }, - "body": { - "dataStream": "人员属性*\r\n", - "textRuns": [ - { - "st": 0, - "ed": 4, - "ts": { - "cl": { - "rgb": "rgb(0,0,0)" - }, - "fs": 11, - "ff": "黑体, monospace" - } - }, - { - "st": 4, - "ed": 5, - "ts": { - "cl": { - "rgb": "rgb(255,0,0)" - }, - "fs": 11, - "bl": 1, - "ff": "黑体, monospace" - } - } - ], - "paragraphs": [ - { - "startIndex": 5, - "paragraphStyle": { - "horizontalAlign": 2 - } - } - ] - }, - "drawings": {}, - "drawingsOrder": [] - }, - "v": "人员属性*", - "t": 1, - "s": "_i-Ps5" - }, - "20": { - "v": "督察措施", - "t": 1, - "s": "_i-Ps5" - }, - "21": { - "p": { - "id": "d", - "documentStyle": { - "pageSize": { - "width": null, - "height": null - }, - "marginTop": 0, - "marginBottom": 1, - "marginRight": 2, - "marginLeft": 2, - "renderConfig": { - "horizontalAlign": 2, - "verticalAlign": 2, - "centerAngle": 0, - "vertexAngle": 0, - "wrapStrategy": 3 - } - }, - "body": { - "dataStream": "问题类型*\r\n", - "textRuns": [ - { - "st": 0, - "ed": 4, - "ts": { - "cl": { - "rgb": "rgb(0,0,0)" - }, - "fs": 11, - "ff": "黑体, monospace" - } - }, - { - "st": 4, - "ed": 5, - "ts": { - "cl": { - "rgb": "rgb(255,0,0)" - }, - "fs": 11, - "bl": 1, - "ff": "黑体, monospace" - } - } - ], - "paragraphs": [ - { - "startIndex": 5, - "paragraphStyle": { - "horizontalAlign": 2 - } - } - ] - }, - "drawings": {}, - "drawingsOrder": [] - }, - "v": "问题类型*", - "t": 1, - "s": "_i-Ps5" - }, - "22": { - "p": { - "id": "d", - "documentStyle": { - "pageSize": { - "width": null, - "height": null - }, - "marginTop": 0, - "marginBottom": 1, - "marginRight": 2, - "marginLeft": 2, - "renderConfig": { - "horizontalAlign": 2, - "verticalAlign": 2, - "centerAngle": 0, - "vertexAngle": 0, - "wrapStrategy": 3 - } - }, - "body": { - "dataStream": "主观方面*\r\n", - "textRuns": [ - { - "st": 0, - "ed": 4, - "ts": { - "cl": { - "rgb": "rgb(0,0,0)" - }, - "fs": 11, - "ff": "黑体, monospace" - } - }, - { - "st": 4, - "ed": 5, - "ts": { - "cl": { - "rgb": "rgb(255,0,0)" - }, - "fs": 11, - "bl": 1, - "ff": "黑体, monospace" - } - } - ], - "paragraphs": [ - { - "startIndex": 5, - "paragraphStyle": { - "horizontalAlign": 2 - } - } - ] - }, - "drawings": {}, - "drawingsOrder": [] - }, - "v": "主观方面*", - "t": 1, - "s": "_i-Ps5" - }, - "23": { - "p": { - "id": "d", - "documentStyle": { - "pageSize": { - "width": null, - "height": null - }, - "marginTop": 0, - "marginBottom": 1, - "marginRight": 2, - "marginLeft": 2, - "renderConfig": { - "horizontalAlign": 2, - "verticalAlign": 2, - "centerAngle": 0, - "vertexAngle": 0, - "wrapStrategy": 3 - } - }, - "body": { - "dataStream": "责任类别*\r\n", - "textRuns": [ - { - "st": 0, - "ed": 4, - "ts": { - "cl": { - "rgb": "rgb(0,0,0)" - }, - "fs": 11, - "ff": "黑体, monospace" - } - }, - { - "st": 4, - "ed": 5, - "ts": { - "cl": { - "rgb": "rgb(255,0,0)" - }, - "fs": 11, - "bl": 1, - "ff": "黑体, monospace" - } - } - ], - "paragraphs": [ - { - "startIndex": 5, - "paragraphStyle": { - "horizontalAlign": 2 - } - } - ] - }, - "drawings": {}, - "drawingsOrder": [] - }, - "v": "责任类别*", - "t": 1, - "s": "_i-Ps5" - }, - "24": { - "p": { - "id": "d", - "documentStyle": { - "pageSize": { - "width": null, - "height": null - }, - "marginTop": 0, - "marginBottom": 1, - "marginRight": 2, - "marginLeft": 2, - "renderConfig": { - "horizontalAlign": 2, - "verticalAlign": 2, - "centerAngle": 0, - "vertexAngle": 0, - "wrapStrategy": 3 - } - }, - "body": { - "dataStream": "处理结果*\r\n", - "textRuns": [ - { - "st": 0, - "ed": 4, - "ts": { - "cl": { - "rgb": "rgb(0,0,0)" - }, - "fs": 11, - "ff": "黑体, monospace" - } - }, - { - "st": 4, - "ed": 5, - "ts": { - "cl": { - "rgb": "rgb(255,0,0)" - }, - "fs": 11, - "bl": 1, - "ff": "黑体, monospace" - } - } - ], - "paragraphs": [ - { - "startIndex": 5, - "paragraphStyle": { - "horizontalAlign": 2 - } - } - ] - }, - "drawings": {}, - "drawingsOrder": [] - }, - "v": "处理结果*", - "t": 1, - "s": "_i-Ps5" - }, - "25": { - "v": "维权容错", - "t": 1, - "s": "_i-Ps5" - }, - "26": { - "p": { - "id": "d", - "documentStyle": { - "pageSize": { - "width": null, - "height": null - }, - "marginTop": 0, - "marginBottom": 1, - "marginRight": 2, - "marginLeft": 2, - "renderConfig": { - "horizontalAlign": 2, - "verticalAlign": 2, - "centerAngle": 0, - "vertexAngle": 0, - "wrapStrategy": 3 - } - }, - "body": { - "dataStream": "帮扶情况*\r\n", - "textRuns": [ - { - "st": 0, - "ed": 4, - "ts": { - "cl": { - "rgb": "rgb(0,0,0)" - }, - "fs": 11, - "ff": "黑体, monospace" - } - }, - { - "st": 4, - "ed": 5, - "ts": { - "cl": { - "rgb": "rgb(255,0,0)" - }, - "fs": 11, - "bl": 1, - "ff": "黑体, monospace" - } - } - ], - "paragraphs": [ - { - "startIndex": 5, - "paragraphStyle": { - "horizontalAlign": 2 - } - } - ] - }, - "drawings": {}, - "drawingsOrder": [] - }, - "v": "帮扶情况*", - "t": 1, - "s": "_i-Ps5" - }, - "27": { - "p": { - "id": "d", - "documentStyle": { - "pageSize": { - "width": null, - "height": null - }, - "marginTop": 0, - "marginBottom": 1, - "marginRight": 2, - "marginLeft": 2, - "renderConfig": { - "horizontalAlign": 2, - "verticalAlign": 2, - "centerAngle": 0, - "vertexAngle": 0, - "wrapStrategy": 3 - } - }, - "body": { - "dataStream": "帮扶 开始结束时间*\r\n", - "textRuns": [ - { - "st": 0, - "ed": 2, - "ts": { - "cl": { - "rgb": "rgb(0,0,0)" - }, - "fs": 11, - "ff": "黑体, monospace" - } - }, - { - "st": 2, - "ed": 12, - "ts": { - "cl": { - "rgb": "rgb(0,0,0)" - }, - "fs": 11, - "ff": "黑体, monospace" - } - }, - { - "st": 12, - "ed": 13, - "ts": { - "cl": { - "rgb": "rgb(255,0,0)" - }, - "fs": 11, - "bl": 1, - "ff": "黑体, monospace" - } - } - ], - "paragraphs": [ - { - "startIndex": 13, - "paragraphStyle": { - "horizontalAlign": 2 - } - } - ] - }, - "drawings": {}, - "drawingsOrder": [] - }, - "v": "帮扶 开始结束时间*", - "t": 1, - "s": "_i-Ps5" - }, - "28": { - "p": { - "id": "d", - "documentStyle": { - "pageSize": { - "width": null, - "height": null - }, - "marginTop": 0, - "marginBottom": 1, - "marginRight": 2, - "marginLeft": 2, - "renderConfig": { - "horizontalAlign": 2, - "verticalAlign": 2, - "centerAngle": 0, - "vertexAngle": 0, - "wrapStrategy": 3 - } - }, - "body": { - "dataStream": "涉及领导姓名*\r\n", - "textRuns": [ - { - "st": 0, - "ed": 6, - "ts": { - "cl": { - "rgb": "rgb(0,0,0)" - }, - "fs": 11, - "ff": "黑体, monospace" - } - }, - { - "st": 6, - "ed": 7, - "ts": { - "cl": { - "rgb": "rgb(255,0,0)" - }, - "fs": 11, - "bl": 1, - "ff": "黑体, monospace" - } - } - ], - "paragraphs": [ - { - "startIndex": 7, - "paragraphStyle": { - "horizontalAlign": 2 - } - } - ] - }, - "drawings": {}, - "drawingsOrder": [] - }, - "v": "涉及领导姓名*", - "t": 1, - "s": "_i-Ps5" - }, - "29": { - "p": { - "id": "d", - "documentStyle": { - "pageSize": { - "width": null, - "height": null - }, - "marginTop": 0, - "marginBottom": 1, - "marginRight": 2, - "marginLeft": 2, - "renderConfig": { - "horizontalAlign": 2, - "verticalAlign": 2, - "centerAngle": 0, - "vertexAngle": 0, - "wrapStrategy": 3 - } - }, - "body": { - "dataStream": "身份证号码*\r\n", - "textRuns": [ - { - "st": 0, - "ed": 5, - "ts": { - "cl": { - "rgb": "rgb(0,0,0)" - }, - "fs": 11, - "ff": "黑体, monospace" - } - }, - { - "st": 5, - "ed": 6, - "ts": { - "cl": { - "rgb": "rgb(255,0,0)" - }, - "fs": 11, - "bl": 1, - "ff": "黑体, monospace" - } - } - ], - "paragraphs": [ - { - "startIndex": 6, - "paragraphStyle": { - "horizontalAlign": 2 - } - } - ] - }, - "drawings": {}, - "drawingsOrder": [] - }, - "v": "身份证号码*", - "t": 1, - "s": "_i-Ps5" - }, - "30": { - "v": "督察措施", - "t": 1, - "s": "_i-Ps5" - }, - "31": { - "p": { - "id": "d", - "documentStyle": { - "pageSize": { - "width": null, - "height": null - }, - "marginTop": 0, - "marginBottom": 1, - "marginRight": 2, - "marginLeft": 2, - "renderConfig": { - "horizontalAlign": 2, - "verticalAlign": 2, - "centerAngle": 0, - "vertexAngle": 0, - "wrapStrategy": 3 - } - }, - "body": { - "dataStream": "责任类别*\r\n", - "textRuns": [ - { - "st": 0, - "ed": 4, - "ts": { - "cl": { - "rgb": "rgb(0,0,0)" - }, - "fs": 11, - "ff": "黑体, monospace" - } - }, - { - "st": 4, - "ed": 5, - "ts": { - "cl": { - "rgb": "rgb(255,0,0)" - }, - "fs": 11, - "bl": 1, - "ff": "黑体, monospace" - } - } - ], - "paragraphs": [ - { - "startIndex": 5, - "paragraphStyle": { - "horizontalAlign": 2 - } - } - ] - }, - "drawings": {}, - "drawingsOrder": [] - }, - "v": "责任类别*", - "t": 1, - "s": "_i-Ps5" - }, - "32": { - "p": { - "id": "d", - "documentStyle": { - "pageSize": { - "width": null, - "height": null - }, - "marginTop": 0, - "marginBottom": 1, - "marginRight": 2, - "marginLeft": 2, - "renderConfig": { - "horizontalAlign": 2, - "verticalAlign": 2, - "centerAngle": 0, - "vertexAngle": 0, - "wrapStrategy": 3 - } - }, - "body": { - "dataStream": "处理结果*\r\n", - "textRuns": [ - { - "st": 0, - "ed": 4, - "ts": { - "cl": { - "rgb": "rgb(0,0,0)" - }, - "fs": 11, - "ff": "黑体, monospace" - } - }, - { - "st": 4, - "ed": 5, - "ts": { - "cl": { - "rgb": "rgb(255,0,0)" - }, - "fs": 11, - "bl": 1, - "ff": "黑体, monospace" - } - } - ], - "paragraphs": [ - { - "startIndex": 5, - "paragraphStyle": { - "horizontalAlign": 2 - } - } - ] - }, - "drawings": {}, - "drawingsOrder": [] - }, - "v": "处理结果*", - "t": 1, - "s": "_i-Ps5" - }, - "33": { - "v": "维权容错", - "t": 1, - "s": "_i-Ps5" - } - } - }, - "mergeData": [ - { - "startRow": 0, - "endRow": 0, - "startColumn": 0, - "endColumn": 13 - }, - { - "startRow": 0, - "endRow": 0, - "startColumn": 14, - "endColumn": 16 - }, - { - "startRow": 0, - "endRow": 0, - "startColumn": 17, - "endColumn": 27 - }, - { - "startRow": 0, - "endRow": 0, - "startColumn": 42, - "endColumn": 47 - } - ], - "tabColor": "", - "hidden": 0, - "rowCount": 1000, - "columnCount": 34, - "zoomRatio": 1, - "freeze": { - "xSplit": 0, - "ySplit": 0, - "startRow": -1, - "startColumn": -1 - }, - "scrollTop": 0, - "scrollLeft": 0, - "defaultColumnWidth": 88, - "defaultRowHeight": 24, - "rowData": { - "0": { - "hd": 0, - "h": 40 - }, - "1": { - "hd": 0, - "h": 41.266666666666666 - } - }, - "columnData": { - "0": { - "w": 136, - "hd": 0 - }, - "1": { - "w": 146, - "hd": 0 - }, - "2": { - "w": 113, - "hd": 0 - }, - "3": { - "w": 146, - "hd": 0 - }, - "4": { - "w": 115, - "hd": 0 - }, - "5": { - "w": 146, - "hd": 0 - }, - "6": { - "w": 111, - "hd": 0 - }, - "7": { - "w": 98, - "hd": 0 - }, - "8": { - "w": 112, - "hd": 0 - }, - "9": { - "w": 98, - "hd": 0 - }, - "10": { - "w": 99, - "hd": 0 - }, - "11": { - "w": 94, - "hd": 0 - }, - "12": { - "w": 72, - "hd": 0 - }, - "13": { - "w": 88, - "hd": 0 - }, - "14": { - "w": 88, - "hd": 0 - }, - "15": { - "w": 88, - "hd": 0 - }, - "16": { - "w": 88, - "hd": 0 - }, - "17": { - "w": 88, - "hd": 0 - }, - "18": { - "w": 88, - "hd": 0 - }, - "19": { - "w": 88, - "hd": 0 - }, - "20": { - "w": 88, - "hd": 0 - }, - "21": { - "w": 96, - "hd": 0 - }, - "22": { - "w": 83, - "hd": 0 - }, - "23": { - "w": 90, - "hd": 0 - }, - "24": { - "w": 72, - "hd": 0 - }, - "25": { - "w": 91, - "hd": 0 - }, - "26": { - "w": 130, - "hd": 0 - }, - "27": { - "w": 124, - "hd": 0 - }, - "28": { - "w": 98, - "hd": 0 - }, - "29": { - "w": 107, - "hd": 0 - }, - "30": { - "w": 100, - "hd": 0 - }, - "31": { - "w": 102, - "hd": 0 - }, - "32": { - "w": 100, - "hd": 0 - }, - "33": { - "w": 88, - "hd": 0 - } - }, - "showGridlines": 1, - "rowHeader": { - "width": 46, - "hidden": 0 - }, - "columnHeader": { - "height": 20, - "hidden": 0 - }, - "selections": [ - "A1" - ], - "rightToLeft": 0 - } - }, - "resources": [] -} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/SupervisionApplication.java b/src/main/java/com/biutag/supervision/SupervisionApplication.java index 359aea6..bb76792 100644 --- a/src/main/java/com/biutag/supervision/SupervisionApplication.java +++ b/src/main/java/com/biutag/supervision/SupervisionApplication.java @@ -18,4 +18,4 @@ public class SupervisionApplication { SpringApplication.run(SupervisionApplication.class, args); } -} +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/config/CorsConfig.java b/src/main/java/com/biutag/supervision/config/CorsConfig.java new file mode 100644 index 0000000..d5d1d13 --- /dev/null +++ b/src/main/java/com/biutag/supervision/config/CorsConfig.java @@ -0,0 +1,33 @@ +package com.biutag.supervision.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +import org.springframework.web.filter.CorsFilter; + +/** + * @author wxc + * @date 2025/4/12 + */ +@Configuration +public class CorsConfig { + + private CorsConfiguration corsConfig() { + CorsConfiguration corsConfiguration = new CorsConfiguration(); + corsConfiguration.addAllowedOriginPattern("*"); //允许所有域名访问 + corsConfiguration.addAllowedHeader("*"); //允许所有请求头 + corsConfiguration.addAllowedMethod("*"); //允许所有的请求类型 + corsConfiguration.setMaxAge(3600L); + corsConfiguration.setAllowCredentials(true); //允许请求携带验证信息(cookie) + return corsConfiguration; + } + + @Bean + public CorsFilter corsFilter() { + //存储request与跨域配置信息的容器,基于url的映射 + UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + source.registerCorsConfiguration("/**", corsConfig()); + return new CorsFilter(source); + } +} diff --git a/src/main/java/com/biutag/supervision/config/InterceptorConfig.java b/src/main/java/com/biutag/supervision/config/InterceptorConfig.java index 1de3721..e27035c 100644 --- a/src/main/java/com/biutag/supervision/config/InterceptorConfig.java +++ b/src/main/java/com/biutag/supervision/config/InterceptorConfig.java @@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.web.servlet.HandlerInterceptor; +import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @@ -37,12 +38,14 @@ public class InterceptorConfig implements WebMvcConfigurer { registry.addInterceptor(new DefaultInterceptor()) .addPathPatterns("/**") .excludePathPatterns("/api/**") + .excludePathPatterns("/crx/ajhc/**") // 登录 - .excludePathPatterns("/login", "/jit/**") + .excludePathPatterns("/login", "/jit/**", "/app/login") .excludePathPatterns("/file/stream/**", "/templates/**") .excludePathPatterns("/datav/risk/**") .excludePathPatterns("/score/**") .excludePathPatterns("/common/**") + .excludePathPatterns("/app/**") // excel导出 .excludePathPatterns("/data/petitionComplaint12337/export/result", "/negative/books/export/**") .excludePathPatterns(List.of("/doc.html", "/webjars/**", "/favicon.ico", "/v3/api-docs/**")); diff --git a/src/main/java/com/biutag/supervision/constants/enums/TaskTypeEnum.java b/src/main/java/com/biutag/supervision/constants/enums/TaskTypeEnum.java index b77454e..eb9a95a 100644 --- a/src/main/java/com/biutag/supervision/constants/enums/TaskTypeEnum.java +++ b/src/main/java/com/biutag/supervision/constants/enums/TaskTypeEnum.java @@ -10,5 +10,8 @@ public enum TaskTypeEnum { testing_alcohol, // 督察任务 - inspection; + inspection, + + // 自查任务 + selfexamination; } diff --git a/src/main/java/com/biutag/supervision/constants/enums/TestingAlcoholStateEnum.java b/src/main/java/com/biutag/supervision/constants/enums/TestingAlcoholStateEnum.java index a763fc2..e78d2e9 100644 --- a/src/main/java/com/biutag/supervision/constants/enums/TestingAlcoholStateEnum.java +++ b/src/main/java/com/biutag/supervision/constants/enums/TestingAlcoholStateEnum.java @@ -7,9 +7,6 @@ package com.biutag.supervision.constants.enums; */ public enum TestingAlcoholStateEnum { - // 未检测 - not_detected, - // 未饮酒 not_drinking, diff --git a/src/main/java/com/biutag/supervision/controller/AppController.java b/src/main/java/com/biutag/supervision/controller/AppController.java new file mode 100644 index 0000000..54fc7b3 --- /dev/null +++ b/src/main/java/com/biutag/supervision/controller/AppController.java @@ -0,0 +1,73 @@ +package com.biutag.supervision.controller; + +import cn.hutool.http.HttpRequest; +import cn.hutool.http.HttpResponse; +import cn.hutool.http.Method; +import io.swagger.v3.oas.annotations.Operation; +import lombok.Getter; +import lombok.Setter; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import java.util.Objects; + +/** + * @author wxc + * @date 2025/4/18 + */ +@Slf4j +@RequestMapping("app") +@Controller +public class AppController { + + @Operation(summary = "数据入口") + @ResponseBody + @PostMapping("forward") + public String forward(@RequestBody Request request) { + log.info("APP 请求地址:{} 请求方式:{} 授权码:{}", request.getUrl(), request.getMethod(), request.getToken()); + if (Objects.nonNull(request.getBody())) { + log.info("APP 请求参数:{}", request.getBody()); + } + HttpResponse httpResponse = HttpRequest.of(String.format("http://127.0.0.1:8080" + request.getUrl())) + .method(getMethod(request.getMethod())) + .auth(request.getToken()) + .body(request.body) + .execute(); + return httpResponse.body(); + } + + @Operation(summary = "文件预览") + @GetMapping("file/stream/forward") + public String fileSteamForward(String filepath) { + log.info("APP 文件预览,文件路径:{}", filepath); + return "forward:/file/stream" + filepath; + } + + public Method getMethod(String method) { + if ("GET".equals(method)) { + return Method.GET; + } + if ("DELETE".equals(method)) { + return Method.DELETE; + } + if ("PUT".equals(method)) { + return Method.PUT; + } + return Method.POST; + } + + @Setter + @Getter + public static class Request { + + private String url; + + private String method; + + private String token; + + private String body; + + } +} diff --git a/src/main/java/com/biutag/supervision/controller/FileController.java b/src/main/java/com/biutag/supervision/controller/FileController.java index a9893c8..ba1de7d 100644 --- a/src/main/java/com/biutag/supervision/controller/FileController.java +++ b/src/main/java/com/biutag/supervision/controller/FileController.java @@ -1,9 +1,13 @@ package com.biutag.supervision.controller; +import cn.hutool.core.io.FileUtil; import cn.hutool.core.io.IoUtil; +import cn.hutool.core.util.StrUtil; import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.pojo.dto.FileBase64Dto; import com.biutag.supervision.pojo.vo.FileVo; import com.biutag.supervision.service.FileService; +import com.biutag.supervision.util.ImgUtil; import com.biutag.supervision.util.WordUtil; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; @@ -13,8 +17,10 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; +import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; +import java.util.Base64; @Slf4j @RequiredArgsConstructor @@ -34,6 +40,23 @@ public class FileController { .setFilePath(filePath)); } + @ResponseBody + @PostMapping("upload/base64") + public Result upload(@RequestBody FileBase64Dto file) { + log.info("文件BASE64上传 upload------------------------------"); + String base64 = file.getBase64(); + if (base64.contains(",")) { + base64 = base64.substring(base64.indexOf(",") + 1); + } + byte[] decodedBytes = Base64.getDecoder().decode(base64); + ByteArrayInputStream is = new ByteArrayInputStream(decodedBytes); + String filePath = fileService.upload(is, is.available(), FileUtil.extName(file.getOriginalFilename())); + + return Result.success(new FileVo() + .setFileName(file.getOriginalFilename()) + .setFilePath(filePath)); + } + @GetMapping("stream/**") public void download(HttpServletRequest request, HttpServletResponse response) throws IOException { String filePath = request.getRequestURI().substring(12); @@ -49,4 +72,18 @@ public class FileController { IoUtil.copy(is, response.getOutputStream()); } + @ResponseBody + @GetMapping("base64") + public Result getBase64(String filepath) throws IOException { + if (StrUtil.isBlank(filepath)) { + return Result.success(null); + } + InputStream is = fileService.download(filepath); + String base64 = Base64.getEncoder().encodeToString(is.readAllBytes()); + if (ImgUtil.isImg(filepath)) { + base64 = String.format("data:image/%s;base64,", FileUtil.extName(filepath).toLowerCase()) + base64; + } + return Result.success(base64); + } + } diff --git a/src/main/java/com/biutag/supervision/controller/LoginController.java b/src/main/java/com/biutag/supervision/controller/LoginController.java index 6946827..c0b9586 100644 --- a/src/main/java/com/biutag/supervision/controller/LoginController.java +++ b/src/main/java/com/biutag/supervision/controller/LoginController.java @@ -4,11 +4,13 @@ import cn.com.jit.JitAuthClient; import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSONObject; import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.pojo.domain.AppUser; import com.biutag.supervision.pojo.dto.AccountDto; - import com.biutag.supervision.pojo.entity.BaseAccount; +import com.biutag.supervision.pojo.entity.SupPolice; import com.biutag.supervision.pojo.vo.TokenVo; import com.biutag.supervision.service.BaseAccountService; +import com.biutag.supervision.service.SupPoliceService; import com.biutag.supervision.service.UserLoginService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -33,6 +35,8 @@ public class LoginController { private final UserLoginService userLoginService; + private final SupPoliceService policeService; + @Operation(summary = "登录") @PostMapping("login") public Result login(@RequestBody AccountDto account) { @@ -87,4 +91,12 @@ public class LoginController { String token = userLoginService.login(idCode); return Result.success(new TokenVo().setToken(token)); } + + @Operation(summary = "App登录") + @PostMapping("app/login") + public Result appLogin(String empNo) { + SupPolice police = policeService.getByEmpNo(empNo); + return Result.success(userLoginService.loginByApp(police.getIdCode())); + } + } diff --git a/src/main/java/com/biutag/supervision/controller/datav/DataVAuditController.java b/src/main/java/com/biutag/supervision/controller/datav/DataVAuditController.java index 87ec5ef..0c42013 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/DataVAuditController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DataVAuditController.java @@ -2,9 +2,19 @@ package com.biutag.supervision.controller.datav; import cn.hutool.core.date.DateUtil; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.biutag.supervision.constants.enums.ProblemSourcesEnum; import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.pojo.dto.common.PieItem; +import com.biutag.supervision.pojo.entity.Negative; +import com.biutag.supervision.pojo.entity.NegativeBlame; +import com.biutag.supervision.pojo.entity.NegativeProblemRelation; import com.biutag.supervision.pojo.entity.News; +import com.biutag.supervision.pojo.vo.AuditOverview; import com.biutag.supervision.pojo.vo.NewsVo; +import com.biutag.supervision.service.NegativeBlameService; +import com.biutag.supervision.service.NegativeProblemRelationService; +import com.biutag.supervision.service.NegativeService; import com.biutag.supervision.service.NewsService; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; @@ -16,6 +26,8 @@ import org.springframework.web.bind.annotation.RestController; import java.util.Date; import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; import static com.biutag.supervision.constants.WorkDynamicConstants.SJGZDT; @@ -34,6 +46,23 @@ public class DataVAuditController { private final NewsService newsService; + private final NegativeService negativeService; + + private final NegativeBlameService negativeBlameService; + + @GetMapping("/overview") + public Result overview(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + List negatives = negativeService.list(new LambdaQueryWrapper().between(Negative::getCrtTime, beginTime, DateUtil.endOfDay(endTime)) + .in(Negative::getProblemSourcesCode, List.of(ProblemSourcesEnum.ZFTZSJ.getValue(), ProblemSourcesEnum.ZFSACFSS.getValue(), ProblemSourcesEnum.JJZRSJ.getValue(), ProblemSourcesEnum.ZXSJ.getValue()))); + long accountableNumber = negativeBlameService.count(new LambdaQueryWrapper().in(NegativeBlame::getNegativeId, negatives.stream().map(Negative::getId).collect(Collectors.toSet())) + .ne(NegativeBlame::getHandleResultName, "不予追责")); + AuditOverview overview = new AuditOverview(); + overview.setNegativeNumber(negatives.size()); + overview.setAccountableNumber(accountableNumber); + return Result.success(overview); + } + @GetMapping("/getWorkDynamics") public Result> getWorkDynamics(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @@ -41,5 +70,17 @@ public class DataVAuditController { return Result.success(newsList); } + @GetMapping("/problems") + public Result> problems(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + endTime = DateUtil.endOfDay(endTime); + List negatives = negativeService.list(new LambdaQueryWrapper().between(Negative::getCrtTime, beginTime, endTime) + .in(Negative::getProblemSourcesCode, List.of(ProblemSourcesEnum.ZFTZSJ.getValue(), ProblemSourcesEnum.ZFSACFSS.getValue(), ProblemSourcesEnum.JJZRSJ.getValue(), ProblemSourcesEnum.ZXSJ.getValue()))); + Map> collect = negatives.stream().collect(Collectors.groupingBy(Negative::getProblemSources)); + List result = collect.keySet().stream().map(name -> { + return new PieItem(name, collect.get(name).size()); + }).toList(); + return Result.success(result); + } } diff --git a/src/main/java/com/biutag/supervision/controller/datav/DataVGlobalController.java b/src/main/java/com/biutag/supervision/controller/datav/DataVGlobalController.java index 7a3022b..e6c13e0 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/DataVGlobalController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DataVGlobalController.java @@ -1,10 +1,16 @@ package com.biutag.supervision.controller.datav; +import cn.hutool.core.date.DateUtil; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.biutag.supervision.constants.enums.ProblemSourcesEnum; import com.biutag.supervision.mapper.NegativeMapper; import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.pojo.entity.Negative; import com.biutag.supervision.pojo.vo.*; +import com.biutag.supervision.service.DataMailService; +import com.biutag.supervision.service.NegativeService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; @@ -33,6 +39,10 @@ public class DataVGlobalController { private final NegativeMapper negativeMapper; + private final DataMailService dataMailService; + + private final NegativeService negativeService; + //region 左边 /** @@ -46,6 +56,7 @@ public class DataVGlobalController { @GetMapping("/getOrganizationRank") public Result getOrganizationRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + endTime = DateUtil.endOfDay(endTime); List fxsjlist = negativeMapper.selectOrganizeProblemRank(3, beginTime, endTime); List jsdwlist = negativeMapper.selectOrganizeProblemRank(4, beginTime, endTime); JSONObject res = new JSONObject() @@ -87,8 +98,14 @@ public class DataVGlobalController { @GetMapping("/getAllGlobalCount") public Result getAllGlobalCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + endTime = DateUtil.endOfDay(endTime); // 获取数据大屏中央总数概览 GlobalOverViewVo overview = negativeMapper.getAllGlobalCount(beginTime, endTime); + MailOverviewVo vo = dataMailService.mailCount(beginTime, endTime); + // 局长信箱 + long mailboxNumber = negativeService.count(new LambdaQueryWrapper().between(Negative::getCrtTime, beginTime, endTime).eq(Negative::getProblemSourcesCode, ProblemSourcesEnum.JZXX.getValue())); + overview.setMailboxNumber(mailboxNumber); + overview.setComplaintPro(vo.getCountryMail() + vo.getPoliceMail() + vo.getNumberMail()); JSONObject data = new JSONObject().fluentPut("overview", overview); return Result.success(data); } @@ -141,6 +158,7 @@ public class DataVGlobalController { @GetMapping("/getStrongProblemRate") public Result getStrongProblemRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + endTime = DateUtil.endOfDay(endTime); // 突出问题排名 List tcwtlist = negativeMapper.selectStrongProblemRank(beginTime, endTime); for (int i = 1; i <= tcwtlist.size(); i++) { @@ -167,7 +185,5 @@ public class DataVGlobalController { JSONObject res = new JSONObject().fluentPut("wtlxlist", wtlxlist); return Result.success(res); } - //endregion - } diff --git a/src/main/java/com/biutag/supervision/controller/datav/DataVMailViewController.java b/src/main/java/com/biutag/supervision/controller/datav/DataVMailViewController.java index bc146ca..a6da0ff 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/DataVMailViewController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DataVMailViewController.java @@ -1,5 +1,6 @@ package com.biutag.supervision.controller.datav; +import cn.hutool.core.date.DateUtil; import com.alibaba.fastjson.JSONObject; import com.biutag.supervision.constants.enums.RepeatEnum; import com.biutag.supervision.mapper.DataPetition12337Mapper; @@ -50,6 +51,7 @@ public class DataVMailViewController { @GetMapping("/getFirstAndRepeatMail") public Result getFirstAndRepeatMail(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + endTime = DateUtil.endOfDay(endTime); // 初访重访情况总览 MailFirstAndRepeatOverviewVo fxjsFirstAndRepeatOverview = dataPetitionComplaintMapper.getFirstAndRepeatOverview(beginTime, endTime, 3); MailFirstAndRepeatOverviewVo bwzdFirstAndRepeatOverview = dataPetitionComplaintMapper.getFirstAndRepeatOverview(beginTime, endTime, 4); @@ -88,7 +90,7 @@ public class DataVMailViewController { public Result getAllMailCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { // 信访数据总数概览 - MailOverviewVo overview = dataMailService.allMailCount(beginTime, endTime); + MailOverviewVo overview = dataMailService.allMailCount(beginTime, DateUtil.endOfDay(endTime)); System.out.println("信访总览================================"); System.out.println(overview); // MailOverviewVo overview = dataMailService.getAllMailCount(beginTime, endTime); diff --git a/src/main/java/com/biutag/supervision/controller/datav/DataVRightsComfortController.java b/src/main/java/com/biutag/supervision/controller/datav/DataVRightsComfortController.java index 9e73002..d31c004 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/DataVRightsComfortController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DataVRightsComfortController.java @@ -1,19 +1,20 @@ package com.biutag.supervision.controller.datav; +import cn.hutool.core.date.DateUtil; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.biutag.supervision.constants.enums.RpcApplyTypeEnum; import com.biutag.supervision.mapper.RpcApplyMapper; import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.dto.common.PieItem; +import com.biutag.supervision.pojo.entity.RpcApply; import com.biutag.supervision.pojo.model.DataRightsComfortModel; -import com.biutag.supervision.pojo.vo.ComfortCountVO; import com.biutag.supervision.pojo.vo.EchartsVo; -import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo; -import com.biutag.supervision.pojo.vo.RightsComfortMapVo; import com.biutag.supervision.service.DataRightsComfortService; - +import com.biutag.supervision.service.RpcApplyService; +import com.biutag.supervision.util.CompletableUtils.CompletableFutureUtil; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; -import org.springframework.cache.annotation.Cacheable; import org.springframework.format.annotation.DateTimeFormat; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -21,6 +22,8 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.util.*; +import java.util.concurrent.CompletableFuture; +import java.util.stream.Collectors; /** * 维权抚慰大屏相关 @@ -35,98 +38,61 @@ public class DataVRightsComfortController { private final DataRightsComfortService dataRightsComfortService; + + private final RpcApplyService rpcApplyService; private final RpcApplyMapper rpcApplyMapper; @GetMapping - public Result rightsComfort(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { -// DataRightsComfortModel result = new DataRightsComfortModel(); - // 维权案件总数 - - // 受侵害人数 - - // 抚慰人数 -// result.setComfortPersonNumber(dataRightsComfortService.countComfortPersonNumber(beginTime, endTime)); - // 打击处理人数 -// result.setHitPersonNumber(dataRightsComfortService.countHitPersonNumber(beginTime, endTime)); - // 抚慰金额(万元) -// result.setComfortMoney(dataRightsComfortService.countComfortMoney(beginTime, endTime)); - // 维权案件情况 - - // 案件类别占比 - - // 打处情况 -// result.setPunishmentSituation(dataRightsComfortService.selectPunishmentSituation(beginTime, endTime)); - // 抚慰情况 -// result.setComfortSituation(dataRightsComfortService.selectComfortSituation(beginTime, endTime)); - // 民辅警受伤情况 - - // 发案情况占比 - -// return Result.success(result); - return null; - } - - - // region 左边 - // 维权案件和抚慰金情况 - @GetMapping("/getRightsAndComfortRank") - public Result getRightsAndComfortRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - List fxsjRightsRankList = rpcApplyMapper.getRightsRank(beginTime, endTime, 3);; // 分县市局维权排名 - List jsdwRightsRankList = rpcApplyMapper.getRightsRank(beginTime, endTime, 4);; // 分县市局维权排名 - JSONObject data = new JSONObject() - .fluentPut("fxsjRightsRankList", fxsjRightsRankList) - .fluentPut("jsdwRightsRankList", jsdwRightsRankList); - return Result.success(data); - } - - // 案件类别占比 - @GetMapping("/getCaseTypeRate") - public Result getCaseTypeRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - return null; - } - -// endregion - - // region 中间 - - // 抚慰大屏中央总览数据 - @GetMapping("/getALlComfortCount") - public Result getALlComfortCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - Integer comfortTotal = dataRightsComfortService.countComfortPersonNumber(beginTime, endTime); // 抚慰人数 - Integer hitTotal = dataRightsComfortService.countHitPersonNumber(beginTime, endTime); // 打击处理人数 - Double comfortMoney = dataRightsComfortService.countComfortMoney(beginTime, endTime); // 抚慰金额 - ComfortCountVO comfortOverview = new ComfortCountVO(); - comfortOverview.setComfortTotal(comfortTotal); - comfortOverview.setHitTotal(hitTotal); - comfortOverview.setComfortMoney(comfortMoney); - comfortOverview.setComfortCaseTotal(0); - comfortOverview.setHurtTotal(0); - JSONObject data = new JSONObject().fluentPut("comfortOverview", comfortOverview); - return Result.success(data); - } - - - // 地图图标数据 - @GetMapping("/getComfortMapIcon") - @Cacheable(cacheNames = "Supervision:Screen:ComfortMap", key = "#beginTime.getTime()+'_'+#endTime.getTime()") - public Result getComfortMapIcon(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - List comfortMapVoList = dataRightsComfortService.getComfortMapIcon(beginTime, endTime); - JSONObject jsonObject = new JSONObject(); - jsonObject.fluentPut("comfortMapVoList", comfortMapVoList); - return Result.success(jsonObject); - } - - // 打处情况 - @GetMapping("/getPunishmentSituation") - public Result getPunishmentSituation(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - List punishmentSituationList = dataRightsComfortService.selectPunishmentSituation(beginTime, endTime); - JSONObject data = new JSONObject().fluentPut("punishmentSituationList", punishmentSituationList); - return Result.success(data); + public Result rightsComfort(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + DataRightsComfortModel result = new DataRightsComfortModel(); + // 异步 + Date finalEndTime = DateUtil.endOfDay(endTime); + CompletableFuture.allOf( + CompletableFutureUtil.runSyncObject(() -> { + List list = rpcApplyService.list(new LambdaQueryWrapper() + .between(RpcApply::getCrtTime, beginTime, finalEndTime) + .eq(RpcApply::getType, RpcApplyTypeEnum.RIGHTS_PROTECTION.getValue())); + Set caseNumbers = list.stream().map(RpcApply::getCaseNumber).collect(Collectors.toSet()); + // 维权案件总数 + result.setRightsNumber(caseNumbers.size()); + // 受侵害人数 + result.setVictimNumber(list.size()); + // 打击处理人数 + result.setHitPersonNumber(list.size() + 1); + + Map> collect = list.stream().collect(Collectors.groupingBy(RpcApply::getInfringerHandle)); + // 打处情况 + result.setPunishmentSituation(collect.keySet().stream().map(name -> { + return new PieItem(name, collect.get(name).size()); + }).toList()); + }), + CompletableFutureUtil.runSyncObject(() -> { + // 抚慰人数 + result.setComfortPersonNumber(rpcApplyService.count(beginTime, finalEndTime, RpcApplyTypeEnum.COMFORT.getValue())); + }), + CompletableFutureUtil.runSyncObject(() -> { + // 抚慰金额(万元) + result.setComfortMoney(dataRightsComfortService.countComfortMoney(beginTime, finalEndTime)); + }), + CompletableFutureUtil.runSyncObject(() -> { + // 抚慰金额情况 - 分县市局 + result.setCountyComfortMoneyBarList(rpcApplyMapper.selectComfortMoneyBarList(beginTime, finalEndTime, 3)); + }), + CompletableFutureUtil.runSyncObject(() -> { + // 抚慰金额情况 - 局属单位 + result.setBureauComfortMoneyBarList(rpcApplyMapper.selectComfortMoneyBarList(beginTime, finalEndTime, 4)); + }), + CompletableFutureUtil.runSyncObject(() -> { + // 民辅警受伤情况 + result.setComfortPoliceInjurySituation(rpcApplyMapper.selectComfortPoliceInjurySituation(beginTime, finalEndTime)); + }), + CompletableFutureUtil.runSyncObject(() -> { + // 民辅警受伤类别 + result.setComfortInjuryCategory(rpcApplyMapper.selectComfortInjuryCategory(beginTime, finalEndTime)); + }) + ).join(); + return Result.success(result); } // 抚慰情况 @@ -170,6 +136,6 @@ public class DataVRightsComfortController { .fluentPut("incidentOrgList", incidentOrgList); return Result.success(data); } - // endregion + } diff --git a/src/main/java/com/biutag/supervision/controller/datav/DataVSupervisionNotifyController.java b/src/main/java/com/biutag/supervision/controller/datav/DataVSupervisionNotifyController.java index 6c2f1a9..88fb932 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/DataVSupervisionNotifyController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DataVSupervisionNotifyController.java @@ -1,17 +1,25 @@ package com.biutag.supervision.controller.datav; import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.NumberUtil; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.biutag.supervision.constants.enums.InspectCaseEnum; +import com.biutag.supervision.constants.enums.ProblemSourcesEnum; +import com.biutag.supervision.constants.enums.ProcessingStatusEnum; import com.biutag.supervision.mapper.NegativeMapper; import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.pojo.entity.Negative; +import com.biutag.supervision.pojo.entity.NegativeBlame; import com.biutag.supervision.pojo.entity.News; import com.biutag.supervision.pojo.vo.*; +import com.biutag.supervision.service.NegativeBlameService; import com.biutag.supervision.service.NewsService; +import com.biutag.supervision.util.CompletableUtils.CompletableFutureUtil; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.cache.annotation.Cacheable; import org.springframework.format.annotation.DateTimeFormat; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -20,9 +28,9 @@ import org.springframework.web.bind.annotation.RestController; import java.util.Date; import java.util.List; +import java.util.concurrent.CompletableFuture; import static com.biutag.supervision.constants.WorkDynamicConstants.DCGZDT; -import static com.biutag.supervision.constants.WorkDynamicConstants.SJGZDT; import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.XCDC; import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.ZXDC; @@ -40,6 +48,7 @@ public class DataVSupervisionNotifyController { private final NegativeMapper negativeMapper; private final NewsService newsService; + private final NegativeBlameService negativeBlameService; // region 左边 @@ -78,14 +87,10 @@ public class DataVSupervisionNotifyController { public Result getProblemTypeRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { List wtlxList = negativeMapper.getProblemTypeRatio(beginTime, endTime); -// List wtlxList = dataSupervisionNotifyService.getProblemTypeRatio(beginTime, endTime); JSONObject data = new JSONObject().fluentPut("wtlxList", wtlxList); return Result.success(data); } - // endregion - - // region 中间 /** * 获取现场督察大屏中央总览 @@ -96,11 +101,38 @@ public class DataVSupervisionNotifyController { */ @Operation(summary = "中央总览数据") @GetMapping("/getSupervisionNotifyCount") - public Result getSupervisionNotifyCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + public Result getSupervisionNotifyCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - SupervisionNotifyOverView overview = negativeMapper.getAllSupervisionNotifyCount(beginTime, endTime); - JSONObject data = new JSONObject().fluentPut("overview", overview); - return Result.success(data); + endTime = DateUtil.endOfDay(endTime); + List negatives = negativeMapper.selectList(new LambdaQueryWrapper().between(Negative::getCrtTime, beginTime, endTime) + .in(Negative::getProblemSourcesCode, List.of(ProblemSourcesEnum.XCDC.getValue(), ProblemSourcesEnum.LMGZ.getValue(), ProblemSourcesEnum.ZXDC.getValue(), ProblemSourcesEnum.SPDC.getValue()))); + SupervisionNotifyOverView overView = new SupervisionNotifyOverView(); + + List negativeIds = negatives.stream().filter(item -> InspectCaseEnum.isItTure(item.getCheckStatus())).map(Negative::getId).toList(); + overView.setProblemNumber(negatives.size()); + overView.setCompletedNumber(negatives.stream().filter(item -> ProcessingStatusEnum.completed.name().equals(item.getProcessingStatus())).count()); + overView.setProcessingNumber(negatives.size() - overView.getCompletedNumber()); + // 办结率 + overView.setCompletedRate(overView.getProblemNumber() == 0 ? 0: NumberUtil.roundHalfEven(NumberUtil.mul(NumberUtil.div(overView.getCompletedNumber(), overView.getProblemNumber()), 100), 0).doubleValue()); + CompletableFuture.allOf( + CompletableFutureUtil.runSyncObject(() -> { + long personNumber = negativeIds.isEmpty() ? 0 : negativeBlameService.count(new LambdaQueryWrapper().in(NegativeBlame::getNegativeId, negativeIds) + .eq(NegativeBlame::getType, "personal") + .ne(NegativeBlame::getHandleResultName, "不予追责") + .isNotNull(NegativeBlame::getHandleResultName) + .ne(NegativeBlame::getHandleResultName, "")); + overView.setPersonNumber(personNumber); + }), + CompletableFutureUtil.runSyncObject(() -> { + long departNumber = negativeIds.isEmpty() ? 0 : negativeBlameService.count(new LambdaQueryWrapper().in(NegativeBlame::getNegativeId, negativeIds) + .eq(NegativeBlame::getType, "department") + .ne(NegativeBlame::getHandleResultName, "不予追责") + .isNotNull(NegativeBlame::getHandleResultName) + .ne(NegativeBlame::getHandleResultName, "")); + overView.setDepartNumber(departNumber); + }) + ).join(); + return Result.success(overView); } /** @@ -108,11 +140,10 @@ public class DataVSupervisionNotifyController { * * @param beginTime 开始时间 * @param endTime 结束时间 - * @return List */ @Operation(summary = "地图Icon数据") @GetMapping("/getSupervisionNotifyMap") - @Cacheable(cacheNames = "Supervision:Screen:SupervisionNotifyMap", key = "#beginTime.getTime()+'_'+#endTime.getTime()") + public Result getSupervisionNotifyMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { //地图数据 @@ -180,8 +211,6 @@ public class DataVSupervisionNotifyController { return Result.success(newsList); } -// endregion - } diff --git a/src/main/java/com/biutag/supervision/controller/datav/DataVVideoSuperviseController.java b/src/main/java/com/biutag/supervision/controller/datav/DataVVideoSuperviseController.java index 0ebcd6b..b78d5b2 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/DataVVideoSuperviseController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DataVVideoSuperviseController.java @@ -1,5 +1,6 @@ package com.biutag.supervision.controller.datav; +import cn.hutool.core.date.DateUtil; import com.alibaba.fastjson.JSONObject; import com.biutag.supervision.mapper.NegativeMapper; import com.biutag.supervision.mapper.WvpDeviceChannelMapper; @@ -9,7 +10,6 @@ import com.biutag.supervision.pojo.vo.EchartsVo; import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo; import com.biutag.supervision.pojo.vo.VideoSuperviseCountVo; import com.biutag.supervision.pojo.vo.VideoSuperviseMapIconVo; -import com.biutag.supervision.service.VideoSuperviseService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; @@ -38,7 +38,6 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.SPDC; @RequestMapping("datav/videoSupervise") public class DataVVideoSuperviseController { - private final VideoSuperviseService videoSuperviseService; private final NegativeMapper negativeMapper; private final WvpDeviceChannelMapper wvpDeviceChannelMapper; @@ -83,6 +82,7 @@ public class DataVVideoSuperviseController { @GetMapping("/getVideoSuperviseProblemRank") public Result getVideoSuperviseProblemRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + endTime = DateUtil.endOfDay(endTime); List fxsjVideoSuperviseProblemRankList = negativeMapper.getVideoSuperviseProblemRank(beginTime, endTime, 3); List jsdwVideoSuperviseProblemRankList = negativeMapper.getVideoSuperviseProblemRank(beginTime, endTime, 4); JSONObject data = new JSONObject(); @@ -107,7 +107,6 @@ public class DataVVideoSuperviseController { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { // 获取视频督察中央数据 VideoSuperviseCountVo overview = negativeMapper.getAllVideoSuperviseCount(beginTime, endTime); -// VideoSuperviseCountVo overview = videoSuperviseService.getAllVideoSuperviseCount(beginTime, endTime); JSONObject data = new JSONObject().fluentPut("overview", overview); return Result.success(data); } @@ -121,10 +120,8 @@ public class DataVVideoSuperviseController { */ @Operation(summary = "地图Icon数据") @GetMapping("/getVideoSuperviseMap") - @Cacheable(cacheNames = "Supervision:Screen:VideoSuperviseMap", key = "#beginTime.getTime()+'_'+#endTime.getTime()") public Result getVideoSuperviseMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - // 地图数据 List videoSuperviseMapIconVoList = Optional.ofNullable(negativeMapper.getVideoSuperviseMapIconInfo(beginTime, endTime)). orElseGet(ArrayList::new); @@ -155,8 +152,5 @@ public class DataVVideoSuperviseController { return Result.success(jsonObject); } - - // endregion - } diff --git a/src/main/java/com/biutag/supervision/controller/mobileSupervision/InspectionController.java b/src/main/java/com/biutag/supervision/controller/mobileSupervision/InspectionController.java index bb28148..0663c017 100644 --- a/src/main/java/com/biutag/supervision/controller/mobileSupervision/InspectionController.java +++ b/src/main/java/com/biutag/supervision/controller/mobileSupervision/InspectionController.java @@ -1,14 +1,28 @@ package com.biutag.supervision.controller.mobileSupervision; +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson2.JSON; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.dto.TaskInspectionDto; +import com.biutag.supervision.pojo.dto.TaskProblemDto; +import com.biutag.supervision.pojo.dto.TaskInspectionProblemQueryParam; +import com.biutag.supervision.pojo.entity.SupTaskInspection; +import com.biutag.supervision.pojo.entity.SupTaskProblem; import com.biutag.supervision.pojo.param.TaskInspectionQueryParam; +import com.biutag.supervision.pojo.vo.FileVo; +import com.biutag.supervision.pojo.vo.TaskInspectionProblemVo; import com.biutag.supervision.pojo.vo.TaskInspectionVo; +import com.biutag.supervision.service.SupTaskProblemService; import com.biutag.supervision.service.SupTaskInspectionService; import lombok.RequiredArgsConstructor; +import org.springframework.beans.BeanUtils; import org.springframework.web.bind.annotation.*; +import java.util.List; + /** * @author wxc * @date 2025/4/9 @@ -20,6 +34,8 @@ public class InspectionController { private final SupTaskInspectionService taskInspectionService; + private final SupTaskProblemService taskProblemService; + @GetMapping public Result> page(TaskInspectionQueryParam queryParam) { return Result.success(taskInspectionService.page(queryParam)); @@ -30,5 +46,40 @@ public class InspectionController { return Result.success(taskInspectionService.save(dto)); } + @GetMapping("{taskId}") + public Result get(@PathVariable Integer taskId) { + return Result.success(taskInspectionService.getById(taskId)); + } + @GetMapping("{taskId}/problem") + public Result> listProblem(@PathVariable Integer taskId, TaskInspectionProblemQueryParam queryParam) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(SupTaskProblem::getTaskId, taskId) + .orderByDesc(SupTaskProblem::getCreateTime); + Page page = taskProblemService.page(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper); + List records = page.getRecords().stream().map(item -> { + TaskInspectionProblemVo vo = new TaskInspectionProblemVo(); + BeanUtils.copyProperties(item, vo); + if (StrUtil.isNotBlank(item.getPeoples())) { + vo.setPeoples(JSON.parseArray(item.getPeoples(), TaskProblemDto.People.class)); + } + if (StrUtil.isNotBlank(item.getFiles())) { + vo.setFiles(JSON.parseArray(item.getFiles(), FileVo.class)); + } + return vo; + }).toList(); + return Result.success(new Page().setRecords(records).setTotal(page.getTotal())); + } + + @PostMapping("{taskId}/sign") + public Result sign(@PathVariable Integer taskId) { + taskInspectionService.update(new LambdaUpdateWrapper().eq(SupTaskInspection::getTaskId, taskId).set(SupTaskInspection::getHasSign, true)); + return Result.success(); + } + + @PostMapping("{taskId}/problem") + public Result addProblem(@PathVariable Integer taskId, @RequestBody TaskProblemDto dto) { + dto.setTaskId(taskId); + return Result.success(taskProblemService.save(dto)); + } } diff --git a/src/main/java/com/biutag/supervision/controller/mobileSupervision/PhotoController.java b/src/main/java/com/biutag/supervision/controller/mobileSupervision/PhotoController.java new file mode 100644 index 0000000..c91aea8 --- /dev/null +++ b/src/main/java/com/biutag/supervision/controller/mobileSupervision/PhotoController.java @@ -0,0 +1,54 @@ +package com.biutag.supervision.controller.mobileSupervision; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.biutag.supervision.common.UserContextHolder; +import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.pojo.entity.SupPhoto; +import com.biutag.supervision.pojo.model.UserAuth; +import com.biutag.supervision.pojo.vo.PhotoGroupVo; +import com.biutag.supervision.service.SupPhotoService; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.*; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.Comparator; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * @author wxc + * @date 2025/4/20 + */ +@RequestMapping("photo") +@RequiredArgsConstructor +@RestController +public class PhotoController { + + private final SupPhotoService photoService; + + @GetMapping + public Result> list() { + UserAuth user = UserContextHolder.getCurrentUser(); + List list = photoService.list(new LambdaQueryWrapper().eq(SupPhoto::getCreateUsername, user.getUserName()).orderByDesc(SupPhoto::getCreateTime)); + Map> collect = list.stream().collect(Collectors.groupingBy(SupPhoto::getDate)); + List result = collect.keySet().stream().sorted(Comparator.reverseOrder()).map(date -> { + PhotoGroupVo vo = new PhotoGroupVo(); + vo.setDate(date); + vo.setPhotos(collect.get(date)); + return vo; + }).toList(); + return Result.success(result); + } + + @PostMapping + public Result add(@RequestBody SupPhoto photo) { + photo.setCreateTime(LocalDateTime.now()); + photo.setDate(LocalDate.now().toString()); + UserAuth user = UserContextHolder.getCurrentUser(); + photo.setCreateUsername(user.getUserName()); + return Result.success(photoService.save(photo)); + } + +} diff --git a/src/main/java/com/biutag/supervision/controller/mobileSupervision/SelfexaminationController.java b/src/main/java/com/biutag/supervision/controller/mobileSupervision/SelfexaminationController.java new file mode 100644 index 0000000..f5cee94 --- /dev/null +++ b/src/main/java/com/biutag/supervision/controller/mobileSupervision/SelfexaminationController.java @@ -0,0 +1,47 @@ +package com.biutag.supervision.controller.mobileSupervision; + +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.pojo.dto.TaskSelfexaminationDto; +import com.biutag.supervision.pojo.entity.SupTaskSelfexamination; +import com.biutag.supervision.pojo.param.TaskInspectionQueryParam; +import com.biutag.supervision.pojo.vo.TaskSelfexaminationDetailVo; +import com.biutag.supervision.pojo.vo.TaskSelfexaminationVo; +import com.biutag.supervision.service.SupTaskSelfexaminationService; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.*; + +/** + * @author wxc + * @date 2025/4/30 + */ +@RequiredArgsConstructor +@RestController +@RequestMapping("task/selfexamination") +public class SelfexaminationController { + + private final SupTaskSelfexaminationService taskSelfexaminationService; + + @GetMapping + public Result> page(TaskInspectionQueryParam queryParam) { + return Result.success(taskSelfexaminationService.page(queryParam)); + } + + @GetMapping("{taskId}") + public Result get(@PathVariable Integer taskId) { + return Result.success(taskSelfexaminationService.get(taskId)); + } + + @PostMapping + public Result add(@RequestBody TaskSelfexaminationDto dto) { + return Result.success(taskSelfexaminationService.save(dto)); + } + + @PostMapping("{taskId}/sign") + public Result sign(@PathVariable Integer taskId) { + taskSelfexaminationService.update(new LambdaUpdateWrapper().eq(SupTaskSelfexamination::getTaskId, taskId).set(SupTaskSelfexamination::getHasSign, true)); + return Result.success(); + } + +} diff --git a/src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskController.java b/src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskController.java new file mode 100644 index 0000000..392f097 --- /dev/null +++ b/src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskController.java @@ -0,0 +1,43 @@ +package com.biutag.supervision.controller.mobileSupervision; + +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.biutag.supervision.constants.enums.TaskStatusEnum; +import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.pojo.entity.SupTask; +import com.biutag.supervision.pojo.vo.TaskCountVo; +import com.biutag.supervision.pojo.vo.TaskVo; +import com.biutag.supervision.pojo.param.TaskQueryParam; +import com.biutag.supervision.service.SupTaskService; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.*; + +/** + * @author wxc + * @date 2025/4/11 + */ +@RequiredArgsConstructor +@RequestMapping("task") +@RestController +public class TaskController { + + + private final SupTaskService taskService; + + @GetMapping + public Result> myTodo(TaskQueryParam queryParam) { + return Result.success(taskService.pageTask(queryParam)); + } + + @GetMapping("count") + public Result count() { + return Result.success(taskService.getTaskCount()); + } + + @PostMapping("{taskId}/submit") + public Result submit(@PathVariable String taskId) { + taskService.update(new LambdaUpdateWrapper().eq(SupTask::getId, taskId).set(SupTask::getTaskStatus, TaskStatusEnum.done.name())); + return Result.success(); + } + +} diff --git a/src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskProblemController.java b/src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskProblemController.java new file mode 100644 index 0000000..0bdc6e6 --- /dev/null +++ b/src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskProblemController.java @@ -0,0 +1,40 @@ +package com.biutag.supervision.controller.mobileSupervision; + +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson2.JSON; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.pojo.entity.SupTaskPerson; +import com.biutag.supervision.pojo.entity.SupTaskProblem; +import com.biutag.supervision.pojo.param.TaskProblemQueryParam; +import com.biutag.supervision.service.SupTaskProblemService; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.stream.Collectors; + +/** + * @author wxc + * @date 2025/5/7 + */ +@RequestMapping("task/problem") +@RequiredArgsConstructor +@RestController +public class TaskProblemController { + + private final SupTaskProblemService taskProblemService; + + @GetMapping + public Result> page(TaskProblemQueryParam queryParam) { + Page page = taskProblemService.page(Page.of(queryParam.getCurrent(), queryParam.getSize())); + page.getRecords().forEach(item -> { + if (StrUtil.isNotBlank(item.getPeoples())) { + item.setPeoples(JSON.parseArray(item.getPeoples(), SupTaskPerson.class).stream().map(SupTaskPerson::getName).collect(Collectors.joining("、"))); + } + }); + return Result.success(page); + } + +} diff --git a/src/main/java/com/biutag/supervision/controller/mobileSupervision/TestingAlcoholController.java b/src/main/java/com/biutag/supervision/controller/mobileSupervision/TestingAlcoholController.java index 5532a8c..a66fe23 100644 --- a/src/main/java/com/biutag/supervision/controller/mobileSupervision/TestingAlcoholController.java +++ b/src/main/java/com/biutag/supervision/controller/mobileSupervision/TestingAlcoholController.java @@ -2,17 +2,22 @@ package com.biutag.supervision.controller.mobileSupervision; import cn.hutool.core.collection.CollectionUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.biutag.supervision.constants.enums.TaskStatusEnum; import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.dto.TaskTestingAlcoholDto; +import com.biutag.supervision.pojo.dto.TaskTestingAlcoholPeopleDto; import com.biutag.supervision.pojo.dto.TestingAlcoholFilter; import com.biutag.supervision.pojo.entity.SupPolice; +import com.biutag.supervision.pojo.entity.SupTask; import com.biutag.supervision.pojo.entity.SupTaskTestingAlcoholPeople; +import com.biutag.supervision.pojo.param.TaskTestingAlcoholPeopleQueryParam; import com.biutag.supervision.pojo.param.TaskTestingAlcoholQueryParam; +import com.biutag.supervision.pojo.vo.TaskCountVo; +import com.biutag.supervision.pojo.vo.TaskTestingAlcoholPeopleVo; import com.biutag.supervision.pojo.vo.TaskTestingAlcoholVo; -import com.biutag.supervision.service.SupDepartService; -import com.biutag.supervision.service.SupPoliceService; -import com.biutag.supervision.service.SupTaskTestingAlcoholService; +import com.biutag.supervision.service.*; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; @@ -33,6 +38,8 @@ public class TestingAlcoholController { private final SupDepartService departService; + private final SupTaskTestingAlcoholPeopleService testingAlcoholPeopleService; + @GetMapping public Result> page(TaskTestingAlcoholQueryParam queryParam) { return Result.success(taskTestingAlcoholService.page(queryParam)); @@ -41,9 +48,11 @@ public class TestingAlcoholController { @GetMapping("getPersonNumber") public Result> getPersonNumber(TestingAlcoholFilter condition) { List departIds = departService.getAllNodeIds(condition.getDepartId()); - List polices = policeService.list(new LambdaQueryWrapper().in(SupPolice::getOrgId, departIds) - .in(CollectionUtil.isNotEmpty(condition.getPersonType()), SupPolice::getPersonType, condition.getPersonType()) - .in(CollectionUtil.isNotEmpty(condition.getPosition()), SupPolice::getPosition, condition.getPosition())) + List polices = policeService.list(new LambdaQueryWrapper() + .in(SupPolice::getOrgId, departIds) + .isNotNull(SupPolice::getEmpNo) + .in(CollectionUtil.isNotEmpty(condition.getPersonType()), SupPolice::getPersonType, condition.getPersonType()) + .in(CollectionUtil.isNotEmpty(condition.getPosition()), SupPolice::getPosition, condition.getPosition())) .stream().map(item -> { SupTaskTestingAlcoholPeople people = new SupTaskTestingAlcoholPeople(); people.setName(item.getName()); @@ -55,14 +64,29 @@ public class TestingAlcoholController { return Result.success(polices); } + @GetMapping("{taskId}/people") + public Result> page(@PathVariable String taskId, TaskTestingAlcoholPeopleQueryParam queryParam) { + return Result.success(testingAlcoholPeopleService.page(taskId, queryParam)); + } + + @GetMapping("{taskId}/people/count") + public Result count(@PathVariable String taskId) { + long todoCount = testingAlcoholPeopleService.count(new LambdaQueryWrapper().eq(SupTaskTestingAlcoholPeople::getTaskId, taskId).eq(SupTaskTestingAlcoholPeople::getStatus, TaskStatusEnum.todo.name())); + long doneCount = testingAlcoholPeopleService.count(new LambdaQueryWrapper().eq(SupTaskTestingAlcoholPeople::getTaskId, taskId).eq(SupTaskTestingAlcoholPeople::getStatus, TaskStatusEnum.done.name())); + return Result.success(new TaskCountVo(todoCount, doneCount)); + } + + @PutMapping("{taskId}/people") + public Result update(@PathVariable String taskId, @RequestBody TaskTestingAlcoholPeopleDto dto) { + dto.setTaskId(taskId); + return Result.success(testingAlcoholPeopleService.update(dto)); + } + @PostMapping public Result add(@RequestBody TaskTestingAlcoholDto dto) { return Result.success(taskTestingAlcoholService.save(dto)); } - @PostMapping("genPeople") - public Result> genPeople(@RequestBody TaskTestingAlcoholDto dto) { - return Result.success(); - } + } diff --git a/src/main/java/com/biutag/supervision/controller/rightsComfort/RightPersonController.java b/src/main/java/com/biutag/supervision/controller/rightsComfort/RightPersonController.java index 0a10a91..b83b870 100644 --- a/src/main/java/com/biutag/supervision/controller/rightsComfort/RightPersonController.java +++ b/src/main/java/com/biutag/supervision/controller/rightsComfort/RightPersonController.java @@ -63,7 +63,7 @@ public class RightPersonController { @PutMapping public Result update(@RequestBody RpcRightPerson rpcRightPerson) { - rpcRightPersonService.save(rpcRightPerson); + rpcRightPersonService.updateById(rpcRightPerson); return Result.success(); } diff --git a/src/main/java/com/biutag/supervision/controller/sensitiveperception/ProfileDepartController.java b/src/main/java/com/biutag/supervision/controller/sensitiveperception/ProfileDepartController.java index b43d28e..2ffa819 100644 --- a/src/main/java/com/biutag/supervision/controller/sensitiveperception/ProfileDepartController.java +++ b/src/main/java/com/biutag/supervision/controller/sensitiveperception/ProfileDepartController.java @@ -137,7 +137,7 @@ public class ProfileDepartController { profileDepart.setPoliceBarList(policeBarList); List problemTypeList = profileDepartMapper.selectProblemType(departId, beginTime, endTime); - int max = problemTypeList.stream().mapToInt(BarItem::getValue).max().getAsInt(); + int max = problemTypeList.stream().mapToInt(item -> item.getValue().intValue()).max().getAsInt(); List problemTypeRadarIndicator = problemTypeList.stream().map(item -> { ProfileDepart.RadarIndicatorItem radarIndicatorItem = new ProfileDepart.RadarIndicatorItem(); radarIndicatorItem.setMax(max); @@ -150,7 +150,7 @@ public class ProfileDepartController { List negativeProblemRelations = negativeProblemRelationService.list(new LambdaQueryWrapper().in(NegativeProblemRelation::getNegativeId, negativeIds)); Map> collect = negativeProblemRelations.stream().collect(Collectors.groupingBy(item -> item.getOneLevelContent() + " / " + item.getTwoLevelContent() + " / " + item.getThreeLevelContent())); List problemTypeBarList = collect.keySet().stream().map(key -> { - return new BarItem(key, collect.get(key).size()); + return new BarItem(key, new BigDecimal(collect.get(key).size())); }).sorted(Comparator.comparing(BarItem::getValue).reversed()).toList(); profileDepart.setProblemTypeBarList(problemTypeBarList); diff --git a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneRightsController.java b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneRightsController.java index b54cd49..69f9573 100644 --- a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneRightsController.java +++ b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneRightsController.java @@ -40,7 +40,7 @@ public class SubOneRightsController { public Result getALlComfortCount(@RequestParam Integer departId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - Integer comfortTotal = rpcApplyMapper.countSubOneComfortPersonNumber(beginTime, endTime, departId); + Long comfortTotal = rpcApplyMapper.countSubOneComfortPersonNumber(beginTime, endTime, departId); // Integer comfortTotal = dataRightsComfortService.countComfortPersonNumber(beginTime, endTime); // 抚慰人数 Integer hitTotal = dataRightsComfortService.countSubOneHitPersonNumber(beginTime, endTime, departId); // 打击处理人数 Double comfortMoney = rpcApplyMapper.countSubOneComfortMoney(beginTime, endTime, departId); diff --git a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java index babfc6a..d7f7ed4 100644 --- a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java +++ b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java @@ -113,11 +113,9 @@ public class SubOneSupervisionNotifyController { * @param departId 部门id (分县市局ID) * @param beginTime 开始时间 * @param endTime 结束时间 - * @return List */ @Operation(summary = "地图小卡片") @GetMapping("/getSubOneSupervisionMap") - @Cacheable(cacheNames = "Supervision:Screen:SubOneSupervisionMap", key = "#departId+'_'+#beginTime.getTime() + '_' +#endTime.getTime()") public Result getSubOneSupervisionMap(@RequestParam Integer departId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { diff --git a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java index 0ee7a5a..1ee82ff 100644 --- a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java +++ b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java @@ -1,5 +1,6 @@ package com.biutag.supervision.controller.subdatav; +import cn.hutool.core.date.DateUtil; import com.alibaba.fastjson.JSONObject; import com.biutag.supervision.mapper.NegativeMapper; import com.biutag.supervision.pojo.Result; @@ -78,7 +79,7 @@ public class SubOneVideoSuperviseController { public Result getSubOneAllVideoSuperviseCount(@RequestParam Integer departId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - VideoSuperviseCountVo overview = subOneVideoSuperviseService.getSubOneAllVideoSuperviseCount(beginTime, endTime, departId); + VideoSuperviseCountVo overview = subOneVideoSuperviseService.getSubOneAllVideoSuperviseCount(beginTime, DateUtil.endOfDay(endTime), departId); JSONObject data = new JSONObject().fluentPut("overview", overview); return Result.success(data); } @@ -94,7 +95,6 @@ public class SubOneVideoSuperviseController { */ @Operation(summary = "地图Icon数据") @GetMapping("/getSubOneVideoSuperviseMap") - @Cacheable(cacheNames = "Supervision:Screen:SubOneVideoSuperviseMap", key = "#departId+'_'+#beginTime.getTime() + '_' +#endTime.getTime()") public Result getSubOneVideoSuperviseMap(@RequestParam Integer departId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { diff --git a/src/main/java/com/biutag/supervision/controller/system/PoliceController.java b/src/main/java/com/biutag/supervision/controller/system/PoliceController.java index 2c42dcf..481d410 100644 --- a/src/main/java/com/biutag/supervision/controller/system/PoliceController.java +++ b/src/main/java/com/biutag/supervision/controller/system/PoliceController.java @@ -119,6 +119,7 @@ public class PoliceController { .set(SupPolice::getPoliceRole, police.getPoliceRole()) .set(SupPolice::getMobile, police.getMobile()) .set(SupPolice::getEmploymentDate, police.getEmploymentDate()) + .set(SupPolice::getAvatarUrl, police.getAvatarUrl()) .set(SupPolice::getUpdatedAt, DateUtil.format(new Date(), DatePattern.NORM_DATETIME_FORMAT)); return Result.success(policeService.update(updateWrapper)); } diff --git a/src/main/java/com/biutag/supervision/controller/system/UserController.java b/src/main/java/com/biutag/supervision/controller/system/UserController.java index bb3a1af..1774622 100644 --- a/src/main/java/com/biutag/supervision/controller/system/UserController.java +++ b/src/main/java/com/biutag/supervision/controller/system/UserController.java @@ -1,12 +1,19 @@ package com.biutag.supervision.controller.system; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.dto.UserDto; +import com.biutag.supervision.pojo.dto.UserPasswordDto; +import com.biutag.supervision.pojo.entity.BaseAccount; import com.biutag.supervision.pojo.model.UserModel; import com.biutag.supervision.pojo.param.UserQueryParam; +import com.biutag.supervision.service.BaseAccountService; import com.biutag.supervision.service.BaseUserService; import lombok.RequiredArgsConstructor; +import org.springframework.security.crypto.bcrypt.BCrypt; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.web.bind.annotation.*; @RequiredArgsConstructor @@ -16,6 +23,8 @@ public class UserController { private final BaseUserService baseUserService; + private final BaseAccountService accountService; + @GetMapping public Result> list(UserQueryParam queryParam) { Page baseUserPage = baseUserService.page(queryParam); @@ -32,4 +41,16 @@ public class UserController { return Result.success(baseUserService.update(userDto)); } + @PutMapping("password") + public Result updatePsd(@RequestBody UserPasswordDto userPasswordDto) { + BaseAccount baseAccount = accountService.getByAccount(userPasswordDto.getAccount()); + if (!BCrypt.checkpw(userPasswordDto.getPassword(), baseAccount.getPassword())) { + throw new RuntimeException("密码错误!"); + } + BCryptPasswordEncoder encoder = new BCryptPasswordEncoder(); + String passwordEncoder = encoder.encode(userPasswordDto.getNewPassword()); + accountService.update(new LambdaUpdateWrapper().eq(BaseAccount::getAccount, userPasswordDto.getAccount()).set(BaseAccount::getPassword, passwordEncoder)); + return Result.success(); + } + } diff --git a/src/main/java/com/biutag/supervision/controller/system/VideoConfigController.java b/src/main/java/com/biutag/supervision/controller/system/VideoConfigController.java index ff433f2..c1faed6 100644 --- a/src/main/java/com/biutag/supervision/controller/system/VideoConfigController.java +++ b/src/main/java/com/biutag/supervision/controller/system/VideoConfigController.java @@ -40,6 +40,7 @@ public class VideoConfigController { public Result> list(VideoConfigQueryParam queryParam) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(StrUtil.isNotBlank(queryParam.getDepartId()), VideoConfig::getDepartId, queryParam.getDepartId()) + .orderByAsc(VideoConfig::getDepartId) .orderByDesc(VideoConfig::getCreateTime); return Result.success(videoConfigService.page(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper)); } diff --git a/src/main/java/com/biutag/supervision/controller/work/NegativeController.java b/src/main/java/com/biutag/supervision/controller/work/NegativeController.java index 75548b1..8bf6b47 100644 --- a/src/main/java/com/biutag/supervision/controller/work/NegativeController.java +++ b/src/main/java/com/biutag/supervision/controller/work/NegativeController.java @@ -120,7 +120,6 @@ public class NegativeController { .set(Negative::getProblemSources, negativeDto.getProblemSources()) .set(Negative::getProblemSourcesCode, negativeDto.getProblemSourcesCode()) .set(Negative::getBusinessTypeCode, negativeDto.getBusinessTypeCode()) - .set(Negative::getBusinessTypeName, negativeDto.getBusinessTypeName()) .set(Negative::getCaseNumber, negativeDto.getCaseNumber()) .set(Negative::getInvolveProblem, JSON.toJSONString(negativeDto.getInvolveProblem())) .set(Negative::getPoliceType, negativeDto.getPoliceType()) @@ -142,6 +141,8 @@ public class NegativeController { updateWrapper.set(Negative::getInvolveProblem, null); } negativeService.update(updateWrapper); + // 更新问题来源 + negativeWorkService.update(new LambdaUpdateWrapper().set(NegativeWork::getProblemSourcesCode, negativeDto.getProblemSourcesCode()).eq(NegativeWork::getNegativeId, negativeDto.getId())); return Result.success(); } diff --git a/src/main/java/com/biutag/supervision/controller/work/NegativeImportController.java b/src/main/java/com/biutag/supervision/controller/work/NegativeImportController.java index eed44d9..7bb8830 100644 --- a/src/main/java/com/biutag/supervision/controller/work/NegativeImportController.java +++ b/src/main/java/com/biutag/supervision/controller/work/NegativeImportController.java @@ -125,10 +125,8 @@ public class NegativeImportController { BusinessTypeEnum businessTypeEnum = BusinessTypeEnum.getByLabel(item.getBusinessTypeName()); if (businessTypeEnum != null) { negativeDto.setBusinessTypeCode(businessTypeEnum.getValue()); - negativeDto.setBusinessTypeName(businessTypeEnum.getLabel()); } else { negativeDto.setBusinessTypeCode(BusinessTypeEnum.QT.getValue()); - negativeDto.setBusinessTypeName(BusinessTypeEnum.QT.getLabel()); } ProblemSourcesEnum problemSourcesEnum = ProblemSourcesEnum.getByLabel(item.getProblemSources()); if (problemSourcesEnum != null) { diff --git a/src/main/java/com/biutag/supervision/controller/work/NegativeTaskController.java b/src/main/java/com/biutag/supervision/controller/work/NegativeTaskController.java index 4631ca2..ffd0731 100644 --- a/src/main/java/com/biutag/supervision/controller/work/NegativeTaskController.java +++ b/src/main/java/com/biutag/supervision/controller/work/NegativeTaskController.java @@ -1,6 +1,5 @@ package com.biutag.supervision.controller.work; -import cn.hutool.core.date.DateUtil; import cn.hutool.core.io.FileUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.excel.EasyExcel; diff --git a/src/main/java/com/biutag/supervision/job/DepartJob.java b/src/main/java/com/biutag/supervision/job/DepartJob.java index 170ffdf..067ff37 100644 --- a/src/main/java/com/biutag/supervision/job/DepartJob.java +++ b/src/main/java/com/biutag/supervision/job/DepartJob.java @@ -40,17 +40,6 @@ public class DepartJob { private final NegativeService negativeService; - @Async - public void updateDepartPath() { - List departs = departService.list(); - departs.forEach(item -> { - String pathTrace = departService.getPathTrace(item); - if (!pathTrace.equals(item.getPathTrace())) { - departService.update(new LambdaUpdateWrapper().eq(SupDepart::getId, item.getId()).set(SupDepart::getPathTrace, pathTrace)); - } - }); - - } /** * 每天更新一次 diff --git a/src/main/java/com/biutag/supervision/job/Job.java b/src/main/java/com/biutag/supervision/job/Job.java index 52f3682..37a1b04 100644 --- a/src/main/java/com/biutag/supervision/job/Job.java +++ b/src/main/java/com/biutag/supervision/job/Job.java @@ -1,26 +1,15 @@ package com.biutag.supervision.job; -import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.NumberUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; -import com.biutag.supervision.constants.enums.BusinessTypeEnum; -import com.biutag.supervision.constants.enums.InspectCaseEnum; -import com.biutag.supervision.constants.enums.ProblemSourcesEnum; import com.biutag.supervision.constants.enums.ProcessingStatusEnum; -import com.biutag.supervision.mapper.MailBlameMapper; -import com.biutag.supervision.mapper.MailMapper; import com.biutag.supervision.pojo.entity.Negative; -import com.biutag.supervision.pojo.entity.NegativeBlame; import com.biutag.supervision.pojo.entity.SupDepart; -import com.biutag.supervision.pojo.entity.SupPolice; -import com.biutag.supervision.pojo.entity.mailbox.Mail; -import com.biutag.supervision.pojo.entity.mailbox.MailBlame; import com.biutag.supervision.service.*; import com.biutag.supervision.util.TimeUtil; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Value; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; @@ -29,7 +18,6 @@ import java.time.ZoneId; import java.util.ArrayList; import java.util.Date; import java.util.List; -import java.util.Objects; import static com.biutag.supervision.util.TimeUtil.SECONDS_OF_A_DAY; @@ -40,45 +28,10 @@ public class Job { private final NegativeService negativeService; - private final SupDepartService departService; - private final BusinessPoliceService businessPoliceService; private final BusinessDepartService businessDepartService; - private final ModelClueService modelClueService; - - // 10分钟 - // 更新流程状态 - @Scheduled(fixedRate = 600000) - public void updateNegativeProcessingStatus() { - List list = negativeService.list(new LambdaQueryWrapper().isNull(Negative::getProcessingStatus).isNotNull(Negative::getCheckStatus)); - list.forEach(item -> { - negativeService.update(new LambdaUpdateWrapper().set(Negative::getProcessingStatus, ProcessingStatusEnum.completed).eq(Negative::getId, item.getId())); - }); - } - - // 更新办理单位 - @Scheduled(fixedRate = 600000) - public void updateHandleDepart() { - List list = negativeService.list(new LambdaQueryWrapper() - .isNotNull(Negative::getInvolveDepartId) - .isNull(Negative::getHandleThreeDepartId) - .isNull(Negative::getFlowKey)); - list.forEach(item -> { - SupDepart depart = departService.getById(item.getInvolveDepartId()); - if (depart.getLevel() == 3) { - SupDepart parent = departService.getById(depart.getPid()); - negativeService.update(new LambdaUpdateWrapper() - .set(Negative::getHandleThreeDepartId, depart.getId()) - .set(Negative::getHandleThreeDepartName, depart.getShortName()) - .set(Negative::getHandleSecondDepartId, parent.getId()) - .set(Negative::getHandleSecondDepartName, parent.getShortName()) - .eq(Negative::getId, item.getId())); - } - }); - } - // 更新办理超时 @Scheduled(fixedRate = 600000) public void updateHandleTimeout() { @@ -98,7 +51,7 @@ public class Job { } // 每日04:00更新基础数据 -// @Scheduled(cron = "0 0 4 * * ?") + @Scheduled(cron = "0 0 4 * * ?") public void updateBaseData() { List happenTime = new ArrayList<>(); Date start = Date.from(LocalDateTime.now().minusDays(1).withHour(0).withMinute(0).withSecond(0).withNano(0).atZone(ZoneId.systemDefault()).toInstant()); @@ -139,7 +92,7 @@ public class Job { // 每天一次 23:30:00 //@Scheduled(cron = "0 30 23 * * ?") public void rights() { - + } diff --git a/src/main/java/com/biutag/supervision/job/ScoreJob.java b/src/main/java/com/biutag/supervision/job/ScoreJob.java deleted file mode 100644 index faab35d..0000000 --- a/src/main/java/com/biutag/supervision/job/ScoreJob.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.biutag.supervision.job; - -import com.biutag.supervision.service.*; -import lombok.RequiredArgsConstructor; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Component; - -/** - * @author wxc - * @date 2024/11/10 - */ -@RequiredArgsConstructor -@Component -public class ScoreJob { - - private final NegativeScoreService negativeScoreService; - -// @Scheduled(fixedRate = 600000) - public void updateScore() { - - } - -} diff --git a/src/main/java/com/biutag/supervision/mapper/DataCaseVerifMapper.java b/src/main/java/com/biutag/supervision/mapper/DataCaseVerifMapper.java index 8b997ff..2ada091 100644 --- a/src/main/java/com/biutag/supervision/mapper/DataCaseVerifMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/DataCaseVerifMapper.java @@ -32,7 +32,7 @@ public interface DataCaseVerifMapper extends BaseMapper { "FROM negative ng " + "INNER JOIN negative_problem_relation npr ON ng.id=npr.negativeId " + "WHERE ng.checkStatus <>3 " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.problemSourcesCode IN (17, 18, 19, 20) " + "AND businessTypeCode = #{businessId} " + "GROUP BY threeLevelContent ") diff --git a/src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java b/src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java index 29ec4a8..4d5b419 100644 --- a/src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java @@ -16,7 +16,6 @@ import java.util.List; public interface DataPetitionComplaintMapper extends BaseMapper { - Page queryPage(@Param("page") Page page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper); /** @@ -61,21 +60,19 @@ public interface DataPetitionComplaintMapper extends BaseMapper getMailRank(Date beginTime, Date endTime, Integer groupId, Integer isRepeat); @@ -88,7 +85,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper { "COUNT(DISTINCT ng.id ) AS `value` " + "FROM negative ng " + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " + - "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND sd.statistics_group_id=#{groupType} " + - "AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " + "GROUP BY sd.short_name " + "ORDER BY `value` DESC; ") List selectOrganizeProblemRank(Integer groupType, Date beginTime, Date endTime); @@ -44,7 +43,7 @@ public interface NegativeMapper extends BaseMapper { @Select("SELECT " + "businessTypeName as name, " + "count(*) value FROM negative " + - "WHERE discoveryTime BETWEEN #{beginTime} and #{endTime} " + + "WHERE crtTime BETWEEN #{beginTime} and #{endTime} " + "and checkStatus in (1, 2) " + "GROUP BY businessTypeName") List selectBusinessRate(Date beginTime, Date endTime); @@ -52,14 +51,13 @@ public interface NegativeMapper extends BaseMapper { // 中央总览 @Select("SELECT " + - "COALESCE(SUM(IF(problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30), 1, 0)), 0) AS totalPro, " + - "COALESCE(SUM(IF(problemSourcesCode IN (13,15,16), 1, 0)), 0) AS supervisionPro, " + + "count(ng.id) AS totalPro, " + + "COALESCE(SUM(IF(problemSourcesCode IN (13,14,15,16), 1, 0)), 0) AS supervisionPro, " + "COALESCE(SUM(IF(problemSourcesCode IN (17,18,19,20), 1, 0)), 0) AS caseVerificationPro, " + - "COALESCE(SUM(IF(problemSourcesCode IN (21,22,23,24,25), 1, 0)), 0) AS complaintPro, " + - "COALESCE(SUM(IF(problemSourcesCode IN (2), 1, 0)), 0) AS talkPro, " + - "COALESCE(SUM(IF(problemSourcesCode IN (27,28,29,30), 1, 0)), 0) AS auditPro " + +// "COALESCE(SUM(IF(problemSourcesCode IN (27,28,29,30), 1, 0)), 0) AS auditPro, " + + "COALESCE(SUM(IF(problemSourcesCode IN (2), 1, 0)), 0) AS talkPro " + "FROM negative ng " + - "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime}; ") + "WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime}; ") GlobalOverViewVo getAllGlobalCount(Date beginTime, Date endTime); @@ -68,7 +66,7 @@ public interface NegativeMapper extends BaseMapper { "sd.short_name AS `name`, " + "sd.id AS departId, " + "COUNT( DISTINCT ng.id ) AS totalPro, " + - "SUM( IF(problemSourcesCode IN (13,15,16), 1, 0) ) AS supervisePro, " + + "SUM( IF(problemSourcesCode IN (13,15,16, 14), 1, 0) ) AS supervisePro, " + "SUM( IF(problemSourcesCode IN (17,18,19,20), 1, 0) ) AS caseVerifyPro, " + "SUM( IF(problemSourcesCode IN (21,22,23,24,25),1, 0) ) AS mailPro, " + "SUM( IF(problemSourcesCode IN (2),1, 0) ) AS policePro, " + @@ -76,7 +74,7 @@ public interface NegativeMapper extends BaseMapper { "FROM sup_depart sd " + "LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " + "AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " + - "AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + "WHERE sd.statistics_group_id=3 " + "GROUP BY sd.short_name " + "ORDER BY totalPro DESC;") @@ -98,7 +96,7 @@ public interface NegativeMapper extends BaseMapper { "FROM negative_problem_relation npr INNER JOIN negative ng ON npr.negativeId=ng.id " + "WHERE npr.threeLevelContent is not NULL " + "AND checkStatus IN (1, 2) " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "GROUP BY npr.threeLevelContent " + "ORDER BY `value` desc " + " LIMIT 10 OFFSET 1 ") @@ -111,14 +109,14 @@ public interface NegativeMapper extends BaseMapper { @Select("SELECT " + "COUNT(DISTINCT ng.id) AS proTotal, " + - "COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " + - "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed, " + - "ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS correctionRate " + + "COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS processingNumber, " + + "COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS completedNumber, " + + "IFNULL(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS completedRate " + "FROM negative ng " + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " + "WHERE problemSourcesCode IN (13) " + "AND sd.statistics_group_id=#{groupId} " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime};") + "AND crtTime BETWEEN #{beginTime} AND #{endTime};") DayTimeSuperviseVo getSupervisionRank(Date beginTime, Date endTime, Integer groupId); @Select("SELECT " + @@ -126,48 +124,37 @@ public interface NegativeMapper extends BaseMapper { "sd.id AS departId, " + "COUNT(DISTINCT ng.id) AS denominator, " + "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS numerator, " + - "ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS rate, " + - "ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS `value` " + + "ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS rate, " + + "ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS `value` " + "FROM negative ng " + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " + "WHERE problemSourcesCode IN (13) " + "AND sd.statistics_group_id=#{groupId} " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "GROUP BY sd.short_name " + - "ORDER BY rate desc") + "ORDER BY rate desc, denominator desc") List getChangedRateRank(Date beginTime, Date endTime, Integer groupId); @Select("SELECT npr.oneLevelContent as name, count(*) value FROM negative ng, negative_problem_relation npr " + "WHERE ng.id = npr.negativeId " + "AND ng.problemSourcesCode in (13, 15) " + "and ng.checkStatus<>3 " + - "AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND oneLevelContent is NOT NULL " + "GROUP BY oneLevelContent ") List getProblemTypeRatio(Date beginTime, Date endTime); - @Select("SELECT COUNT(DISTINCT c.id) AS problem_number, " + - "COUNT(DISTINCT IF(c.isRectifyCode = 0, c.id, 0)) - 1 AS rectifing_number, " + - "COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, 0)) - 1 AS rectifed_number, " + - "COUNT(DISTINCT c.involveDepartId) AS depart_number, " + - "COUNT(DISTINCT d.blameIdCode) AS person_number, " + - "ROUND((COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, 0)) - 1) / COUNT(DISTINCT c.id) * 100, 1) AS rectify_rate " + - "FROM sup_depart b INNER JOIN negative c ON b.id = c.involveDepartId " + - " LEFT JOIN negative_blame d ON c.id = d.negativeId " + - "WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} AND checkStatus IN ('1', '2') AND problemSourcesCode IN (13, 15)") - RankVoSupTwo getTemp(Date beginTime, Date endTime); - @Select("SELECT " + "COALESCE(COUNT(DISTINCT ng.id), 0) AS problemNumber, " + - "COALESCE(COUNT(DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL)), 0) AS rectifingNumber, " + - "COALESCE(COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)), 0) AS rectifedNumber, " + - "COALESCE(COUNT(DISTINCT ng.involveDepartId), 0) AS departNumber, " + - "COALESCE(COUNT(DISTINCT nb.blameIdCode), 0) AS personNumber, " + - "COALESCE(ROUND(COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) / COUNT(DISTINCT ng.id) * 100, 1), 0) AS rectifyRate " + + "COALESCE(COUNT(DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL)), 0) AS processingNumber, " + + "COALESCE(COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)), 0) AS completedNumber, " + + "COUNT(IF(nb.type ='department' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL)) AS departNumber, " + + "COUNT(IF(nb.type ='personal' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL)) AS personNumber, " + + "COALESCE(ROUND(COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)) / COUNT(DISTINCT ng.id) * 100, 1), 0) AS completedRate " + "FROM negative ng " + "LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " + "WHERE ng.problemSourcesCode IN (13, 15) " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; ") + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime}; ") SupervisionNotifyOverView getAllSupervisionNotifyCount(Date beginTime, Date endTime); @@ -177,15 +164,15 @@ public interface NegativeMapper extends BaseMapper { "COUNT( DISTINCT ng.id ) AS totalPro, " + "COUNT( DISTINCT IF(ng.problemSourcesCode=13, ng.id, NULL) ) AS xc, " + "COUNT( DISTINCT IF(ng.problemSourcesCode=15, ng.id, NULL) ) AS zx, " + - "COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " + - "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed , " + + "COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS processingNumber, " + + "COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS completedNumber , " + "COUNT( DISTINCT ng.involveDepartId ) AS relationOrg, " + "COUNT( DISTINCT nb.blameIdCode ) AS personNum, " + - "IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS changedRate " + + "IFNULL( ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS completedRate " + "FROM sup_depart sd " + "LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " + "AND ng.problemSourcesCode IN (13, 15)" + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "WHERE sd.statistics_group_id=3 " + "GROUP BY sd.short_name " + @@ -195,15 +182,15 @@ public interface NegativeMapper extends BaseMapper { @Select("SELECT " + "COUNT(DISTINCT ng.id) AS proTotal, " + - "COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " + - "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed, " + - "ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS correctionRate " + + "COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS processingNumber, " + + "COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS completedNumber , " + + "IFNULL( ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS completedRate " + "FROM negative ng " + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " + "WHERE problemSourcesCode IN (15) " + "AND ng.special_supervision=#{queryType} " + "AND sd.statistics_group_id=#{groupId} " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; ") + "AND crtTime BETWEEN #{beginTime} AND #{endTime}; ") DayTimeSuperviseVo getYellowBetOverview(Date beginTime, Date endTime, Integer groupId, String queryType); @Select("SELECT " + @@ -214,26 +201,25 @@ public interface NegativeMapper extends BaseMapper { "WHERE problemSourcesCode IN (15) " + "AND ng.special_supervision=#{queryType} " + "AND sd.statistics_group_id=#{groupId} " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "GROUP BY sd.short_name " + "ORDER BY `value` DESC;") List getYellowBetRankList(Date beginTime, Date endTime, Integer groupId, String queryType); -// endregion - // region 视频督察大屏 - @Select("SELECT COUNT(DISTINCT ng.id) AS discoverProblem, " + - "COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) AS changedProblem, " + - "COUNT(DISTINCT ng.involveDepartId) AS relativeOrg, " + - "COUNT(DISTINCT nb.blameName) AS relativePer, " + - "IFNULL( ROUND((COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) / COUNT(DISTINCT ng.id)) * 100, 1), 0) AS changedRate " + + @Select("SELECT " + + "COUNT(DISTINCT ng.id) total," + + "COUNT(DISTINCT IF(ng.checkStatus IN ('1','2'), ng.id, NULL)) AS discoverProblem, " + + "COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)) AS completionProblem, " + + "COUNT(IF(nb.type ='department' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL)) AS relativeOrg, " + + "COUNT(IF(nb.type ='personal' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL)) AS relativePer, " + + "IFNULL( ROUND((COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)) / COUNT(DISTINCT ng.id)) * 100, 1), 0) AS completionRate " + "FROM sup_depart sd " + "INNER JOIN negative ng ON sd.id = ng.involveDepartId " + "LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " + - "WHERE ng.checkStatus IN ('1','2') " + - "AND problemSourcesCode = 16 " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime}") + "WHERE problemSourcesCode = 16 " + + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime}") VideoSuperviseCountVo getAllVideoSuperviseCount(Date beginTime, Date endTime); @Select("SELECT npr.threeLevelContent AS `name`, " + @@ -243,19 +229,19 @@ public interface NegativeMapper extends BaseMapper { "on ng.id=npr.negativeId " + "WHERE ng.problemSourcesCode=16 " + "AND checkStatus <> 3 " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "GROUP BY npr.threeLevelContent ") List getVideoSuperviseProblemTypeRate(Date beginTime, Date endTime); - @Select("SELECT sd1.short_name AS label, " + - "count(*) as `value`" + + @Select("SELECT d.short_name AS label, " + + "count(ng.id) as `value`" + " FROM negative ng " + - "INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " + - "INNER JOIN sup_depart sd1 ON sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " + - "WHERE checkStatus <> 3 " + - "AND problemSourcesCode=16 " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + - "GROUP BY sd1.short_name " + + "INNER JOIN sup_depart d ON ng.second_involve_depart_id = d.id " + + "WHERE ng.checkStatus in (1, 2) " + + "AND ng.problemSourcesCode = 16 " + + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + + "AND d.statistics_group_id = #{groupId} " + + "GROUP BY d.short_name " + "ORDER BY `value` DESC") List getVideoSuperviseProblemRank(Date beginTime, Date endTime, Integer groupId); @@ -263,15 +249,15 @@ public interface NegativeMapper extends BaseMapper { "sd.short_name AS `name`, " + "sd.id AS departId, " + "COUNT( DISTINCT ng.id) AS discoverProblem, " + - "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changedProblem, " + + "COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS completionProblem, " + "COUNT( DISTINCT ng.involveDepartId) AS relativeOrg, " + "COUNT( DISTINCT nb.blameName ) AS relativePer, " + - "IFNULL(ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id)*100, 1 ),0) AS changedRate " + + "IFNULL(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id)*100, 1 ),0) AS completionRate " + "FROM sup_depart sd " + "LEFT JOIN negative ng ON sd.id=ng.second_involve_depart_id " + "AND checkStatus <>3 " + "AND problemSourcesCode =16 " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "WHERE sd.statistics_group_id=3 " + "GROUP BY sd.short_name; ") @@ -286,7 +272,7 @@ public interface NegativeMapper extends BaseMapper { "COUNT( DISTINCT ng.id ) AS `value` " + "FROM negative ng " + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id = sd.id " + - "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND sd.statistics_group_id=#{groupId} " + "AND ng.problemSourcesCode IN (17,18,19,20) " + "GROUP BY sd.short_name " + @@ -295,14 +281,14 @@ public interface NegativeMapper extends BaseMapper { @Select("SELECT count(DISTINCT ng.id) AS total, " + - "COUNT( DISTINCT IF(ng.checkStatus <> 3, ng.id, NULL) ) AS confirmed, " + - "COUNT( DISTINCT IF(nb.handleResultCode!=14, nb.blameId, NULL) ) AS dealCasePro, " + - "COUNT( DISTINCT nb.blameName ) AS punishPre, " + - "COUNT( DISTINCT ng.involveDepartId ) AS punishOrg, " + - "IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) / count(DISTINCT ng.id)*100, 1 ), 0 ) AS rate " + + "COUNT( DISTINCT IF(ng.checkStatus IN (1, 2), ng.id, NULL) ) AS confirmed, " + + "COUNT( DISTINCT IF(ng.checkStatus IN (1, 2), ng.id, NULL) ) AS dealCasePro, " + + "COUNT( DISTINCT IF(ng.checkStatus IN (1, 2) && nb.type = 'personal' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL) ) AS punishPre, " + + "COUNT( DISTINCT IF(ng.checkStatus IN (1, 2) && nb.type = 'department' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL) ) AS punishOrg, " + + "IFNULL( ROUND( COUNT( DISTINCT IF(ng.checkStatus IN (1, 2), ng.id, NULL) ) / count(DISTINCT ng.id)*100, 1 ), 0 ) AS rate " + "FROM negative ng " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + - "WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND problemSourcesCode in (17, 18, 19, 20) ") CaseVerificationCountVo getAllCaseVerificationCount(Date beginTime, Date endTime); @@ -319,7 +305,7 @@ public interface NegativeMapper extends BaseMapper { "FROM sup_depart sd " + "LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " + "AND ng.problemSourcesCode IN (17,18,19,20) " + - "AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "WHERE sd.statistics_group_id=3 " + "GROUP BY sd.short_name;") @@ -329,7 +315,7 @@ public interface NegativeMapper extends BaseMapper { "FROM negative ng " + "INNER JOIN negative_blame nb ON nb.negativeId=ng.id " + "WHERE handleResultName is NOT NULL " + - "AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.problemSourcesCode in (17, 18, 19, 20) " + "AND ng.checkStatus <>3 " + "GROUP BY nb.handleResultName") @@ -339,20 +325,11 @@ public interface NegativeMapper extends BaseMapper { "count(DISTINCT(ng.id)) as `value` FROM negative ng " + "INNER JOIN negative_blame nb ON nb.negativeId=ng.id AND nb.superviseMeasuresCode=#{type} " + "INNER JOIN negative_problem_relation npr ON ng.id=npr.negativeId " + - "WHERE ng.checkStatus<>3 " + - "AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "WHERE ng.checkStatus in (1, 2) " + + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + "GROUP BY npr.threeLevelContent") List getConfinementAndPause(Date beginTime, Date endTime, Integer type); - @Select("SELECT count(DISTINCT ng.id) AS totalMail, " + - "COUNT( ng.problemSourcesCode=21 ) AS countryMail, " + - "COUNT( ng.problemSourcesCode=22 ) AS policeMail, " + - "COUNT( ng.problemSourcesCode=24 ) AS numberMail, " + - "COUNT( ng.problemSourcesCode=23 ) AS manageMail " + - "FROM negative ng WHERE ng.checkStatus <> 3 " + - "AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + - "AND ng.problemSourcesCode in(21, 22, 23, 24)") - MailOverviewVo getAllMailCount(Date beginTime, Date endTime); List getMailTrend(Integer year, Integer type); @@ -368,7 +345,7 @@ public interface NegativeMapper extends BaseMapper { "COUNT(DISTINCT ng.id ) AS `value` " + "FROM negative ng " + "LEFT JOIN sup_depart sd ON ng.three_involve_depart_id=sd.id " + - "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND sd.statistics_group_id=10 " + "AND sd.pid=#{departId} " + "AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " + @@ -381,7 +358,7 @@ public interface NegativeMapper extends BaseMapper { "COUNT(DISTINCT ng.id ) AS `value` " + "FROM negative ng " + "LEFT JOIN sup_depart sd ON ng.three_involve_depart_id=sd.id " + - "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND sd.statistics_group_id!=10 " + "AND sd.pid=#{departId} " + "AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " + @@ -394,7 +371,7 @@ public interface NegativeMapper extends BaseMapper { "count(*) value " + "FROM negative " + "WHERE checkStatus in (1, 2) " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND negative.second_involve_depart_id=#{departId} " + "GROUP BY businessTypeName") List selectSubOneBusinessRate(Integer departId, Date beginTime, Date endTime); @@ -406,7 +383,7 @@ public interface NegativeMapper extends BaseMapper { "COALESCE(SUM(IF(problemSourcesCode IN (21, 22, 23, 24, 25), 1, 0)), 0) AS complaintPro, " + "COALESCE(SUM(IF(problemSourcesCode IN (2), 1, 0)), 0) AS talkPro, " + "COALESCE(SUM(IF(problemSourcesCode IN (27, 28, 29, 30), 1, 0)), 0) AS auditPro " + - "FROM negative ng WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "FROM negative ng WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.second_involve_depart_id=#{departId} ") GlobalOverViewVo getSuoOneAllGlobalCount(Integer departId, Date beginTime, Date endTime); @Select("SELECT " + @@ -422,7 +399,7 @@ public interface NegativeMapper extends BaseMapper { "SUM( IF(problemSourcesCode IN (27,28,29,30),1, 0) ) AS reviewPro " + "FROM county_street_dept csd " + "LEFT JOIN negative ng ON ng.three_involve_depart_id=csd.dept_id " + - "AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.second_involve_depart_id=#{departId} " + "GROUP BY csd.dept_name " + "HAVING csd.dept_pid=#{departId} ") @@ -435,7 +412,7 @@ public interface NegativeMapper extends BaseMapper { "FROM negative_problem_relation npr INNER JOIN negative ng ON npr.negativeId=ng.id " + "WHERE npr.threeLevelContent is not NULL " + "AND checkStatus IN (1, 2) " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime}" + + "AND crtTime BETWEEN #{beginTime} AND #{endTime}" + "AND ng.second_involve_depart_id=#{departId} " + "GROUP BY npr.threeLevelContent " + "ORDER BY `value` desc " + @@ -448,138 +425,13 @@ public interface NegativeMapper extends BaseMapper { "FROM negative_problem_relation npr " + "LEFT JOIN negative ng ON ng.id=npr.negativeId " + "WHERE checkStatus in (1,2) " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND npr.oneLevelContent is not NULL " + "AND ng.second_involve_depart_id=#{departId} " + "GROUP BY npr.oneLevelContent " + "ORDER BY `value` desc") List selectSubOneProblemRate(Integer departId, Date beginTime, Date endTime); - @Select("SELECT " + - "COUNT( DISTINCT ng.id ) AS one, " + - "COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL ) ) AS two, " + - "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL ) ) AS three, " + - "IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL ) ) / COUNT( DISTINCT ng.id ) , 1 )*100, 0) AS four " + - "FROM negative ng " + - "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + - "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + - "AND ng.problemSourcesCode IN (13,15,16) " + - "AND ng.second_involve_depart_id = #{departId} " + - "AND sd.statistics_group_id=10 ") - SubOneOverViewVo getSubOneGlobalPoliceSupervisionRankOverView(Integer departId, Date beginTime, Date endTime); - - @Select("SELECT " + - "COUNT( DISTINCT ng.id ) AS one, " + - "COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL ) ) AS two, " + - "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL ) ) AS three, " + - "IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL ) ) / COUNT( DISTINCT ng.id ) , 1 )*100, 0) AS four " + - "FROM negative ng " + - "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + - "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + - "AND ng.problemSourcesCode IN (13,15,16) " + - "AND ng.second_involve_depart_id = #{departId} " + - "AND sd.statistics_group_id!=10") - SubOneOverViewVo getSubOneGlobalTeamSupervisionRankOverView(Integer departId, Date beginTime, Date endTime); - - @Select("SELECT " + - "ng.involveDepartName AS label, " + - "COUNT(DISTINCT ng.id) AS denominator, " + - "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL )) AS numerator, " + - "IFNULL( ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1), 0) AS rate, " + - "IFNULL( ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1), 0) AS `value` " + - "FROM negative ng " + - "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + - "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + - "AND ng.problemSourcesCode IN (13,15,16) " + - "AND ng.second_involve_depart_id = #{departPId} " + - "AND sd.statistics_group_id=10 " + - "GROUP BY ng.involveDepartName " + - "ORDER BY rate DESC, denominator DESC") - List getSubOneGlobalPrecinctSupervisionRank(Integer departPId, Date beginTime, Date endTime); - - @Select("SELECT " + - "ng.involveDepartName AS label, " + - "COUNT(DISTINCT ng.id) AS denominator, " + - "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL )) AS numerator, " + - "IFNULL( ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1), 0) AS rate, " + - "IFNULL( ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1), 0) AS `value` " + - "FROM negative ng " + - "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + - "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + - "AND ng.problemSourcesCode IN (13,15,16)" + - "AND ng.second_involve_depart_id = #{departPId} " + - "AND sd.statistics_group_id!=10 " + - "GROUP BY ng.involveDepartName " + - "ORDER BY rate DESC, denominator DESC") - List getSubOneGlobalTeamSupervisionRank(Integer departPId, Date beginTime, Date endTime); - - @Select("SELECT count(DISTINCT ng.id) AS one, " + - "COUNT( DISTINCT( if(processing_status='processing', ng.id, NULL) ) ) AS two, " + - "count(DISTINCT involveDepartId) AS three, " + - "count(DISTINCT nb.blameIdCode) AS four, " + - "ifnull(ROUND( COUNT( DISTINCT( if(processing_status='completed', ng.id, NULL) ) ) / count(DISTINCT ng.id)*100, 1),0) AS five " + - "FROM negative ng " + - "INNER JOIN sup_depart sd ON ng.involveDepartId = sd.id " + - "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + - "WHERE sd.pid= #{departPId} " + - "AND ng.discoveryTime BETWEEN #{beginTime} and #{endTime} ") - SubOneOverViewVo getSubOneOverView(Integer departPId, Date beginTime, Date endTime); - - @Select("SELECT " + - "COUNT( DISTINCT ng.id ) AS one," + - "COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) AS two," + - "ifnull(ROUND( COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) / COUNT( DISTINCT ng.id ) , 1 ) ,0) AS three " + - "FROM negative ng " + - "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + - "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + - "AND ng.problemSourcesCode IN (17,18,19,20)" + - "AND ng.second_involve_depart_id = #{departPId} " + - "AND sd.statistics_group_id=10") - SubOneOverViewVo getGlobalPoliceCaseVerifyOverView(Integer departPId, Date beginTime, Date endTime); - - @Select("SELECT " + - "COUNT( DISTINCT ng.id ) AS one," + - "COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) AS two," + - "ifnull(ROUND( COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) / COUNT( DISTINCT ng.id ) , 1 ) ,0) AS three " + - "FROM negative ng " + - "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + - "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + - "AND ng.problemSourcesCode IN (17,18,19,20)" + - "AND ng.second_involve_depart_id = #{departPId} " + - "AND sd.statistics_group_id!=10") - SubOneOverViewVo getGlobalTeamCaseVerifyOverView(Integer departPId, Date beginTime, Date endTime); - - @Select("SELECT " + - "ng.involveDepartName AS label, " + - "COUNT( DISTINCT ng.id ) AS value," + - "COUNT( DISTINCT ng.id ) AS numerator, " + - "COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) AS denominator " + - "FROM negative ng " + - "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + - "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + - "AND ng.problemSourcesCode IN (17,18,19,20) " + - "AND ng.second_involve_depart_id = #{departPId} " + - "AND sd.statistics_group_id=10 " + - "GROUP BY ng.involveDepartName " + - "ORDER BY value DESC ") - List getGlobalPoliceCaseVerifyRank(Integer departPId, Date beginTime, Date endTime); - - @Select("SELECT " + - "ng.involveDepartName AS label, " + - "COUNT( DISTINCT ng.id ) AS value," + - "COUNT( DISTINCT ng.id ) AS numerator, " + - "COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) AS denominator " + - "FROM negative ng " + - "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + - "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + - "AND ng.problemSourcesCode IN (17,18,19,20) " + - "AND ng.second_involve_depart_id = #{departPId} " + - "AND sd.statistics_group_id!=10 " + - "GROUP BY ng.involveDepartName " + - "ORDER BY value DESC ") - List getGlobalTeamCaseVerifyRank(Integer departPId, Date beginTime, Date endTime); - - // endregion // region 二级大屏视频督察 @@ -590,7 +442,7 @@ public interface NegativeMapper extends BaseMapper { "AND sd.pid=#{departId} AND sd.statistics_group_id=10 " + "WHERE checkStatus <> 3 " + "AND problemSourcesCode=16 " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "GROUP BY sd.short_name " + "ORDER BY `value` DESC ") List getSuboOneVideoSupervisePoliceProblemRank(Date beginTime, Date endTime, Integer groupId, Integer departId); @@ -602,7 +454,7 @@ public interface NegativeMapper extends BaseMapper { "AND sd.pid=#{departId} AND sd.statistics_group_id!=10 " + "WHERE checkStatus <> 3 " + "AND problemSourcesCode=16 " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "GROUP BY sd.short_name " + "ORDER BY `value` DESC ") List getSuboOneVideoSuperviseTeamProblemRank(Date beginTime, Date endTime, Integer groupId, Integer departId); @@ -610,16 +462,16 @@ public interface NegativeMapper extends BaseMapper { List getSubOneVideoSuperviseTrend(String year, String problemCode, String departId); @Select("SELECT COUNT(DISTINCT ng.id) AS discoverProblem, " + - "COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) AS changedProblem, " + + "COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)) AS completionProblem, " + "COUNT(DISTINCT ng.involveDepartId) AS relativeOrg, " + "COUNT(DISTINCT nb.blameName) AS relativePer, " + - "IFNULL( ROUND((COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) / COUNT(DISTINCT ng.id)) * 100, 1), 0) AS changedRate " + + "IFNULL( ROUND((COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)) / COUNT(DISTINCT ng.id)) * 100, 1), 0) AS completionRate " + "FROM sup_depart sd " + "INNER JOIN negative ng ON sd.id = ng.involveDepartId AND sd.pid=#{departId} " + "LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " + "WHERE ng.checkStatus IN ('1','2') " + "AND problemSourcesCode = 16 " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; ") + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime}; ") VideoSuperviseCountVo getSubOneAllVideoSuperviseCount(Date beginTime, Date endTime, Integer departId); @Select("SELECT npr.threeLevelContent AS `name`, " + @@ -630,13 +482,11 @@ public interface NegativeMapper extends BaseMapper { "on ng.id=npr.negativeId " + "WHERE ng.problemSourcesCode=16 " + "AND checkStatus <> 3 " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "GROUP BY npr.threeLevelContent ") List getSubOneVideoSuperviseProblemTypeRate(Integer departId, Date beginTime, Date endTime); - // endregion - // region 二级大屏现场督察 @Select("SELECT " + @@ -649,7 +499,7 @@ public interface NegativeMapper extends BaseMapper { "WHERE ng.problemSourcesCode IN (13) " + "AND ng.second_involve_depart_id=#{departId} " + "AND sd.statistics_group_id=10 " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} ") + "AND crtTime BETWEEN #{beginTime} AND #{endTime} ") DayTimeSuperviseVo getPoliceRankOverview(Integer departId, Date beginTime, Date endTime); @Select("SELECT " + @@ -662,7 +512,7 @@ public interface NegativeMapper extends BaseMapper { "WHERE ng.problemSourcesCode IN (13) " + "AND ng.second_involve_depart_id=#{departId} " + "AND sd.statistics_group_id!=10 " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} ") + "AND crtTime BETWEEN #{beginTime} AND #{endTime} ") DayTimeSuperviseVo getTeamRankOverview(Integer departId, Date beginTime, Date endTime); @Select("SELECT " + @@ -676,7 +526,7 @@ public interface NegativeMapper extends BaseMapper { "WHERE ng.problemSourcesCode IN (13) " + "AND ng.second_involve_depart_id=#{departId} " + "AND sd.statistics_group_id=10 " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "GROUP BY sd.short_name " + "ORDER BY value DESC;") List getPoliceChangedRankList(Integer departId, Date beginTime, Date endTime); @@ -692,21 +542,11 @@ public interface NegativeMapper extends BaseMapper { "WHERE ng.problemSourcesCode IN (13) " + "AND ng.second_involve_depart_id=#{departId} " + "AND sd.statistics_group_id!=10 " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "GROUP BY sd.short_name " + "ORDER BY value DESC;") List getTeamChangedRankList(Integer departId, Date beginTime, Date endTime); - -// @Select("SELECT count(DISTINCT(ng.id)) as proTotal, " + -// "count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed, " + -// "count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing, " + -// "COALESCE( ROUND( COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0) * 100, 1 ), 0 ) AS correctionRate FROM sup_depart sd " + -// "INNER JOIN negative ng on ng.involveDepartId=sd.id AND sd.statistics_group_id!=10 AND sd.pid=#{departId} " + -// "WHERE ng.problemSourcesCode=13 AND ng.checkStatus<>3 " + -// "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} ") -// DayTimeSuperviseVo getTeamChangedRankOverView(Integer departId, Date beginTime, Date endTime); - @Select("SELECT sd.short_name as label, " + "sd.id AS departId, " + "count( DISTINCT ng.id) AS denominator, " + @@ -718,7 +558,7 @@ public interface NegativeMapper extends BaseMapper { "LEFT JOIN negative_blame nb on ng.id=nb.negativeId " + "WHERE ng.problemSourcesCode=13 " + "AND ng.checkStatus<>3 " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "GROUP BY label " + "order by rate desc;") List getSubOnePoliceChangedRateRank(Integer departId, Date beginTime, Date endTime); @@ -734,7 +574,7 @@ public interface NegativeMapper extends BaseMapper { "LEFT JOIN negative_blame nb on ng.id=nb.negativeId " + "WHERE ng.problemSourcesCode=13 " + "AND ng.checkStatus<>3 " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "GROUP BY label " + "order by rate desc;") List getSubOneTeamChangedRateRank(Integer departId, Date beginTime, Date endTime); @@ -746,23 +586,23 @@ public interface NegativeMapper extends BaseMapper { "INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id AND sd.pid=#{departId} " + "WHERE ng.problemSourcesCode in (13, 15) " + "and ng.checkStatus<>3 " + - "AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND oneLevelContent is NOT NULL " + "GROUP BY oneLevelContent ") List getSubOneProblemTypeRatio(Integer departId, Date beginTime, Date endTime); @Select("SELECT " + "COUNT( DISTINCT ng.id ) AS problemNumber, " + - "COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS rectifingNumber, " + - "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS rectifedNumber, " + + "COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS processingNumber, " + + "COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS completedNumber , " + "COUNT( DISTINCT ng.involveDepartId ) AS departNumber, " + "COUNT( DISTINCT nb.blameIdCode ) AS personNumber, " + - "ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS rectifyRate " + + "ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id) * 100, 1) AS rectifyRate " + "FROM negative ng " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "WHERE ng.problemSourcesCode IN (13, 15) " + "AND ng.second_involve_depart_id=#{departId} " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} ") + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} ") SupervisionNotifyOverView getAllSubOneSupervisionNotifyCount(Integer departId, Date beginTime, Date endTime); @@ -770,8 +610,8 @@ public interface NegativeMapper extends BaseMapper { "LEFT JOIN " + "( " + "SELECT ng.* FROM negative ng INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id WHERE sd.pid=#{departId} AND ng.checkStatus != 3 AND ng.problemSourcesCode IN (13, 15) " + - ") AS temp ON DATE_FORMAT(temp.discoveryTime, '%m') = m.month " + - "AND YEAR(temp.discoveryTime) = #{year} " + + ") AS temp ON DATE_FORMAT(temp.crtTime, '%m') = m.month " + + "AND YEAR(temp.crtTime) = #{year} " + "GROUP by m.month_name " + "ORDER BY m.month ASC;") List getSubOneSupervisionTrend(Integer departId, String year); @@ -788,7 +628,7 @@ public interface NegativeMapper extends BaseMapper { "AND ng.special_supervision=#{specialType} " + "AND ng.second_involve_depart_id=#{departId} " + "AND sd.statistics_group_id=10 " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; ") + "AND crtTime BETWEEN #{beginTime} AND #{endTime}; ") DayTimeSuperviseVo getSubOnePoliceYellowBetOverview(Date beginTime, Date endTime, Integer departId, Integer specialType); @Select("SELECT " + @@ -802,7 +642,7 @@ public interface NegativeMapper extends BaseMapper { "AND ng.special_supervision=#{specialType} " + "AND ng.second_involve_depart_id=#{departId} " + "AND sd.statistics_group_id!=10 " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; ") + "AND crtTime BETWEEN #{beginTime} AND #{endTime}; ") DayTimeSuperviseVo getSubOneTeamYellowBetOverview(Date beginTime, Date endTime, Integer departId, Integer specialType); @Select("SELECT " + @@ -814,7 +654,7 @@ public interface NegativeMapper extends BaseMapper { "AND ng.special_supervision=#{specialType} " + "AND ng.second_involve_depart_id=#{departId} " + "AND sd.statistics_group_id=10 " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "GROUP BY sd.short_name " + "ORDER BY `value` DESC; ") List getSubOnePoliceYellowBetRankList(Date beginTime, Date endTime, Integer departId, Integer specialType); @@ -828,7 +668,7 @@ public interface NegativeMapper extends BaseMapper { "AND ng.special_supervision=#{specialType} " + "AND ng.second_involve_depart_id=#{departId} " + "AND sd.statistics_group_id!=10 " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "GROUP BY sd.short_name " + "ORDER BY `value` DESC; ") List getSubOneTeamYellowBetRankList(Date beginTime, Date endTime, Integer departId, Integer specialType); @@ -842,7 +682,7 @@ public interface NegativeMapper extends BaseMapper { "COUNT( DISTINCT ng.id ) AS `value` " + "FROM negative ng " + "LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " + - "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.problemSourcesCode IN (17, 18, 19, 20)" + "AND ng.second_involve_depart_id=#{departId} " + "AND sd.statistics_group_id=10 " + @@ -855,7 +695,7 @@ public interface NegativeMapper extends BaseMapper { "COUNT( DISTINCT ng.id ) AS `value` " + "FROM negative ng " + "LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " + - "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.problemSourcesCode IN (17, 18, 19, 20)" + "AND ng.second_involve_depart_id=#{departId} " + "AND sd.statistics_group_id!=10 " + @@ -870,7 +710,7 @@ public interface NegativeMapper extends BaseMapper { "WHERE ng.checkStatus!=3 " + "AND sd.pid = #{departId} " + "AND ng.problemSourcesCode IN (17,18,19,20) " + - "AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.businessTypeCode = #{businessType} " + "GROUP BY npr.threeLevelContent " + "ORDER BY `value` DESC ") @@ -884,7 +724,7 @@ public interface NegativeMapper extends BaseMapper { "IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) / count(DISTINCT ng.id)*100, 1 ), 0 ) AS rate " + "FROM negative ng " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + - "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.second_involve_depart_id=#{departId} " + "AND ng.problemSourcesCode in (17, 18, 19, 20); ") CaseVerificationCountVo getSuboOneAllCaseVerificationCount(Date beginTime, Date endTime, Integer departId); @@ -903,7 +743,7 @@ public interface NegativeMapper extends BaseMapper { "FROM county_street_dept csd " + "LEFT JOIN negative ng ON ng.three_involve_depart_id=csd.dept_id " + "AND ng.problemSourcesCode IN (17,18,19,20) " + - "AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.second_involve_depart_id=#{departId} " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "GROUP BY csd.dept_name " + @@ -916,7 +756,7 @@ public interface NegativeMapper extends BaseMapper { "FROM negative ng " + "LEFT JOIN sup_dict_problem_source sdps ON ng.problemSourcesCode= sdps.id " + "INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id AND sd.pid=#{departId} " + - "WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "WHERE crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.problemSourcesCode IN (17,18,19,20) " + "GROUP BY sdps.label") List getSuboOneCaseSourceRate(Date beginTime, Date endTime, Integer departId); @@ -927,7 +767,7 @@ public interface NegativeMapper extends BaseMapper { "inner JOIN sup_depart sd on ng.involveDepartId=sd.id AND sd.pid=#{departId} " + "INNER JOIN negative_blame nb ON ng.id=nb.negativeId " + "WHERE nb.handleResultName IS NOT NULL " + - "AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.problemSourcesCode IN (17,18,19,20) " + "AND ng.checkStatus <>3 " + "GROUP BY nb.handleResultName") @@ -938,7 +778,7 @@ public interface NegativeMapper extends BaseMapper { @Select("SELECT problemSources AS name, count(ng.id) AS value " + "FROM negative ng " + - "WHERE problemSourcesCode IN (17, 18, 19, 20) AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "WHERE problemSourcesCode IN (17, 18, 19, 20) AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "GROUP BY problemSources") List getCaseSourceRate(Date beginTime, Date endTime); @@ -954,7 +794,7 @@ public interface NegativeMapper extends BaseMapper { "count(*) `value` FROM negative_problem_relation npr " + "LEFT JOIN negative ng ON ng.id=npr.negativeId " + "WHERE checkStatus in (1, 2) " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND npr.oneLevelContent is not NULL " + "GROUP BY npr.oneLevelContent " + "ORDER BY `value` desc") @@ -974,7 +814,7 @@ public interface NegativeMapper extends BaseMapper { "LEFT JOIN negative ng ON csd.dept_id=ng.three_involve_depart_id " + "AND checkStatus <>3 " + "AND problemSourcesCode =16 " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "GROUP BY csd.dept_name " + "HAVING csd.dept_pid=#{departId}; ") @@ -997,7 +837,7 @@ public interface NegativeMapper extends BaseMapper { "FROM county_street_dept csd " + "LEFT JOIN negative ng ON ng.three_involve_depart_id=csd.dept_id " + "AND ng.problemSourcesCode IN (13, 15) " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.second_involve_depart_id=#{departId} " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "GROUP BY csd.dept_name " + diff --git a/src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java b/src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java index fff708e..fbcbf09 100644 --- a/src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java @@ -4,11 +4,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.biutag.supervision.pojo.dto.common.BarItem; import com.biutag.supervision.pojo.dto.common.PieItem; import com.biutag.supervision.pojo.entity.RpcApply; import com.biutag.supervision.pojo.entity.RpcInfringerResult; import com.biutag.supervision.pojo.vo.EchartsVo; -import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo; import com.biutag.supervision.pojo.vo.RpcApplyVo; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; @@ -18,39 +18,16 @@ import java.util.List; public interface RpcApplyMapper extends BaseMapper { - @Select("SELECT COUNT(a.rpc_id) FROM rpc_apply_person a LEFT JOIN rpc_apply b ON a.rpc_id = b.rpc_id " + - "WHERE b.apply_date BETWEEN #{beginTime} AND #{endTime} AND b.type = 2") - Integer countComfortPersonNumber(Date beginTime, Date endTime); - - @Select("SELECT a.tort_name FROM rpc_infringer_result a LEFT JOIN rpc_apply b ON a.rpc_id = b.rpc_id " + - "WHERE b.apply_date BETWEEN #{beginTime} AND #{endTime} AND b.type = 2") - List getHitPeople(Date beginTime, Date endTime); - @Select("SELECT COALESCE(SUM(a.provide_relief), 0.0) FROM rpc_apply_person a LEFT JOIN rpc_apply b ON a.rpc_id = b.rpc_id " + "WHERE b.apply_date BETWEEN #{beginTime} AND #{endTime} AND b.type = 2") Double countComfortMoney(Date beginTime, Date endTime); - @Select("select tort_name, defend_handle_way_name from rpc_infringer_result a LEFT JOIN rpc_apply b ON a.rpc_id = b.rpc_id " + - "WHERE b.apply_date BETWEEN #{beginTime} AND #{endTime} AND b.type = 2") - List selectPunishmentSituation(Date beginTime, Date endTime); - @Select("SELECT c.job name, COUNT(c.job) value FROM sup_police c JOIN " + "(SELECT a.emp_no FROM rpc_apply_person a LEFT JOIN rpc_apply b ON a.rpc_id = b.rpc_id " + "WHERE b.apply_date BETWEEN #{beginTime} AND #{endTime} AND b.type = 2) d on c.emp_no = d.emp_no " + "GROUP BY c.job") List selectComfortSituation(Date beginTime, Date endTime); - @Select("SELECT sd1.short_name AS label, " + - "count(*) AS VALUE " + - "FROM sup_depart sd1 inner JOIN " + - "(SELECT ra.depart_name, sd.short_name, sd.pid, ra.apply_date, ra.type FROM rpc_apply ra INNER JOIN sup_depart sd on ra.depart_id=sd.id) temp " + - "on sd1.id = temp.pid AND sd1.statistics_group_id=#{groupId} " + - "WHERE temp.apply_date BETWEEN #{beginTime} AND #{endTime} " + - "AND temp.type=1 " + - "GROUP BY sd1.short_name " + - "ORDER BY `value` DESC") - List getRightsRank(Date beginTime, Date endTime, Integer groupId); - @Select("SELECT " + "sdd.dict_label AS `name`, " + "count(*) AS `value` " + @@ -104,7 +81,7 @@ public interface RpcApplyMapper extends BaseMapper { "WHERE ra.apply_date BETWEEN #{beginTime} AND #{endTime} " + "AND sd.pid=#{departId} " + "AND ra.type=2;") - Integer countSubOneComfortPersonNumber(Date beginTime, Date endTime, Integer departId); + Long countSubOneComfortPersonNumber(Date beginTime, Date endTime, Integer departId); @Select("SELECT count(*) " + "FROM rpc_infringer_result rir " + @@ -180,5 +157,13 @@ public interface RpcApplyMapper extends BaseMapper { @Select("select max(number_index) from rpc_apply where year = #{year}") Integer selectMaxNuberIndex(Integer year); + + @Select("select d.short_name label, ROUND(sum(p.provide_relief) / 10000, 2) value from rpc_apply_person p left join rpc_apply r on p.rpc_id = r.rpc_id left join sup_depart d on r.second_depart_id = d.id where d.statistics_group_id = #{departGroupId} and r.crt_time between #{beginTime} and #{endTime} and r.type = 2 GROUP BY d.short_name order by value desc") + List selectComfortMoneyBarList(Date beginTime, Date endTime, Integer departGroupId); + + @Select("select p.person_type_name name, count(r.rpc_id) value from rpc_apply r left join rpc_apply_person p on r.rpc_id = p.rpc_id where r.crt_time between #{beginTime} and #{endTime} and r.type = 2 GROUP BY p.person_type_name") + List selectComfortPoliceInjurySituation(Date beginTime, Date endTime); + @Select("select p.injury_severity_name name, count(r.rpc_id) value from rpc_apply r left join rpc_apply_person p on r.rpc_id = p.rpc_id where r.crt_time between #{beginTime} and #{endTime} and r.type = 2 GROUP BY p.injury_severity_name") + List selectComfortInjuryCategory(Date beginTime, Date endTime); } \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/mapper/StatisticsGroupMapper.java b/src/main/java/com/biutag/supervision/mapper/StatisticsGroupMapper.java index a2a9e18..4285415 100644 --- a/src/main/java/com/biutag/supervision/mapper/StatisticsGroupMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/StatisticsGroupMapper.java @@ -27,4 +27,5 @@ public interface StatisticsGroupMapper extends BaseMapper { @Select("${newSql}") List> selectByUniqueKeys(@org.apache.ibatis.annotations.Param("newSql") String newSql); + } diff --git a/src/main/java/com/biutag/supervision/mapper/SupPhotoMapper.java b/src/main/java/com/biutag/supervision/mapper/SupPhotoMapper.java new file mode 100644 index 0000000..09e7fb9 --- /dev/null +++ b/src/main/java/com/biutag/supervision/mapper/SupPhotoMapper.java @@ -0,0 +1,8 @@ +package com.biutag.supervision.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.biutag.supervision.pojo.entity.SupPhoto; + +public interface SupPhotoMapper extends BaseMapper { + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/mapper/SupTaskMapper.java b/src/main/java/com/biutag/supervision/mapper/SupTaskMapper.java index 6109df1..bb33059 100644 --- a/src/main/java/com/biutag/supervision/mapper/SupTaskMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/SupTaskMapper.java @@ -1,8 +1,18 @@ package com.biutag.supervision.mapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.biutag.supervision.pojo.vo.TaskCountVo; +import com.biutag.supervision.pojo.vo.TaskVo; import com.biutag.supervision.pojo.entity.SupTask; +import org.apache.ibatis.annotations.Param; public interface SupTaskMapper extends BaseMapper { + Page queryTask(@Param("page") Page page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper); + + TaskCountVo queryTaskCount(@Param(Constants.WRAPPER) QueryWrapper queryWrapper); + } \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/mapper/SupTaskProblemMapper.java b/src/main/java/com/biutag/supervision/mapper/SupTaskProblemMapper.java new file mode 100644 index 0000000..2e59456 --- /dev/null +++ b/src/main/java/com/biutag/supervision/mapper/SupTaskProblemMapper.java @@ -0,0 +1,8 @@ +package com.biutag.supervision.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.biutag.supervision.pojo.entity.SupTaskProblem; + +public interface SupTaskProblemMapper extends BaseMapper { + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/mapper/SupTaskSelfexaminationContentMapper.java b/src/main/java/com/biutag/supervision/mapper/SupTaskSelfexaminationContentMapper.java new file mode 100644 index 0000000..14dba89 --- /dev/null +++ b/src/main/java/com/biutag/supervision/mapper/SupTaskSelfexaminationContentMapper.java @@ -0,0 +1,8 @@ +package com.biutag.supervision.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.biutag.supervision.pojo.entity.SupTaskSelfexaminationContent; + +public interface SupTaskSelfexaminationContentMapper extends BaseMapper { + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/mapper/SupTaskSelfexaminationMapper.java b/src/main/java/com/biutag/supervision/mapper/SupTaskSelfexaminationMapper.java new file mode 100644 index 0000000..339d197 --- /dev/null +++ b/src/main/java/com/biutag/supervision/mapper/SupTaskSelfexaminationMapper.java @@ -0,0 +1,16 @@ +package com.biutag.supervision.mapper; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.biutag.supervision.pojo.entity.SupTaskSelfexamination; +import com.biutag.supervision.pojo.entity.SupTaskTestingAlcoholPeople; +import com.biutag.supervision.pojo.vo.TaskSelfexaminationVo; +import org.apache.ibatis.annotations.Param; + +public interface SupTaskSelfexaminationMapper extends BaseMapper { + + Page queryPage(@Param("page") Page page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper); + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/mapper/SupTaskTestingAlcoholPeopleMapper.java b/src/main/java/com/biutag/supervision/mapper/SupTaskTestingAlcoholPeopleMapper.java index c1f3b9f..7b86078 100644 --- a/src/main/java/com/biutag/supervision/mapper/SupTaskTestingAlcoholPeopleMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/SupTaskTestingAlcoholPeopleMapper.java @@ -1,8 +1,16 @@ package com.biutag.supervision.mapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.biutag.supervision.pojo.entity.SupTaskTestingAlcohol; +import com.biutag.supervision.pojo.vo.TaskTestingAlcoholPeopleVo; import com.biutag.supervision.pojo.entity.SupTaskTestingAlcoholPeople; +import org.apache.ibatis.annotations.Param; public interface SupTaskTestingAlcoholPeopleMapper extends BaseMapper { + Page queryPage(@Param("page") Page page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper); + } \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/domain/AppUser.java b/src/main/java/com/biutag/supervision/pojo/domain/AppUser.java new file mode 100644 index 0000000..b405b73 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/domain/AppUser.java @@ -0,0 +1,21 @@ +package com.biutag.supervision.pojo.domain; + +import com.biutag.supervision.pojo.model.UserAuth; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; + +/** + * @author wxc + * @date 2025/4/11 + */ +@AllArgsConstructor +@Setter +@Getter +public class AppUser { + + private String token; + + private UserAuth user; + +} diff --git a/src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java b/src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java index 6762609..bc8c251 100644 --- a/src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java +++ b/src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java @@ -164,6 +164,12 @@ public class NegativeVo { // 延期天数 private Integer extensionDays; + // 最大签收时长(天) + private Integer maxSignDuration; + + // 最大办理时长(天) + private Integer maxHandleDuration; + // 最大延期时长(天) private Integer maxExtensionDuration; diff --git a/src/main/java/com/biutag/supervision/pojo/dto/FileBase64Dto.java b/src/main/java/com/biutag/supervision/pojo/dto/FileBase64Dto.java new file mode 100644 index 0000000..9a53df8 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/dto/FileBase64Dto.java @@ -0,0 +1,17 @@ +package com.biutag.supervision.pojo.dto; + +import lombok.Getter; +import lombok.Setter; + +/** + * @author wxc + * @date 2025/4/15 + */ +@Setter +@Getter +public class FileBase64Dto { + + private String originalFilename; + + private String base64; +} diff --git a/src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java b/src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java index 9438338..299f138 100644 --- a/src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java +++ b/src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java @@ -43,9 +43,6 @@ public class NegativeDto { @NotBlank(message = "业务类别不能为空", groups = {AddGroup.class, EditGroup.class}) private String businessTypeCode; - // 业务类别名称 - @NotBlank(message = "业务类别不能为空", groups = {AddGroup.class, EditGroup.class}) - private String businessTypeName; private String policeTypeName; diff --git a/src/main/java/com/biutag/supervision/pojo/dto/TaskInspectionDto.java b/src/main/java/com/biutag/supervision/pojo/dto/TaskInspectionDto.java index fa96eda..27a3228 100644 --- a/src/main/java/com/biutag/supervision/pojo/dto/TaskInspectionDto.java +++ b/src/main/java/com/biutag/supervision/pojo/dto/TaskInspectionDto.java @@ -27,6 +27,8 @@ public class TaskInspectionDto { // 督察内容 private String taskContent; + private String taskContentHtml; + private List times = new ArrayList<>(); diff --git a/src/main/java/com/biutag/supervision/pojo/dto/TaskInspectionProblemQueryParam.java b/src/main/java/com/biutag/supervision/pojo/dto/TaskInspectionProblemQueryParam.java new file mode 100644 index 0000000..d94ce71 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/dto/TaskInspectionProblemQueryParam.java @@ -0,0 +1,16 @@ +package com.biutag.supervision.pojo.dto; + +import com.biutag.supervision.pojo.param.BasePage; +import lombok.Getter; +import lombok.Setter; + +/** + * @author wxc + * @date 2025/4/17 + */ +@Setter +@Getter +public class TaskInspectionProblemQueryParam extends BasePage { + + +} diff --git a/src/main/java/com/biutag/supervision/pojo/dto/TaskProblemDto.java b/src/main/java/com/biutag/supervision/pojo/dto/TaskProblemDto.java new file mode 100644 index 0000000..56088e7 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/dto/TaskProblemDto.java @@ -0,0 +1,43 @@ +package com.biutag.supervision.pojo.dto; + +import com.biutag.supervision.pojo.vo.FileVo; +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +/** + * @author wxc + * @date 2025/4/17 + */ +@Setter +@Getter +public class TaskProblemDto { + + private Integer taskId; + + // 是否存在督察问题 + private Boolean hasProblem; + + private String departId; + + private String problemType; + + private List peoples; + + // 具体情况 + private String thingDesc; + + // 附件 + private List files; + + private Integer contentId; + + @Setter + @Getter + public static class People { + private String name; + private String empNo; + private String idCode; + } +} diff --git a/src/main/java/com/biutag/supervision/pojo/dto/TaskSelfexaminationDto.java b/src/main/java/com/biutag/supervision/pojo/dto/TaskSelfexaminationDto.java new file mode 100644 index 0000000..83cd0c7 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/dto/TaskSelfexaminationDto.java @@ -0,0 +1,39 @@ +package com.biutag.supervision.pojo.dto; + +import com.biutag.supervision.pojo.entity.SupTaskSelfexamination; +import com.biutag.supervision.pojo.entity.SupTaskSelfexaminationContent; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +/** + * @author wxc + * @date 2025/4/30 + */ +@Setter +@Getter +public class TaskSelfexaminationDto { + + private String taskName; + + // 自查单位 + private Integer supDepartId; + + // 自查类型 + private String type; + + private List times = new ArrayList<>(); + + // 任务要求 + private String requirement; + + // 任务要求 + private String requirementHtml; + + // 内容 + private List contents = new ArrayList<>(); + +} diff --git a/src/main/java/com/biutag/supervision/pojo/dto/TaskTestingAlcoholPeopleDto.java b/src/main/java/com/biutag/supervision/pojo/dto/TaskTestingAlcoholPeopleDto.java new file mode 100644 index 0000000..f60e782 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/dto/TaskTestingAlcoholPeopleDto.java @@ -0,0 +1,44 @@ +package com.biutag.supervision.pojo.dto; + +import com.biutag.supervision.pojo.vo.FileVo; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +/** + * @author wxc + * @date 2025/4/15 + */ +@Setter +@Getter +public class TaskTestingAlcoholPeopleDto { + + // 警号 + private String empNo; + + private String taskId; + + // 检测情况 + private String testingResult; + + // 饮酒结果 + private String drinkResult; + + // 酒精含量 + private Double alcoholContent; + + // 测酒时间 + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss") + private LocalDateTime testingTime; + + // 未检测情况说明 + private String unTestingDesc; + + // 检测照片 + private List testingFiles = new ArrayList<>(); + +} diff --git a/src/main/java/com/biutag/supervision/pojo/dto/UserPasswordDto.java b/src/main/java/com/biutag/supervision/pojo/dto/UserPasswordDto.java new file mode 100644 index 0000000..2b5232d --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/dto/UserPasswordDto.java @@ -0,0 +1,16 @@ +package com.biutag.supervision.pojo.dto; + +import lombok.Getter; +import lombok.Setter; + +@Setter +@Getter +public class UserPasswordDto { + + private String account; + + private String password; + + private String newPassword; + +} diff --git a/src/main/java/com/biutag/supervision/pojo/dto/common/BarItem.java b/src/main/java/com/biutag/supervision/pojo/dto/common/BarItem.java index 9256e7f..186bc2e 100644 --- a/src/main/java/com/biutag/supervision/pojo/dto/common/BarItem.java +++ b/src/main/java/com/biutag/supervision/pojo/dto/common/BarItem.java @@ -4,6 +4,8 @@ import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; +import java.math.BigDecimal; + /** * @author wxc * @date 2024/10/29 @@ -14,5 +16,5 @@ import lombok.Setter; public class BarItem { private String label; - private Integer value; + private BigDecimal value; } diff --git a/src/main/java/com/biutag/supervision/pojo/entity/DataPetition12337.java b/src/main/java/com/biutag/supervision/pojo/entity/DataPetition12337.java index be56333..dba1a87 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/DataPetition12337.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/DataPetition12337.java @@ -612,4 +612,7 @@ public class DataPetition12337 implements Serializable { @TableField(value="is_real") private Integer isReal; + + private LocalDateTime createTime; + } \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/entity/SupPhoto.java b/src/main/java/com/biutag/supervision/pojo/entity/SupPhoto.java new file mode 100644 index 0000000..7225312 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/entity/SupPhoto.java @@ -0,0 +1,38 @@ +package com.biutag.supervision.pojo.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; + +@Setter +@Getter +public class SupPhoto { + + // + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + // + @TableField("file_path") + private String filePath; + + // + @TableField("file_name") + private String fileName; + + // + @TableField("create_time") + private LocalDateTime createTime; + + // + @TableField("date") + private String date; + + // 创建用户 + private String createUsername; + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/entity/SupTask.java b/src/main/java/com/biutag/supervision/pojo/entity/SupTask.java index bac6349..6e14997 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/SupTask.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/SupTask.java @@ -22,7 +22,7 @@ public class SupTask { // 督察单位 @TableField("sup_depart_id") - private Integer supDepartId; + private String supDepartId; // 督察单位 @TableField("sup_depart_name") diff --git a/src/main/java/com/biutag/supervision/pojo/entity/SupTaskInspection.java b/src/main/java/com/biutag/supervision/pojo/entity/SupTaskInspection.java index 599a066..46ab32e 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/SupTaskInspection.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/SupTaskInspection.java @@ -21,4 +21,9 @@ public class SupTaskInspection { @TableField("task_content") private String taskContent; + private String taskContentHtml; + + + private Boolean hasSign; + } \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/entity/SupTaskProblem.java b/src/main/java/com/biutag/supervision/pojo/entity/SupTaskProblem.java new file mode 100644 index 0000000..a95bea9 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/entity/SupTaskProblem.java @@ -0,0 +1,61 @@ +package com.biutag.supervision.pojo.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; + +@Setter +@Getter +public class SupTaskProblem { + + // + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + // + @TableField("task_id") + private Integer taskId; + + // 是否存在督察问题 + @TableField("has_problem") + private Boolean hasProblem; + + // + @TableField("depart_id") + private String departId; + + private String departName; + + // + @TableField("problem_type") + private String problemType; + + private String problemTypeCode; + + // 被督察人员 json + @TableField("peoples") + private String peoples; + + private Integer peopleNumber; + + // 具体情况 + private String thingDesc; + + // 附件 + @TableField("files") + private String files; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") + @TableField("create_time") + private LocalDateTime createTime; + + private String distributionState; + + private String taskType; + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/entity/SupTaskSelfexamination.java b/src/main/java/com/biutag/supervision/pojo/entity/SupTaskSelfexamination.java new file mode 100644 index 0000000..933cbc6 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/entity/SupTaskSelfexamination.java @@ -0,0 +1,32 @@ +package com.biutag.supervision.pojo.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; + +@Setter +@Getter +public class SupTaskSelfexamination { + + // + @TableId(value = "task_id") + private Integer taskId; + + // + @TableField("type") + private String type; + + // 任务要求 + @TableField("requirement") + private String requirement; + + + private String requirementHtml; + + private Boolean hasSign; + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/entity/SupTaskSelfexaminationContent.java b/src/main/java/com/biutag/supervision/pojo/entity/SupTaskSelfexaminationContent.java new file mode 100644 index 0000000..856f33f --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/entity/SupTaskSelfexaminationContent.java @@ -0,0 +1,38 @@ +package com.biutag.supervision.pojo.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; + +@Setter +@Getter +public class SupTaskSelfexaminationContent { + + // + @TableId(type = IdType.AUTO) + private Integer id; + + // + @TableField("task_id") + private Integer taskId; + + // + @TableField("title") + private String title; + + // + @TableField("content") + private String content; + + // + @TableField("create_time") + private LocalDateTime createTime; + + private String status; + + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/entity/SupTaskTestingAlcoholPeople.java b/src/main/java/com/biutag/supervision/pojo/entity/SupTaskTestingAlcoholPeople.java index 43c32b0..b5e2d50 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/SupTaskTestingAlcoholPeople.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/SupTaskTestingAlcoholPeople.java @@ -37,10 +37,24 @@ public class SupTaskTestingAlcoholPeople { private String departId; // 状态 - @TableField("status") private String status; + // 检测情况 + private String testingResult; + + // 饮酒结果 + private String drinkResult; + + // 酒精含量 + private Double alcoholContent; + // 测酒时间 private LocalDateTime testingTime; + // 未检测情况说明 + private String unTestingDesc; + + // 检测照片 + private String testingFiles; + } \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/model/DataRightsComfortModel.java b/src/main/java/com/biutag/supervision/pojo/model/DataRightsComfortModel.java index f7b71f4..8d3b8f3 100644 --- a/src/main/java/com/biutag/supervision/pojo/model/DataRightsComfortModel.java +++ b/src/main/java/com/biutag/supervision/pojo/model/DataRightsComfortModel.java @@ -1,28 +1,46 @@ package com.biutag.supervision.pojo.model; +import com.biutag.supervision.pojo.dto.common.BarItem; import com.biutag.supervision.pojo.dto.common.PieItem; import lombok.Getter; import lombok.Setter; +import java.util.ArrayList; import java.util.List; @Setter @Getter public class DataRightsComfortModel { // 维权案件总数 + private Integer rightsNumber; + // 受侵害人数 + private Integer victimNumber; + // 抚慰人数 - private Integer comfortPersonNumber; + private Long comfortPersonNumber; // 打击处理人数 Integer hitPersonNumber; // 抚慰金额(万元) Double comfortMoney; - // 维权案件情况 + // 维权案件情况 - 分县市局 +// List countyRightsBarList = new ArrayList<>(); +// // 维权案件情况 - 局属单位 +// List bureauRightsBarList = new ArrayList<>(); + + // 抚慰金额情况 - 分县市局 + List countyComfortMoneyBarList = new ArrayList<>(); + // 抚慰金额情况 - 局属单位 + List bureauComfortMoneyBarList = new ArrayList<>(); + // 案件类别占比 // 打处情况 - List punishmentSituation; - // 抚慰情况 - List comfortSituation; + List punishmentSituation = new ArrayList<>(); + // 民辅警抚慰情况占比 + List comfortPoliceTypeProportion = new ArrayList<>(); // 民辅警受伤情况 - // 发案情况占比 + List comfortPoliceInjurySituation = new ArrayList<>(); + // 民辅警受伤类别 + List comfortInjuryCategory = new ArrayList<>(); + } diff --git a/src/main/java/com/biutag/supervision/pojo/model/UserAuth.java b/src/main/java/com/biutag/supervision/pojo/model/UserAuth.java index 19d4fb0..bf6a134 100644 --- a/src/main/java/com/biutag/supervision/pojo/model/UserAuth.java +++ b/src/main/java/com/biutag/supervision/pojo/model/UserAuth.java @@ -26,12 +26,17 @@ public class UserAuth implements Serializable { private String departName; + // 职位 + private String position; + // 警号 private String empNo; // 手机号 private String mobile; + private String avatarUrl; + // 角色编号 private List roleCodes; diff --git a/src/main/java/com/biutag/supervision/pojo/param/DataPetitionComplaintQueryParam.java b/src/main/java/com/biutag/supervision/pojo/param/DataPetitionComplaintQueryParam.java index 7b9160b..f4d4738 100644 --- a/src/main/java/com/biutag/supervision/pojo/param/DataPetitionComplaintQueryParam.java +++ b/src/main/java/com/biutag/supervision/pojo/param/DataPetitionComplaintQueryParam.java @@ -1,6 +1,5 @@ package com.biutag.supervision.pojo.param; -import com.baomidou.mybatisplus.annotation.TableField; import lombok.Getter; import lombok.Setter; import org.springframework.format.annotation.DateTimeFormat; diff --git a/src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java b/src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java index ba7513e..9dd1e35 100644 --- a/src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java +++ b/src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java @@ -41,7 +41,7 @@ public class NegativeQueryParam extends BasePage { private String businessTypeCode; - private String checkStatus; + private List checkStatus; private String isRectifyCode; @@ -49,9 +49,6 @@ public class NegativeQueryParam extends BasePage { // 办结是否超时 private Boolean timeoutFlag; - // 办理中是否超时 - private Boolean handleTimeoutFlag; - private String involveDepartId; private String handleDepartId; @@ -83,5 +80,7 @@ public class NegativeQueryParam extends BasePage { private String initialPetition; + // 操作人姓名 + private String operator; } diff --git a/src/main/java/com/biutag/supervision/pojo/param/TaskInspectionQueryParam.java b/src/main/java/com/biutag/supervision/pojo/param/TaskInspectionQueryParam.java index 69a6de9..dee04ac 100644 --- a/src/main/java/com/biutag/supervision/pojo/param/TaskInspectionQueryParam.java +++ b/src/main/java/com/biutag/supervision/pojo/param/TaskInspectionQueryParam.java @@ -15,4 +15,6 @@ public class TaskInspectionQueryParam extends BasePage { private String supDepartId; + private String type; + } diff --git a/src/main/java/com/biutag/supervision/pojo/param/TaskProblemQueryParam.java b/src/main/java/com/biutag/supervision/pojo/param/TaskProblemQueryParam.java new file mode 100644 index 0000000..e3d36f0 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/param/TaskProblemQueryParam.java @@ -0,0 +1,13 @@ +package com.biutag.supervision.pojo.param; + +import lombok.Getter; +import lombok.Setter; + +/** + * @author wxc + * @date 2025/5/7 + */ +@Setter +@Getter +public class TaskProblemQueryParam extends BasePage { +} diff --git a/src/main/java/com/biutag/supervision/pojo/param/TaskQueryParam.java b/src/main/java/com/biutag/supervision/pojo/param/TaskQueryParam.java new file mode 100644 index 0000000..1acfe5b --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/param/TaskQueryParam.java @@ -0,0 +1,18 @@ +package com.biutag.supervision.pojo.param; + +import lombok.Getter; +import lombok.Setter; + +/** + * @author wxc + * @date 2025/4/11 + */ +@Setter +@Getter +public class TaskQueryParam extends BasePage { + + private String taskStatus; + + private String taskName; + +} diff --git a/src/main/java/com/biutag/supervision/pojo/param/TaskTestingAlcoholPeopleQueryParam.java b/src/main/java/com/biutag/supervision/pojo/param/TaskTestingAlcoholPeopleQueryParam.java new file mode 100644 index 0000000..61a81b9 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/param/TaskTestingAlcoholPeopleQueryParam.java @@ -0,0 +1,26 @@ +package com.biutag.supervision.pojo.param; + +import lombok.Getter; +import lombok.Setter; + +/** + * @author wxc + * @date 2025/4/7 + */ +@Setter +@Getter +public class TaskTestingAlcoholPeopleQueryParam extends BasePage { + + private String status; + + private String name; + + private String empNo; + + // 检测情况 + private String testingResult; + + // 饮酒结果 + private String drinkResult; + +} diff --git a/src/main/java/com/biutag/supervision/pojo/vo/AuditOverview.java b/src/main/java/com/biutag/supervision/pojo/vo/AuditOverview.java new file mode 100644 index 0000000..a63ff97 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/vo/AuditOverview.java @@ -0,0 +1,19 @@ +package com.biutag.supervision.pojo.vo; + +import lombok.Getter; +import lombok.Setter; + +/** + * @author wxc + * @date 2025/4/24 + */ +@Setter +@Getter +public class AuditOverview { + + // 查出问题数 + private Integer negativeNumber; + + // 追责问责数 + private Long accountableNumber; +} diff --git a/src/main/java/com/biutag/supervision/pojo/vo/ComfortCountVO.java b/src/main/java/com/biutag/supervision/pojo/vo/ComfortCountVO.java index e6b743a..2abdec2 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/ComfortCountVO.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/ComfortCountVO.java @@ -11,7 +11,7 @@ import lombok.Data; public class ComfortCountVO { private Integer comfortCaseTotal; // 维权案件总数 private Integer hurtTotal; // 受侵害人数 - private Integer comfortTotal; // 抚慰人数 + private Long comfortTotal; // 抚慰人数 private Integer hitTotal; // 打击处理人数 private Double comfortMoney; // 抚慰金额 } diff --git a/src/main/java/com/biutag/supervision/pojo/vo/DayTimeSuperviseVo.java b/src/main/java/com/biutag/supervision/pojo/vo/DayTimeSuperviseVo.java index 1ae3605..96fa05a 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/DayTimeSuperviseVo.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/DayTimeSuperviseVo.java @@ -14,8 +14,8 @@ import lombok.NoArgsConstructor; @NoArgsConstructor public class DayTimeSuperviseVo { private Integer proTotal; - private Integer changing; - private Integer changed; - private Double correctionRate; + private Long processingNumber; + private Long completedNumber; + private Double completedRate; } diff --git a/src/main/java/com/biutag/supervision/pojo/vo/FileVo.java b/src/main/java/com/biutag/supervision/pojo/vo/FileVo.java index 10b8576..8c07b50 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/FileVo.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/FileVo.java @@ -15,5 +15,4 @@ public class FileVo { private Integer fileClassId; - } diff --git a/src/main/java/com/biutag/supervision/pojo/vo/GlobalOverViewVo.java b/src/main/java/com/biutag/supervision/pojo/vo/GlobalOverViewVo.java index a0737b8..61375b6 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/GlobalOverViewVo.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/GlobalOverViewVo.java @@ -15,5 +15,7 @@ public class GlobalOverViewVo { Long talkPro; // 民意感知 Long auditPro; Long totalPro; + + private Long mailboxNumber; } diff --git a/src/main/java/com/biutag/supervision/pojo/vo/MailOverviewVo.java b/src/main/java/com/biutag/supervision/pojo/vo/MailOverviewVo.java index b05a38e..5f2fc96 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/MailOverviewVo.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/MailOverviewVo.java @@ -11,6 +11,7 @@ import java.io.Serializable; */ @Data public class MailOverviewVo implements Serializable { + // 信访总问题数 private Long totalMail; private Long countryMail; private Long policeMail; diff --git a/src/main/java/com/biutag/supervision/pojo/vo/PhotoGroupVo.java b/src/main/java/com/biutag/supervision/pojo/vo/PhotoGroupVo.java new file mode 100644 index 0000000..db78250 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/vo/PhotoGroupVo.java @@ -0,0 +1,21 @@ +package com.biutag.supervision.pojo.vo; + +import com.biutag.supervision.pojo.entity.SupPhoto; +import lombok.Getter; +import lombok.Setter; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author wxc + * @date 2025/4/20 + */ +@Setter +@Getter +public class PhotoGroupVo { + + private String date; + + private List photos = new ArrayList<>(); +} diff --git a/src/main/java/com/biutag/supervision/pojo/vo/SuperviseMapIconVo.java b/src/main/java/com/biutag/supervision/pojo/vo/SuperviseMapIconVo.java index e974fcd..e2e721b 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/SuperviseMapIconVo.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/SuperviseMapIconVo.java @@ -14,10 +14,10 @@ public class SuperviseMapIconVo implements Serializable { private String name; // 分县市局名 private String departId; private String totalPro; - private String changing; - private String changed; + private Long processingNumber; + private Long completedNumber; private String relationOrg; private String personNum; - private String changedRate; + private String completedRate; } diff --git a/src/main/java/com/biutag/supervision/pojo/vo/SupervisionNotifyOverView.java b/src/main/java/com/biutag/supervision/pojo/vo/SupervisionNotifyOverView.java index caf8364..cb154fa 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/SupervisionNotifyOverView.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/SupervisionNotifyOverView.java @@ -9,11 +9,17 @@ import lombok.Data; */ @Data public class SupervisionNotifyOverView { + // 问题数 private Integer problemNumber; - private Integer rectifingNumber; - private Integer rectifedNumber; - private Integer departNumber; - private Integer personNumber; - private Integer rectifyRate; + // 办理中 + private Long processingNumber; + // 已办结 + private Long completedNumber; + // 问责单位数 + private Long departNumber; + // 问责人数 + private Long personNumber; + // 办结率 + private Double completedRate; } diff --git a/src/main/java/com/biutag/supervision/pojo/vo/TaskCountVo.java b/src/main/java/com/biutag/supervision/pojo/vo/TaskCountVo.java new file mode 100644 index 0000000..1056a7a --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/vo/TaskCountVo.java @@ -0,0 +1,22 @@ +package com.biutag.supervision.pojo.vo; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; + +/** + * @author wxc + * @date 2025/4/12 + */ +@AllArgsConstructor +@Setter +@Getter +public class TaskCountVo { + + private Long todoCount; + + private Long doneCount; + + public TaskCountVo() { + } +} diff --git a/src/main/java/com/biutag/supervision/pojo/vo/TaskInspectionProblemVo.java b/src/main/java/com/biutag/supervision/pojo/vo/TaskInspectionProblemVo.java new file mode 100644 index 0000000..342f044 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/vo/TaskInspectionProblemVo.java @@ -0,0 +1,47 @@ +package com.biutag.supervision.pojo.vo; + +import com.biutag.supervision.pojo.dto.TaskProblemDto; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +/** + * @author wxc + * @date 2025/4/17 + */ +@Setter +@Getter +public class TaskInspectionProblemVo { + + private Integer id; + + private Integer taskId; + + // 是否存在督察问题 + private Boolean hasProblem; + + private String departId; + + private String departName; + + private String problemType; + + private String problemTypeCode; + + // 具体情况 + private String detail; + + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") + private LocalDateTime createTime; + + // 附件 + private List files = new ArrayList<>(); + + private List peoples = new ArrayList<>(); + +} diff --git a/src/main/java/com/biutag/supervision/pojo/vo/TaskInspectionVo.java b/src/main/java/com/biutag/supervision/pojo/vo/TaskInspectionVo.java index d719db8..03f2c13 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/TaskInspectionVo.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/TaskInspectionVo.java @@ -45,4 +45,10 @@ public class TaskInspectionVo { private Integer drinkNumber; + private String taskStatus; + + private Integer departNumber; + + private Integer problemNumber; + } diff --git a/src/main/java/com/biutag/supervision/pojo/vo/TaskSelfexaminationDetailVo.java b/src/main/java/com/biutag/supervision/pojo/vo/TaskSelfexaminationDetailVo.java new file mode 100644 index 0000000..afdb974 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/vo/TaskSelfexaminationDetailVo.java @@ -0,0 +1,51 @@ +package com.biutag.supervision.pojo.vo; + +import com.biutag.supervision.pojo.entity.SupTaskSelfexaminationContent; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +/** + * @author wxc + * @date 2025/5/6 + */ +@Setter +@Getter +public class TaskSelfexaminationDetailVo { + + private Integer id; + + // 任务名称 + private String taskName; + + private String supDepartId; + + // 督察单位 + private String supDepartName; + + // 开始时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") + private LocalDateTime beginTime; + + // 结束时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") + private LocalDateTime endTime; + + private String type; + + // 任务要求 + private String requirement; + + private String requirementHtml; + + private String taskStatus; + + private Boolean hasSign; + + private List contents = new ArrayList<>(); + +} diff --git a/src/main/java/com/biutag/supervision/pojo/vo/TaskSelfexaminationVo.java b/src/main/java/com/biutag/supervision/pojo/vo/TaskSelfexaminationVo.java new file mode 100644 index 0000000..98ac621 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/vo/TaskSelfexaminationVo.java @@ -0,0 +1,42 @@ +package com.biutag.supervision.pojo.vo; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; + +/** + * @author wxc + * @date 2025/5/6 + */ +@Setter +@Getter +public class TaskSelfexaminationVo { + + private Integer id; + + // 任务名称 + private String taskName; + + // 督察单位 + private String supDepartName; + + // 开始时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") + private LocalDateTime beginTime; + + // 结束时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") + private LocalDateTime endTime; + + private String type; + + // 任务要求 + private String requirement; + + private String taskStatus; + + +} diff --git a/src/main/java/com/biutag/supervision/pojo/vo/TaskTestingAlcoholPeopleVo.java b/src/main/java/com/biutag/supervision/pojo/vo/TaskTestingAlcoholPeopleVo.java new file mode 100644 index 0000000..a91cbe1 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/vo/TaskTestingAlcoholPeopleVo.java @@ -0,0 +1,60 @@ +package com.biutag.supervision.pojo.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +/** + * @author wxc + * @date 2025/4/14 + */ +@Setter +@Getter +public class TaskTestingAlcoholPeopleVo { + + private String taskId; + + private String name; + + // 警号 + private String empNo; + + // 身份证 + private String idCode; + + // 测酒状态 + private String status; + + private String departName; + + // 职位 + private String position = "/"; + + private String avatarUrl; + + // 检测情况 + private String testingResult; + + // 饮酒结果 + private String drinkResult; + + // 酒精含量 + private Double alcoholContent; + + // 测酒时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") + private LocalDateTime testingTime; + + // 未检测情况说明 + private String unTestingDesc; + + // 检测照片 + private String testingFiles; + + private List testingFileList = new ArrayList<>(); + +} diff --git a/src/main/java/com/biutag/supervision/pojo/vo/TaskVo.java b/src/main/java/com/biutag/supervision/pojo/vo/TaskVo.java new file mode 100644 index 0000000..97c09a6 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/vo/TaskVo.java @@ -0,0 +1,56 @@ +package com.biutag.supervision.pojo.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; + +/** + * @author wxc + * @date 2025/4/11 + */ +@Setter +@Getter +public class TaskVo { + + private Integer id; + + private String taskName; + + // 督察单位 + private String supDepartName; + + // 任务类型 + private String taskType; + + // 开始时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") + private LocalDateTime beginTime; + + // 结束时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") + private LocalDateTime endTime; + + // 创建时间 + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime createTime; + + // 任务状态 + private String taskStatus; + + // 督察类型 + private String supervisionType; + + private String taskContent; + + private Boolean hasSign; + + // 抽检人员 + private Integer totalNumber; + + private String requirement; + + private String type; + +} diff --git a/src/main/java/com/biutag/supervision/pojo/vo/VideoSuperviseCountVo.java b/src/main/java/com/biutag/supervision/pojo/vo/VideoSuperviseCountVo.java index 33bbb61..749eb87 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/VideoSuperviseCountVo.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/VideoSuperviseCountVo.java @@ -14,10 +14,12 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor public class VideoSuperviseCountVo { + + private Long total; private Integer discoverProblem; - private Integer changedProblem; + private Integer completionProblem; private Integer relativeOrg; private Integer relativePer; - private Double changedRate; + private Double completionRate; } diff --git a/src/main/java/com/biutag/supervision/pojo/vo/VideoSuperviseMapIconVo.java b/src/main/java/com/biutag/supervision/pojo/vo/VideoSuperviseMapIconVo.java index 585f1fc..f1b5d11 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/VideoSuperviseMapIconVo.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/VideoSuperviseMapIconVo.java @@ -16,14 +16,14 @@ import java.io.Serializable; @AllArgsConstructor @NoArgsConstructor @Builder -public class VideoSuperviseMapIconVo implements Serializable { +public class VideoSuperviseMapIconVo { private String name; private String departId; private Integer discoverProblem; - private Integer changedProblem; + private Integer completionProblem; private Integer relativeOrg; private Integer relativePer; - private Integer changedRate; + private Integer completionRate; } diff --git a/src/main/java/com/biutag/supervision/service/BusinessDepartService.java b/src/main/java/com/biutag/supervision/service/BusinessDepartService.java index d7d226d..32a6173 100644 --- a/src/main/java/com/biutag/supervision/service/BusinessDepartService.java +++ b/src/main/java/com/biutag/supervision/service/BusinessDepartService.java @@ -1,5 +1,6 @@ package com.biutag.supervision.service; +import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.StrUtil; import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -7,9 +8,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.biutag.supervision.mapper.*; -import com.biutag.supervision.pojo.entity.*; +import com.biutag.supervision.pojo.entity.BusinessDepart; +import com.biutag.supervision.pojo.entity.BusinessLog; +import com.biutag.supervision.pojo.entity.GBaseAJJBXX; +import com.biutag.supervision.pojo.entity.GBaseJJD; import com.biutag.supervision.pojo.model.BusinessPoliceModel; -import com.biutag.supervision.pojo.model.DataRightsComfortModel; import com.biutag.supervision.pojo.param.BusinessQueryParam; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -44,19 +47,18 @@ public class BusinessDepartService extends ServiceImpl page(BusinessQueryParam businessQueryParam) { // 测基础数据 if (businessQueryParam.getDepartName() != null && businessQueryParam.getDepartName().equals("开始导入今年所有的数据")) { - LocalDate start = LocalDate.parse("2024-01-01"); - LocalDate end = LocalDate.parse("2024-12-25"); + Date now = new Date(); + LocalDate start = DateUtil.beginOfYear(now).toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + LocalDate end = now.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); for (LocalDate date = start; !date.isAfter(end); date = date.plusDays(1)) { List happenTime = new ArrayList<>(); - Date startDate = Date.from(date.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); - Date endDate = Date.from(date.atTime(23, 59, 59).atZone(ZoneId.systemDefault()).toInstant()); + Date from = Date.from(date.atStartOfDay(ZoneId.systemDefault()).toInstant()); + Date startDate = DateUtil.beginOfDay(from); + Date endDate = DateUtil.endOfDay(from); happenTime.add(startDate); happenTime.add(endDate); generate(happenTime); @@ -64,8 +66,8 @@ public class BusinessDepartService extends ServiceImpl happenTime = new ArrayList<>(); - Date start = Date.from(LocalDateTime.parse("2024-09-17T00:00:00", DateTimeFormatter.ISO_DATE_TIME).atZone(ZoneId.systemDefault()).toInstant()); - Date end = Date.from(LocalDateTime.parse("2024-09-17T23:59:59", DateTimeFormatter.ISO_DATE_TIME).atZone(ZoneId.systemDefault()).toInstant()); + Date start = DateUtil.beginOfDay(new Date()); + Date end = DateUtil.endOfDay(new Date()); happenTime.add(start); happenTime.add(end); generate(happenTime); @@ -78,13 +80,6 @@ public class BusinessDepartService extends ServiceImpl countryQueryWrapper = new QueryWrapper<>(); countryQueryWrapper.eq("problem_sources_code", 21); - countryQueryWrapper.between("discovery_time", beginTime, endTime); + countryQueryWrapper.between("create_time", beginTime, endTime); Long countryMail = dataPetitionComplaintMapper.selectCount(countryQueryWrapper); // 公安部信访 QueryWrapper policeQueryWrapper = new QueryWrapper<>(); policeQueryWrapper.eq("problem_sources_code", 22); - policeQueryWrapper.between("discovery_time", beginTime, endTime); + policeQueryWrapper.between("create_time", beginTime, endTime); Long policeMail = dataPetitionComplaintMapper.selectCount(policeQueryWrapper); // 12337 - QueryWrapper queryWrapper12337 = new QueryWrapper<>(); - queryWrapper12337.between("discover_time", beginTime, endTime); - Long numberMail = dataPetition12337Mapper.selectCount(queryWrapper12337); - + long mail12337 = negativeService.count(new LambdaQueryWrapper().between(Negative::getCrtTime, beginTime, endTime).eq(Negative::getProblemSourcesCode, ProblemSourcesEnum.XF12337.getValue())); // 局长信箱 - QueryWrapper mailQueryWrapper = new QueryWrapper<>(); - mailQueryWrapper.ne("mail_state", VALID_SIGN); - mailQueryWrapper.between("create_time", beginTime, endTime); - Long manageMail = mailMapper.selectCount(mailQueryWrapper); + long mailCount = negativeService.count(new LambdaQueryWrapper().between(Negative::getCrtTime, beginTime, endTime).eq(Negative::getProblemSourcesCode, ProblemSourcesEnum.JZXX.getValue())); - // 总数 - Long totalMail = countryMail + policeMail + numberMail; temp.setCountryMail(countryMail); temp.setPoliceMail(policeMail); - temp.setNumberMail(numberMail); - temp.setTotalMail(totalMail); - temp.setManageMail(manageMail); + temp.setNumberMail(mail12337); + temp.setManageMail(mailCount); return temp; } diff --git a/src/main/java/com/biutag/supervision/service/DataPetition12337Service.java b/src/main/java/com/biutag/supervision/service/DataPetition12337Service.java index 8292c64..bcf11ec 100644 --- a/src/main/java/com/biutag/supervision/service/DataPetition12337Service.java +++ b/src/main/java/com/biutag/supervision/service/DataPetition12337Service.java @@ -119,6 +119,7 @@ public class DataPetition12337Service extends ServiceImpl hitPeople = rpcApplyMapper.getHitPeople(beginTime, endTime); - int totalPeople = 0; - if (hitPeople == null || hitPeople.isEmpty()) { - return 0; - } - for (String hitPerson : hitPeople) { - if (hitPerson.isEmpty()) { - continue; - } - if (hitPerson.contains(",")) { - String[] people = hitPerson.split(","); - totalPeople += people.length; - } else { - totalPeople += 1; - } - } - return totalPeople; - } public Double countComfortMoney(Date beginTime, Date endTime) { return rpcApplyMapper.countComfortMoney(beginTime, endTime) / 10000.0; } - public List selectPunishmentSituation(Date beginTime, Date endTime) { - List rpcInfringerResults = rpcApplyMapper.selectPunishmentSituation(beginTime, endTime); - if (rpcInfringerResults == null || rpcInfringerResults.isEmpty()) { - return new ArrayList<>(); - } - Map countMap = new HashMap<>(); - for (RpcInfringerResult rpcInfringerResult : rpcInfringerResults) { - String defendHandleWayName = rpcInfringerResult.getDefendHandleWayName(); - String tortName = rpcInfringerResult.getTortName(); - String[] names = tortName.split(","); - int count = names.length; - countMap.put(defendHandleWayName, countMap.getOrDefault(defendHandleWayName, 0) + count); - } - return countMap.entrySet().stream().map(entry -> new PieItem(entry.getKey(), entry.getValue())).collect(Collectors.toList()); - } - - public List selectComfortSituation(Date beginTime, Date endTime) { - return rpcApplyMapper.selectComfortSituation(beginTime, endTime); - } - - - - - // 维权抚慰地图图标数据 - public List getComfortMapIcon(Date beginTime, Date endTime) { - List res = new ArrayList<>(); - // 查询所有区县局 - List supDeparts = supDepartMapper.selectDepartsByGroupType(COUNTY_CITY_BUREAUS.getId()); - for (SupDepart supDepart : supDeparts) { - RightsComfortMapVo mapIconVo = new RightsComfortMapVo(); - mapIconVo.setName(supDepart.getShortName()); - mapIconVo.setDepartId(supDepart.getId()); - res.add(mapIconVo); - } - for (RightsComfortMapVo re : res) { - String departId = re.getDepartId(); - re.setTotalCase(0); - re.setHitPro(0); - re.setComfortPer(0); - re.setVictimPer(0); - re.setComfortMon(0.0); - } - return res; - } - - - // 打击处理人数 public Integer countSubOneHitPersonNumber(Date beginTime, Date endTime, Integer departId) { List hitPeople = rpcApplyMapper.getSubOneHitPeople(beginTime, endTime, departId); diff --git a/src/main/java/com/biutag/supervision/service/ModelClueService.java b/src/main/java/com/biutag/supervision/service/ModelClueService.java index 41fcb74..87f588b 100644 --- a/src/main/java/com/biutag/supervision/service/ModelClueService.java +++ b/src/main/java/com/biutag/supervision/service/ModelClueService.java @@ -168,7 +168,6 @@ public class ModelClueService extends ServiceImpl { negative.setBusinessTypeCode(model.getBusinessTypeCode()); } else { negative.setBusinessTypeCode(BusinessTypeEnum.QT.getValue()); - negative.setBusinessTypeName(BusinessTypeEnum.QT.getLabel()); } negative.setPoliceType(model.getPoliceType()); diff --git a/src/main/java/com/biutag/supervision/service/NegativeCountersignService.java b/src/main/java/com/biutag/supervision/service/NegativeCountersignService.java index 4a6dcfa..c2b9d3d 100644 --- a/src/main/java/com/biutag/supervision/service/NegativeCountersignService.java +++ b/src/main/java/com/biutag/supervision/service/NegativeCountersignService.java @@ -8,17 +8,14 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.biutag.supervision.common.UserContextHolder; import com.biutag.supervision.constants.enums.DepartLevelEnum; -import com.biutag.supervision.constants.enums.OrderEnum; -import com.biutag.supervision.constants.enums.ProcessingStatusEnum; import com.biutag.supervision.constants.enums.RoleCodeEnum; +import com.biutag.supervision.mapper.NegativeCountersignMapper; import com.biutag.supervision.pojo.entity.Negative; import com.biutag.supervision.pojo.entity.NegativeBlame; import com.biutag.supervision.pojo.entity.NegativeCountersign; -import com.biutag.supervision.mapper.NegativeCountersignMapper; import com.biutag.supervision.pojo.model.UserAuth; import com.biutag.supervision.pojo.param.NegativeQueryParam; import com.biutag.supervision.pojo.vo.DepartTree; -import com.biutag.supervision.pojo.vo.NegativeQueryVo; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -53,7 +50,6 @@ public class NegativeCountersignService extends ServiceImpl { @@ -64,7 +60,7 @@ public class NegativeCountersignService extends ServiceImpl { + query.and(q -> { + q.lt(Negative::getHandleRemainingTime, 0).ne(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name()); + }).or().gt(Negative::getHandleTimeout, 0).eq(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name()); + }); } else { queryWrapper .and(query -> { - query.ne(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name()).or().gt(Negative::getHandleTimeout, 0); + query.and(q -> { + q.ge(Negative::getHandleRemainingTime, 0).ne(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name()); + }).or().eq(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name()) + .and(q -> { + q.eq(Negative::getHandleTimeout, 0).or().isNull(Negative::getHandleTimeout); + }); }); } } diff --git a/src/main/java/com/biutag/supervision/service/NegativeService.java b/src/main/java/com/biutag/supervision/service/NegativeService.java index 05827f4..0898db8 100644 --- a/src/main/java/com/biutag/supervision/service/NegativeService.java +++ b/src/main/java/com/biutag/supervision/service/NegativeService.java @@ -173,14 +173,24 @@ public class NegativeService extends ServiceImpl { return getOne(new LambdaUpdateWrapper().eq(Negative::getOriginId, originId)); } + private final SupDictDataService dictDataService; + @Transactional(rollbackFor = Exception.class) public Negative save(NegativeDto negativeDto) { Negative negative = new Negative(); BeanUtil.copyProperties(negativeDto, negative); + if (StrUtil.isBlank(negativeDto.getOriginId())) { String originId = generateOriginId(negativeDto.getProblemSourcesCode(), negativeDto.getBusinessTypeCode()); negative.setOriginId(originId); // 如果是空就生成随机的线索源 } + + if (StrUtil.isNotBlank(negativeDto.getBusinessTypeCode())) { + SupDictData dictData = dictDataService.get("businessType", negativeDto.getBusinessTypeCode()); + // 业务类型 + negative.setBusinessTypeName(Optional.ofNullable(dictData).map(SupDictData::getDictLabel).orElse(null)); + } + // 涉及单位 SupDepart depart = departService.getById(negative.getInvolveDepartId()); if (DepartLevelEnum.SECOND.getValue().equals(depart.getLevel())) { diff --git a/src/main/java/com/biutag/supervision/service/NegativeTaskService.java b/src/main/java/com/biutag/supervision/service/NegativeTaskService.java index 39a6f7f..1f8e498 100644 --- a/src/main/java/com/biutag/supervision/service/NegativeTaskService.java +++ b/src/main/java/com/biutag/supervision/service/NegativeTaskService.java @@ -15,7 +15,6 @@ import com.biutag.supervision.common.UserContextHolder; import com.biutag.supervision.constants.enums.*; import com.biutag.supervision.mapper.NegativeTaskMapper; import com.biutag.supervision.pojo.dto.*; -import com.biutag.supervision.pojo.dto.flow.VerifyData; import com.biutag.supervision.pojo.entity.*; import com.biutag.supervision.pojo.model.ModelClueTaskDepartModel; import com.biutag.supervision.pojo.model.UserAuth; @@ -87,8 +86,6 @@ public class NegativeTaskService extends ServiceImpl data, String negativeTaskId) { List suspectProblem = dictDataService.listByDictType("suspectProblem"); @@ -112,9 +109,9 @@ public class NegativeTaskService extends ServiceImpl item.getId().equals(problem.getNegativeId()) && StrUtil.isNotBlank(problem.getOneLevelContent())).map(problem -> { if ("其他".equals(problem.getThreeLevelContent())) { - return String.format("%s / %s / %s(%s)", problem.getOneLevelContent(), problem.getTwoLevelContent(), problem.getTwoLevelContent(), problem.getThreeLevelContentOther()); + return String.format("%s / %s / %s(%s)", problem.getOneLevelContent(), problem.getTwoLevelContent(), problem.getThreeLevelContent(), problem.getThreeLevelContentOther()); } - return String.format("%s / %s / %s", problem.getOneLevelContent(), problem.getTwoLevelContent(), problem.getTwoLevelContent()); + return String.format("%s / %s / %s", problem.getOneLevelContent(), problem.getTwoLevelContent(), problem.getThreeLevelContent()); }).collect(Collectors.joining("、")); vo.setProblemTypeList(problemTypeList); // 超时情况 @@ -145,9 +142,9 @@ public class NegativeTaskService extends ServiceImpl { if ("其他".equals(problem.getThreeLevelContent())) { - return String.format("%s / %s / %s(%s)", problem.getOneLevelContent(), problem.getTwoLevelContent(), problem.getTwoLevelContent(), problem.getThreeLevelContentOther()); + return String.format("%s / %s / %s(%s)", problem.getOneLevelContent(), problem.getTwoLevelContent(), problem.getThreeLevelContent(), problem.getThreeLevelContentOther()); } - return String.format("%s / %s / %s", problem.getOneLevelContent(), problem.getTwoLevelContent(), problem.getTwoLevelContent()); + return String.format("%s / %s / %s", problem.getOneLevelContent(), problem.getTwoLevelContent(), problem.getThreeLevelContent()); }).collect(Collectors.joining("、")); blameVo.setProblemType(problemType); // 人员属性 @@ -159,14 +156,26 @@ public class NegativeTaskService extends ServiceImpl().eq(NegativeTask::getId, negativeTaskId) .set(NegativeTask::getStatus, NegativeTaskStatusEnum.SUCCESS.getValue()) diff --git a/src/main/java/com/biutag/supervision/service/NegativeWorkService.java b/src/main/java/com/biutag/supervision/service/NegativeWorkService.java index 01b9cdd..2d661ca 100644 --- a/src/main/java/com/biutag/supervision/service/NegativeWorkService.java +++ b/src/main/java/com/biutag/supervision/service/NegativeWorkService.java @@ -10,15 +10,13 @@ import com.biutag.supervision.common.UserContextHolder; import com.biutag.supervision.constants.enums.DepartLevelEnum; import com.biutag.supervision.constants.enums.ProcessingStatusEnum; import com.biutag.supervision.mapper.NegativeWorkMapper; -import com.biutag.supervision.pojo.entity.Negative; import com.biutag.supervision.pojo.entity.NegativeBlame; +import com.biutag.supervision.pojo.entity.NegativeHistory; import com.biutag.supervision.pojo.entity.NegativeWork; import com.biutag.supervision.pojo.model.NegativeWorkModel; import com.biutag.supervision.pojo.model.UserAuth; import com.biutag.supervision.pojo.param.NegativeQueryParam; -import com.biutag.supervision.pojo.param.WorkParam; import com.biutag.supervision.pojo.vo.DepartTree; -import com.biutag.supervision.pojo.vo.NegativeQueryVo; import com.biutag.supervision.util.TimeUtil; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -26,6 +24,7 @@ import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.Set; import java.util.stream.Collectors; @RequiredArgsConstructor @@ -34,6 +33,10 @@ public class NegativeWorkService extends ServiceImpl page(NegativeQueryParam param, String workStatus) { UserAuth user = UserContextHolder.getCurrentUser(); if (user.getRoleCodes().isEmpty() || user.getAuthDepartIds().isEmpty() || user.getAuthSources().isEmpty()) { @@ -52,7 +55,7 @@ public class NegativeWorkService extends ServiceImpl blameQueryWrapper = new LambdaQueryWrapper<>(); + + + boolean blameQueryFlag = false; if (StrUtil.isNotBlank(param.getBlameKey()) && StrUtil.isNotBlank(param.getBlameValue())) { switch (param.getResponderKey()) { case "name": - queryWrapper.like("nb.blameName", param.getBlameValue()); + blameQueryWrapper.like(NegativeBlame::getBlameName, param.getBlameValue()); + blameQueryFlag = true; break; case "empNo": - queryWrapper.like("nb.blameEmpNo", param.getBlameValue()); + blameQueryWrapper.like(NegativeBlame::getBlameEmpNo, param.getBlameValue()); + blameQueryFlag = true; break; case "idCode": - queryWrapper.like("nb.blameIdCode", param.getBlameValue()); + blameQueryWrapper.like(NegativeBlame::getBlameIdCode, param.getBlameValue()); + blameQueryFlag = true; break; } } + boolean handleResultCodeQueryFlag = Objects.nonNull(param.getHandleResultCode()) && !param.getHandleResultCode().isEmpty(); + blameQueryWrapper.in(handleResultCodeQueryFlag, NegativeBlame::getHandleResultCode, param.getHandleResultCode()); + if (blameQueryFlag || handleResultCodeQueryFlag) { + Set negativeIds = blameService.list(blameQueryWrapper).stream().map(NegativeBlame::getNegativeId).collect(Collectors.toSet()); + if (negativeIds.isEmpty()) { + return new Page().setTotal(0).setRecords(new ArrayList<>()); + } + queryWrapper.in("w.negative_id", negativeIds); + } + if (Objects.nonNull(param.getTimeoutFlag())) { if (param.getTimeoutFlag()) { queryWrapper.eq("n.processing_status", ProcessingStatusEnum.completed.name()).gt("n.handle_timeout", 0); @@ -126,6 +145,15 @@ public class NegativeWorkService extends ServiceImpl historyList = historyService.list(new LambdaQueryWrapper().like(NegativeHistory::getCrtName, param.getOperator())); + if (historyList.isEmpty()) { + return new Page().setTotal(0).setRecords(new ArrayList<>()); + } + Set negativeIds = historyList.stream().map(NegativeHistory::getNegativeId).collect(Collectors.toSet()); + queryWrapper.in("n.id", negativeIds); + } Page modelPage = baseMapper.queryPage(Page.of(param.getCurrent(), param.getSize()), queryWrapper); modelPage.getRecords().forEach(item -> { item.setRemainingDuration(TimeUtil.getRemainingDuration(item.getFirstDistributeTime(), item.getMaxSignDuration(), item.getMaxHandleDuration(), item.getExtensionDays(), item.getFlowKey())); diff --git a/src/main/java/com/biutag/supervision/service/ProblemSourceService.java b/src/main/java/com/biutag/supervision/service/ProblemSourceService.java index 4882b54..515434f 100644 --- a/src/main/java/com/biutag/supervision/service/ProblemSourceService.java +++ b/src/main/java/com/biutag/supervision/service/ProblemSourceService.java @@ -50,12 +50,12 @@ public class ProblemSourceService { CompletableFutureUtil.runSyncObject(() -> build.negativeTotal(negativeMapper.selectCount(new LambdaQueryWrapper() .in(Negative::getCheckStatus, List.of(1, 2)).ge(Negative::getCrtTime, LocalDateTime.parse(beginTime + "T00:00:00"))).intValue())) ).join(); - String sql = "select blameName, blameIdCode, blameDepartId from `negative_blame` where crtTime BETWEEN '" + beginTime + " 00:00:00' and '" + endTime + " 23:59:59' and blameIdCode is not null and blameDepartId is not null and length(blameIdCode) > 0 and length(blameDepartId) > 0;"; + String sql = "select blameName, blameIdCode, blameDepartId from `negative_blame` where crtTime BETWEEN '" + beginTime + " 00:00:00' and '" + endTime + " 23:59:59';"; List> maps = statisticsGroupMapper.selectByUniqueKeys(sql); - Long count = maps.stream().map(m -> m.get("blameIdCode")).distinct().count(); + Integer count = maps.size(); // List list = blameMapper.selectBlameList(); // Long count = list.stream().map(NegativeBlame::getBlameIdCode).distinct().count(); - build.peopleCount(count.intValue()); + build.peopleCount(count); ProblemSourceStatisticsVo vo = build.build(); if (vo.getPeopleCount() == 0) { vo.setAvgPeople(BigDecimal.ZERO.doubleValue()); diff --git a/src/main/java/com/biutag/supervision/service/RpcApplyService.java b/src/main/java/com/biutag/supervision/service/RpcApplyService.java index 0ae10d6..0603cc2 100644 --- a/src/main/java/com/biutag/supervision/service/RpcApplyService.java +++ b/src/main/java/com/biutag/supervision/service/RpcApplyService.java @@ -30,6 +30,7 @@ import org.springframework.web.bind.annotation.RequestBody; import java.time.LocalDateTime; import java.time.ZoneId; import java.util.ArrayList; +import java.util.Date; import java.util.List; import java.util.stream.Collectors; @@ -153,4 +154,9 @@ public class RpcApplyService extends ServiceImpl { rpcApplyWorkService.remove(new LambdaQueryWrapper().eq(RpcApplyWork::getRpcId, rpcId)); return removeById(rpcId); } + + // 抚慰人数 + public Long count(Date beginTime, Date endTime, String type) { + return count(new LambdaQueryWrapper().between(RpcApply::getCrtTime, beginTime, endTime).eq(RpcApply::getType, type)); + } } diff --git a/src/main/java/com/biutag/supervision/service/SupDictDataService.java b/src/main/java/com/biutag/supervision/service/SupDictDataService.java index 82a4530..d2fca5e 100644 --- a/src/main/java/com/biutag/supervision/service/SupDictDataService.java +++ b/src/main/java/com/biutag/supervision/service/SupDictDataService.java @@ -20,6 +20,10 @@ public class SupDictDataService extends ServiceImpl().eq(SupDictData::getDictType, dictType)); } + public SupDictData get(String dictType, String value) { + return getOne(new LambdaQueryWrapper().eq(SupDictData::getDictType, dictType).eq(SupDictData::getDictValue, value)); + } + public boolean save(DictDataDto dto) { if (exists(new LambdaQueryWrapper().eq(SupDictData::getDictType, dto.getDictType()).eq(SupDictData::getDictValue, dto.getDictValue()))) { throw new RuntimeException("字典值已存在"); diff --git a/src/main/java/com/biutag/supervision/service/SupPhotoService.java b/src/main/java/com/biutag/supervision/service/SupPhotoService.java new file mode 100644 index 0000000..aa323be --- /dev/null +++ b/src/main/java/com/biutag/supervision/service/SupPhotoService.java @@ -0,0 +1,11 @@ +package com.biutag.supervision.service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.biutag.supervision.pojo.entity.SupPhoto; +import com.biutag.supervision.mapper.SupPhotoMapper; +import org.springframework.stereotype.Service; + +@Service +public class SupPhotoService extends ServiceImpl { + +} diff --git a/src/main/java/com/biutag/supervision/service/SupPoliceService.java b/src/main/java/com/biutag/supervision/service/SupPoliceService.java index 5da5958..b39c02f 100644 --- a/src/main/java/com/biutag/supervision/service/SupPoliceService.java +++ b/src/main/java/com/biutag/supervision/service/SupPoliceService.java @@ -14,12 +14,14 @@ import com.biutag.supervision.pojo.model.PoliceModel; import com.biutag.supervision.pojo.model.UserAuth; import com.biutag.supervision.pojo.param.PoliceQueryParam; import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; import java.util.Objects; +@Slf4j @RequiredArgsConstructor @Service public class SupPoliceService extends ServiceImpl { @@ -120,6 +122,17 @@ public class SupPoliceService extends ServiceImpl { return getOne(new LambdaQueryWrapper().eq(SupPolice::getIdCode, idCode)); } + public SupPolice getByEmpNo(String empNo) { + List polices = list(new LambdaQueryWrapper().eq(SupPolice::getEmpNo, empNo)); + if (polices.isEmpty()) { + return null; + } + if (polices.size() > 1) { + log.error("警号[{}]存在重复", empNo); + } + return polices.get(0); + } + public List listAllByDepartId(String departId) { List departIds = departService.getAllNodeIds(List.of(departId)); return list(new LambdaQueryWrapper().in(SupPolice::getOrgId, departIds).orderByDesc(SupPolice::getPosition)); diff --git a/src/main/java/com/biutag/supervision/service/SupTaskProblemService.java b/src/main/java/com/biutag/supervision/service/SupTaskProblemService.java new file mode 100644 index 0000000..2e3c3c6 --- /dev/null +++ b/src/main/java/com/biutag/supervision/service/SupTaskProblemService.java @@ -0,0 +1,62 @@ +package com.biutag.supervision.service; + +import cn.hutool.core.collection.CollectionUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.biutag.supervision.constants.enums.DistributionStateEnum; +import com.biutag.supervision.constants.enums.TaskStatusEnum; +import com.biutag.supervision.pojo.dto.TaskProblemDto; +import com.biutag.supervision.pojo.entity.SupTask; +import com.biutag.supervision.pojo.entity.SupTaskProblem; +import com.biutag.supervision.mapper.SupTaskProblemMapper; +import com.biutag.supervision.pojo.entity.SupTaskSelfexaminationContent; +import com.biutag.supervision.util.JSON; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.time.LocalDateTime; +import java.util.Objects; + +@RequiredArgsConstructor +@Service +public class SupTaskProblemService extends ServiceImpl { + + private final SupTaskService taskService; + + private final SupTaskSelfexaminationContentService taskSelfexaminationContentService; + + private final SupDepartService departService; + + @Transactional(rollbackFor = Exception.class) + public boolean save(TaskProblemDto dto) { + SupTaskProblem problem = new SupTaskProblem(); + problem.setTaskId(dto.getTaskId()); + problem.setHasProblem(dto.getHasProblem()); + problem.setDepartId(dto.getDepartId()); + problem.setDepartName(departService.getById(dto.getDepartId()).getShortName()); + problem.setFiles(JSON.toJSONString(dto.getFiles())); + if (dto.getHasProblem()) { + problem.setThingDesc(dto.getThingDesc()); + problem.setProblemType(dto.getProblemType()); + if (CollectionUtil.isNotEmpty(dto.getPeoples())) { + problem.setPeoples(JSON.toJSONString(dto.getPeoples())); + problem.setPeopleNumber(dto.getPeoples().size()); + } else { + problem.setPeopleNumber(0); + } + } + problem.setCreateTime(LocalDateTime.now()); + problem.setDistributionState(DistributionStateEnum.UNDISTRIBUTED.getValue()); + SupTask task = taskService.getById(dto.getTaskId()); + problem.setTaskType(task.getTaskType()); + if (Objects.nonNull(dto.getContentId())) { + taskSelfexaminationContentService.update(new LambdaUpdateWrapper() + .eq(SupTaskSelfexaminationContent::getId, dto.getContentId()) + .set(SupTaskSelfexaminationContent::getStatus, TaskStatusEnum.done.name())); + } + return save(problem); + } + +} diff --git a/src/main/java/com/biutag/supervision/service/SupTaskSelfexaminationContentService.java b/src/main/java/com/biutag/supervision/service/SupTaskSelfexaminationContentService.java new file mode 100644 index 0000000..bcd1140 --- /dev/null +++ b/src/main/java/com/biutag/supervision/service/SupTaskSelfexaminationContentService.java @@ -0,0 +1,18 @@ +package com.biutag.supervision.service; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.biutag.supervision.pojo.entity.SupTaskSelfexaminationContent; +import com.biutag.supervision.mapper.SupTaskSelfexaminationContentMapper; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class SupTaskSelfexaminationContentService extends ServiceImpl { + + public List list(Integer taskId) { + return list(new LambdaQueryWrapper().eq(SupTaskSelfexaminationContent::getTaskId, taskId)); + } + +} diff --git a/src/main/java/com/biutag/supervision/service/SupTaskSelfexaminationService.java b/src/main/java/com/biutag/supervision/service/SupTaskSelfexaminationService.java new file mode 100644 index 0000000..d8285b5 --- /dev/null +++ b/src/main/java/com/biutag/supervision/service/SupTaskSelfexaminationService.java @@ -0,0 +1,83 @@ +package com.biutag.supervision.service; + +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.biutag.supervision.constants.enums.TaskStatusEnum; +import com.biutag.supervision.constants.enums.TaskTypeEnum; +import com.biutag.supervision.pojo.dto.TaskSelfexaminationDto; +import com.biutag.supervision.pojo.entity.SupDepart; +import com.biutag.supervision.pojo.entity.SupTask; +import com.biutag.supervision.pojo.entity.SupTaskSelfexamination; +import com.biutag.supervision.mapper.SupTaskSelfexaminationMapper; +import com.biutag.supervision.pojo.entity.SupTaskSelfexaminationContent; +import com.biutag.supervision.pojo.param.TaskInspectionQueryParam; +import com.biutag.supervision.pojo.vo.TaskSelfexaminationDetailVo; +import com.biutag.supervision.pojo.vo.TaskSelfexaminationVo; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.time.LocalDateTime; +import java.util.List; + +@RequiredArgsConstructor +@Service +public class SupTaskSelfexaminationService extends ServiceImpl { + + private final SupDepartService departService; + + private final SupTaskService taskService; + + private final SupTaskSelfexaminationContentService taskSelfexaminationContentService; + + @Transactional(rollbackFor = Exception.class) + public boolean save(TaskSelfexaminationDto dto) { + SupTask task = new SupTask(); + BeanUtils.copyProperties(dto, task); + task.setCreateTime(LocalDateTime.now()); + task.setTaskType(TaskTypeEnum.selfexamination.name()); + task.setTaskStatus(TaskStatusEnum.todo.name()); + SupDepart depart = departService.getById(dto.getSupDepartId()); + task.setSupDepartName(depart.getShortName()); + task.setBeginTime(dto.getTimes().get(0)); + task.setEndTime(dto.getTimes().get(1)); + taskService.save(task); + SupTaskSelfexamination selfexamination = new SupTaskSelfexamination(); + selfexamination.setTaskId(task.getId()); + selfexamination.setType(dto.getType()); + selfexamination.setRequirement(dto.getRequirement()); + selfexamination.setRequirementHtml(dto.getRequirementHtml()); + selfexamination.setHasSign(false); + save(selfexamination); + dto.getContents().forEach(content -> { + content.setTaskId(task.getId()); + content.setStatus(TaskStatusEnum.todo.name()); + }); + return taskSelfexaminationContentService.saveBatch(dto.getContents()); + } + + public Page page(TaskInspectionQueryParam queryParam) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("t.task_type", TaskTypeEnum.selfexamination.name()) + .like(StrUtil.isNotBlank(queryParam.getTaskName()), "t.task_name", queryParam.getTaskName()) + .eq(StrUtil.isNotBlank(queryParam.getSupDepartId()), "t.sup_depart_id", queryParam.getSupDepartId()) + .eq(StrUtil.isNotBlank(queryParam.getType()), "ts.type", queryParam.getType()) + .orderByDesc("t.create_time"); + return baseMapper.queryPage(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper); + } + + public TaskSelfexaminationDetailVo get(Integer taskId) { + TaskSelfexaminationDetailVo detail = new TaskSelfexaminationDetailVo(); + SupTask task = taskService.getById(taskId); + BeanUtils.copyProperties(task, detail); + SupTaskSelfexamination taskSelfexamination = getById(taskId); + BeanUtils.copyProperties(taskSelfexamination, detail); + List contents = taskSelfexaminationContentService.list(taskId); + detail.setContents(contents); + return detail; + } + +} diff --git a/src/main/java/com/biutag/supervision/service/SupTaskService.java b/src/main/java/com/biutag/supervision/service/SupTaskService.java index b84d078..ecce27b 100644 --- a/src/main/java/com/biutag/supervision/service/SupTaskService.java +++ b/src/main/java/com/biutag/supervision/service/SupTaskService.java @@ -1,11 +1,47 @@ package com.biutag.supervision.service; +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.biutag.supervision.pojo.entity.SupTask; +import com.biutag.supervision.common.UserContextHolder; +import com.biutag.supervision.constants.enums.TaskTypeEnum; import com.biutag.supervision.mapper.SupTaskMapper; +import com.biutag.supervision.pojo.vo.TaskCountVo; +import com.biutag.supervision.pojo.vo.TaskVo; +import com.biutag.supervision.pojo.entity.SupTask; +import com.biutag.supervision.pojo.model.UserAuth; +import com.biutag.supervision.pojo.param.TaskQueryParam; import org.springframework.stereotype.Service; @Service public class SupTaskService extends ServiceImpl { + public Page pageTask(TaskQueryParam queryParam) { + UserAuth user = UserContextHolder.getCurrentUser(); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.and(q -> { + q.eq("p.id_code", user.getUserName()); + if (StrUtil.isNotBlank(user.getPosition())) { + q.or().eq("t.sup_depart_id", user.getDepartId()).eq("t.task_type", TaskTypeEnum.selfexamination.name()); + } + }) + .eq("t.task_status", queryParam.getTaskStatus()) + .like(StrUtil.isNotBlank(queryParam.getTaskName()), "t.task_name", queryParam.getTaskName()) + .orderByDesc("t.create_time"); + return baseMapper.queryTask(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper); + } + + public TaskCountVo getTaskCount() { + UserAuth user = UserContextHolder.getCurrentUser(); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.and(q -> { + q.eq("p.id_code", user.getUserName()); + if (StrUtil.isNotBlank(user.getPosition())) { + q.or().eq("t.sup_depart_id", user.getDepartId()).eq("t.task_type", TaskTypeEnum.selfexamination.name()); + } + }); + return baseMapper.queryTaskCount(queryWrapper); + } + } diff --git a/src/main/java/com/biutag/supervision/service/SupTaskTestingAlcoholPeopleService.java b/src/main/java/com/biutag/supervision/service/SupTaskTestingAlcoholPeopleService.java index 143b5a3..8168e33 100644 --- a/src/main/java/com/biutag/supervision/service/SupTaskTestingAlcoholPeopleService.java +++ b/src/main/java/com/biutag/supervision/service/SupTaskTestingAlcoholPeopleService.java @@ -1,11 +1,58 @@ package com.biutag.supervision.service; +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.biutag.supervision.pojo.entity.SupTaskTestingAlcoholPeople; +import com.biutag.supervision.constants.enums.TaskStatusEnum; import com.biutag.supervision.mapper.SupTaskTestingAlcoholPeopleMapper; +import com.biutag.supervision.pojo.dto.TaskTestingAlcoholPeopleDto; +import com.biutag.supervision.pojo.entity.SupTaskTestingAlcoholPeople; +import com.biutag.supervision.pojo.param.TaskTestingAlcoholPeopleQueryParam; +import com.biutag.supervision.pojo.vo.FileVo; +import com.biutag.supervision.pojo.vo.TaskTestingAlcoholPeopleVo; +import com.biutag.supervision.util.JSON; import org.springframework.stereotype.Service; @Service public class SupTaskTestingAlcoholPeopleService extends ServiceImpl { + public Page page(String taskId, TaskTestingAlcoholPeopleQueryParam queryParam) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("peo.task_id", taskId) + .eq(StrUtil.isNotBlank(queryParam.getStatus()), "peo.status",queryParam.getStatus()) + .like(StrUtil.isNotBlank(queryParam.getName()), "peo.name", queryParam.getName()) + .like(StrUtil.isNotBlank(queryParam.getEmpNo()), "peo.emp_no", queryParam.getEmpNo()) + .eq(StrUtil.isNotBlank(queryParam.getTestingResult()), "peo.testing_result", queryParam.getTestingResult()) + .eq(StrUtil.isNotBlank(queryParam.getDrinkResult()), "peo.drink_result", queryParam.getDrinkResult()) + .orderByAsc("peo.testing_result"); + Page page = baseMapper.queryPage(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper); + page.getRecords().forEach(item -> { + if (StrUtil.isNotBlank(item.getTestingFiles())) { + item.setTestingFileList(com.alibaba.fastjson2.JSON.parseArray(item.getTestingFiles(), FileVo.class)); + } + }); + return page; + } + + public boolean update(TaskTestingAlcoholPeopleDto dto) { + LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); + updateWrapper.eq(SupTaskTestingAlcoholPeople::getTaskId, dto.getTaskId()) + .eq(SupTaskTestingAlcoholPeople::getEmpNo, dto.getEmpNo()) + .set(SupTaskTestingAlcoholPeople::getStatus, TaskStatusEnum.done.name()) + .set(SupTaskTestingAlcoholPeople::getTestingTime, dto.getTestingTime()) + .set(SupTaskTestingAlcoholPeople::getTestingResult, dto.getTestingResult()); + if ("已检测".equals(dto.getTestingResult())) { + updateWrapper.set(SupTaskTestingAlcoholPeople::getDrinkResult, dto.getDrinkResult()) + .set(SupTaskTestingAlcoholPeople::getTestingFiles, JSON.toJSONString(dto.getTestingFiles())); + if ("饮酒".equals(dto.getDrinkResult())) { + updateWrapper.set(SupTaskTestingAlcoholPeople::getAlcoholContent, dto.getAlcoholContent()); + } + } else { + updateWrapper.set(SupTaskTestingAlcoholPeople::getUnTestingDesc, dto.getUnTestingDesc()); + } + return update(updateWrapper); + } + } diff --git a/src/main/java/com/biutag/supervision/service/SupTaskTestingAlcoholService.java b/src/main/java/com/biutag/supervision/service/SupTaskTestingAlcoholService.java index ae14be8..9560136 100644 --- a/src/main/java/com/biutag/supervision/service/SupTaskTestingAlcoholService.java +++ b/src/main/java/com/biutag/supervision/service/SupTaskTestingAlcoholService.java @@ -63,7 +63,7 @@ public class SupTaskTestingAlcoholService extends ServiceImpl { item.setTaskId(task.getId()); - item.setStatus(TestingAlcoholStateEnum.not_detected.name()); + item.setStatus(TaskStatusEnum.todo.name()); }); testingAlcoholPeopleService.saveBatch(dto.getPeoples()); return true; diff --git a/src/main/java/com/biutag/supervision/service/UserLoginService.java b/src/main/java/com/biutag/supervision/service/UserLoginService.java index 190fd97..f7e824c 100644 --- a/src/main/java/com/biutag/supervision/service/UserLoginService.java +++ b/src/main/java/com/biutag/supervision/service/UserLoginService.java @@ -1,8 +1,11 @@ package com.biutag.supervision.service; import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.StrUtil; import com.biutag.supervision.common.UserContextHolder; import com.biutag.supervision.constants.RedisKeyConstants; +import com.biutag.supervision.constants.enums.DepartLevelEnum; +import com.biutag.supervision.pojo.domain.AppUser; import com.biutag.supervision.pojo.entity.*; import com.biutag.supervision.pojo.model.UserAuth; import lombok.RequiredArgsConstructor; @@ -11,6 +14,7 @@ import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; import java.util.List; +import java.util.Objects; import java.util.Optional; import java.util.concurrent.TimeUnit; @@ -42,6 +46,13 @@ public class UserLoginService { return token; } + public AppUser loginByApp(String account) { + UserAuth userAuth = buildUserAuth(account); + String token = IdUtil.fastSimpleUUID(); + redisTemplate.opsForValue().set(String.format(RedisKeyConstants.LOGIN_USERINFO_KEY, token), userAuth, tokenTimeout, TimeUnit.HOURS); + return new AppUser(token, userAuth); + } + public void logout() { redisTemplate.opsForValue(); redisTemplate.delete(String.format(RedisKeyConstants.LOGIN_USERINFO_KEY, UserContextHolder.getCurrentToken())); @@ -62,11 +73,23 @@ public class UserLoginService { .setNickName(user.getNickName()) .setEmpNo(Optional.ofNullable(police).map(SupPolice::getEmpNo).orElse(null)) .setMobile(Optional.ofNullable(police).map(SupPolice::getMobile).orElse(null)) + .setAvatarUrl(Optional.ofNullable(police).map(SupPolice::getAvatarUrl).orElse(null)) .setDepartId(Optional.ofNullable(depart).map(SupDepart::getId).orElse(null)) .setDepartName(Optional.ofNullable(depart).map(SupDepart::getShortName).orElse(null)) .setRoleCodes(roles.stream().map(BaseRole::getRoleCode).toList()) .setAuthSources(sourceAuthorities.stream().map(NegSourceAuthority::getSource).toList()) .setAuthDepartIds(departAuthorities.stream().map(NegDepartAuthority::getDepartId).toList()); + if (Objects.nonNull(depart) && Objects.nonNull(police) && StrUtil.isNotBlank(police.getPosition())) { + if (DepartLevelEnum.FIRST.getValue().equals(depart.getLevel())) { + userAuth.setPosition(String.format("局领导%s", police.getPosition())); + } + if (DepartLevelEnum.SECOND.getValue().equals(depart.getLevel())) { + userAuth.setPosition(String.format("二级机构%s", police.getPosition())); + } + if (DepartLevelEnum.THREE.getValue().equals(depart.getLevel())) { + userAuth.setPosition(String.format("三级机构%s", police.getPosition())); + } + } return userAuth; } diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml index 5b41125..53f996a 100644 --- a/src/main/resources/application-local.yml +++ b/src/main/resources/application-local.yml @@ -38,7 +38,10 @@ mybatis-plus: fdfs: tracker-list: #TrackerList参数,支持多个 - 172.31.217.20:32060 + - 172.31.217.20:31882 preview-url: http://172.31.217.20:31664 + connect-timeout: 10000 + so-timeout: 10000 springdoc: group-configs: diff --git a/src/main/resources/mapper/NegativeWorkMapper.xml b/src/main/resources/mapper/NegativeWorkMapper.xml index 194ce0c..47e1be0 100644 --- a/src/main/resources/mapper/NegativeWorkMapper.xml +++ b/src/main/resources/mapper/NegativeWorkMapper.xml @@ -8,7 +8,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select distinct w.id work_id, w.negative_id, w.depart_id work_depart_id, w.flow_key work_flow_key , n.* from negative_work w left join negative n on w.negative_id = n.id - left join negative_blame nb on nb.negativeId = n.id ${ew.getCustomSqlSegment} diff --git a/src/main/resources/mapper/SupTaskInspectionMapper.xml b/src/main/resources/mapper/SupTaskInspectionMapper.xml index d13c357..974434d 100644 --- a/src/main/resources/mapper/SupTaskInspectionMapper.xml +++ b/src/main/resources/mapper/SupTaskInspectionMapper.xml @@ -14,19 +14,24 @@ t.task_status, GROUP_CONCAT( DISTINCT per.NAME, ' ') persons, i.supervision_type, - i.task_content + i.task_content, + count(DISTINCT tp.depart_id) depart_number, + count(tp.id) problem_number FROM sup_task t LEFT JOIN sup_task_inspection i ON t.id = i.task_id LEFT JOIN sup_task_person per ON t.id = per.task_id - ${ew.getCustomSqlSegment} + LEFT JOIN sup_task_problem tp on t.id = tp.task_id + ${ew.getCustomSqlSegment} GROUP BY t.id, t.task_name, t.sup_depart_name, t.begin_time, t.end_time, - t.task_status + t.task_status, + i.supervision_type, + i.task_content diff --git a/src/main/resources/mapper/SupTaskMapper.xml b/src/main/resources/mapper/SupTaskMapper.xml new file mode 100644 index 0000000..9dfe194 --- /dev/null +++ b/src/main/resources/mapper/SupTaskMapper.xml @@ -0,0 +1,29 @@ + + + + + + + + + diff --git a/src/main/resources/mapper/SupTaskPersonMapper.xml b/src/main/resources/mapper/SupTaskProblemMapper.xml similarity index 84% rename from src/main/resources/mapper/SupTaskPersonMapper.xml rename to src/main/resources/mapper/SupTaskProblemMapper.xml index 4652623..44d3966 100644 --- a/src/main/resources/mapper/SupTaskPersonMapper.xml +++ b/src/main/resources/mapper/SupTaskProblemMapper.xml @@ -9,8 +9,8 @@ m.month_name AS `name`, COUNT( ng.id ) AS `value` FROM sup_month_monthname m - LEFT JOIN negative ng ON DATE_FORMAT(ng.discoveryTime,'%m') = m.`month` - AND YEAR(ng.discoveryTime) = #{year} + LEFT JOIN negative ng ON DATE_FORMAT(ng.crtTime,'%m') = m.`month` + AND YEAR(ng.crtTime) = #{year} AND ng.problemSourcesCode IN #{item} GROUP BY m.month_name @@ -20,8 +20,8 @@ + select t.id, t.task_name, t.sup_depart_name, t.begin_time, t.end_time, t.task_status, ts.type, ts.requirement from sup_task t + left join sup_task_selfexamination ts on t.id = ts.task_id + ${ew.getCustomSqlSegment} + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/SupTaskTestingAlcoholMapper.xml b/src/main/resources/mapper/SupTaskTestingAlcoholMapper.xml index 40f51db..5f08140 100644 --- a/src/main/resources/mapper/SupTaskTestingAlcoholMapper.xml +++ b/src/main/resources/mapper/SupTaskTestingAlcoholMapper.xml @@ -24,9 +24,9 @@ LEFT JOIN (SELECT task_id, count( id ) total_number, - SUM( CASE WHEN `status` = 'not_detected' THEN 1 ELSE 0 END ) not_detected_number, - SUM( CASE WHEN `status` = 'not_drinking' THEN 1 ELSE 0 END ) not_drinking_number, - SUM( CASE WHEN `status` = 'drink' THEN 1 ELSE 0 END ) drink_number + SUM( CASE WHEN `testing_result` = '未检测' THEN 1 ELSE 0 END ) not_detected_number, + SUM( CASE WHEN `drink_result` = '未饮酒' THEN 1 ELSE 0 END ) not_drinking_number, + SUM( CASE WHEN `drink_result` = '已饮酒' THEN 1 ELSE 0 END ) drink_number FROM sup_task_testing_alcohol_people GROUP BY diff --git a/src/main/resources/mapper/SupTaskTestingAlcoholPeopleMapper.xml b/src/main/resources/mapper/SupTaskTestingAlcoholPeopleMapper.xml new file mode 100644 index 0000000..df487f9 --- /dev/null +++ b/src/main/resources/mapper/SupTaskTestingAlcoholPeopleMapper.xml @@ -0,0 +1,33 @@ + + + + + + + + \ No newline at end of file diff --git a/src/test/java/com/biutag/supervision/StrUtil.java b/src/test/java/com/biutag/supervision/StrUtil.java index 5a8472d..3f29711 100644 --- a/src/test/java/com/biutag/supervision/StrUtil.java +++ b/src/test/java/com/biutag/supervision/StrUtil.java @@ -1,7 +1,11 @@ package com.biutag.supervision; +import cn.hutool.core.codec.Base64; import cn.hutool.core.date.DateUtil; +import cn.hutool.core.io.FileTypeUtil; +import cn.hutool.core.io.FileUtil; import cn.hutool.core.io.IoUtil; +import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.ZipUtil; import com.alibaba.fastjson2.JSONObject; import com.biutag.supervision.pojo.vo.RpcApplyVo; @@ -11,6 +15,8 @@ import freemarker.template.TemplateException; import freemarker.template.Version; import org.assertj.core.util.Arrays; import org.junit.jupiter.api.Test; +import org.springframework.security.crypto.bcrypt.BCrypt; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import java.io.*; import java.nio.charset.StandardCharsets; @@ -95,17 +101,10 @@ public class StrUtil { } @Test - public void template3() { - System.out.println("SELECT " + - "npr.threeLevelContent as label, " + - "count(*) `value` " + - "FROM negative_problem_relation npr INNER JOIN negative ng ON npr.negativeId=ng.id " + - "WHERE npr.threeLevelContent is not NULL " + - "AND checkStatus IN (1, 2) " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + - "GROUP BY npr.threeLevelContent " + - "ORDER BY `value` desc " + - " LIMIT 10 OFFSET 1 "); + public void template3() throws FileNotFoundException { + BCryptPasswordEncoder encoder = new BCryptPasswordEncoder(); + String passwordEncoder = encoder.encode("123456"); + System.out.println(passwordEncoder); } } diff --git a/src/test/java/com/biutag/supervision/tools/GenCodeTests.java b/src/test/java/com/biutag/supervision/tools/GenCodeTests.java index 3791ed8..ff99a18 100644 --- a/src/test/java/com/biutag/supervision/tools/GenCodeTests.java +++ b/src/test/java/com/biutag/supervision/tools/GenCodeTests.java @@ -25,7 +25,7 @@ public class GenCodeTests { @Test public void genEntity() throws TemplateException, IOException { - String tableName = "sup_task_inspection"; + String tableName = "sup_task_selfexamination_content"; String tableSchema = "negative"; boolean genMapper = true; boolean genService = true;